# Cocoapods Scraper (`b2b_lead_generation/cocoapods-scraper`) Actor

Easily search iOS pod versions, publish dates, and maintainers from CocoaPods Trunk. Simply enter pod names to retrieve structured details, and export your results directly as CSV, JSON, or Excel spreadsheets.

- **URL**: https://apify.com/b2b_lead_generation/cocoapods-scraper.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## CocoaPods Scraper: iOS Pods Search

CocoaPods Scraper helps you easily look up iOS pods and retrieve details like version history, release timestamps, and repository links. Pass in a list of pod names, and you'll get back clean data formatted ready to export as JSON, CSV, or Excel.

### Common Use Cases

- **Dependency Audits**: Pull structured version histories for all the pods running in your iOS projects.
- **Release Tracking**: Stay up to date on when new versions drop and trace back when a library was first published.
- **Spreadsheet Reports**: Drop in a list of dependencies and download a clean CSV for project reviews.
- **Maintainer Insights**: Optionally pull details on pod owners when you need maintainer context for your internal records.

### Modes & How It Works

The actor processes pod lookups sequentially to keep data clean and reliable. Pod names are case-sensitive, so make sure to check exact casing when passing your list. If a pod name isn't found or encounters an issue, the run continues smoothly while recording an error entry for that specific lookup so you never lose the rest of your dataset.

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `pod_details` | Retrieves pod details and versions. |
| `pods` | array | `["Alamofire"]` | Case-sensitive pod names, one per line. |
| `versionsAsRows` | boolean | `false` | Flattens output so each version gets its own row instead of grouping under the pod. |
| `includeOwners` | boolean | `false` | Include maintainer name, email, and creation date. Off by default. |
| `requestDelaySecs` | number | `1` | Pause duration between individual pod requests. |
| `userAgent` | string | \`\` | Custom browser or client identity string sent with requests. |
| `timeoutSecs` | integer | `300` | Overall timeout for the entire run in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout duration for individual requests. |

#### Example Input

```json
{
  "mode": "pod_details",
  "pods": ["Alamofire"],
  "versionsAsRows": false,
  "includeOwners": false,
  "requestDelaySecs": 1,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30
}

```

### Extracted Data Output

Each dataset row contains either complete pod information or individual version rows depending on your configuration.

```json
{
  "pod": "Alamofire",
  "latest_version": "1.1.4",
  "versions_count": 2,
  "versions": [
    {"name": "1.1.3", "created_at": "2015-01-09 22:10:57 UTC"},
    {"name": "1.1.4", "created_at": "2015-01-29 17:00:02 UTC"}
  ],
  "first_published": "2015-01-09 22:10:57 UTC",
  "scraped_at": "2026-10-12T00:00:00+00:00"
}

```

#### Output Fields

| Field | Type | Description |
| --- | --- | --- |
| `pod` | string | The requested pod name. |
| `latest_version` | string | Highest released version. Stable releases sort above pre-releases. |
| `versions_count` | integer | Total count of published versions found. |
| `versions` | array | List containing `name` and `created_at` for each version. |
| `owners` | array | Maintainer details (`name`, `email`, `created_at`) when enabled. |
| `first_published` | string | Timestamp of the earliest published version. |
| `scraped_at` | string | UTC timestamp of when the entry was collected. |
| `error` | boolean | Set to `true` if a specific lookup failed. |
| `status` | integer | HTTP response status code. |
| `message` | string | Detailed explanation if a lookup failed. |

### Trademark Notice & Disclaimer

CocoaPods and related names, logos, and trademarks belong to their respective owners. Their use in this documentation is solely to identify the subject matter and does not imply affiliation, sponsorship, endorsement, or official partnership. This Actor is an independent tool developed for data extraction purposes. Users are responsible for complying with all applicable terms of use, privacy laws, and licensing requirements.

### FAQ

**What happens if a pod name has a typo?**
The scraper tags that specific entry with a 404 status, records an error message in the output dataset, and continues processing the remaining pods.

**Can I export my results straight to CSV or Excel?**
Yes, once your run finishes, you can download the final dataset directly in CSV, Excel, or JSON formats.

### Is web scraping legal?

This Actor only collects publicly available data without bypassing any access controls. Scraping public data is generally legal, but how you use it matters:

- **Personal data:** If the results include personal data (for example names, emails, or profile details), laws such as the GDPR in the EU and the CCPA in California may apply. Only collect and store personal data when you have a legitimate reason.
- **Copyright:** Some content (articles, images, descriptions) may be protected by copyright. Do not republish full copyrighted content without permission.
- **Terms of use:** Respect the source's terms, stated rate limits, and any attribution or non-commercial-use requirements.
- **Legal advice:** This is general information, not legal advice. If you're unsure, consult a lawyer.

To learn more, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

What to scrape. Pod details reads one CocoaPods Trunk record per name, including versions and optional owners.

## `pods` (type: `array`):

Pod names to look up on CocoaPods Trunk. Names are case-sensitive. One name per line.

## `versionsAsRows` (type: `boolean`):

When enabled, each published version is its own dataset row. When off, each pod is one row with the full version list.

## `includeOwners` (type: `boolean`):

Include owner name, email, and created time. Owner emails are personal data, so this stays off unless you turn it on.

## `requestDelaySecs` (type: `number`):

Seconds to wait between Trunk requests. Default is 1 because CocoaPods does not publish a rate limit.

## `userAgent` (type: `string`):

User-Agent sent to CocoaPods Trunk. Keep a contact address so the host can identify the client.

## `timeoutSecs` (type: `integer`):

Stop the run after this many seconds, even if some pod names are still queued.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for a single Trunk response before treating that pod as an error.

## `proxyConfiguration` (type: `object`):

Optional proxy for Trunk requests. Leave Apify Proxy off unless the host blocks your IP.

## Actor input object example

```json
{
  "mode": "pod_details",
  "pods": [
    "Alamofire"
  ],
  "versionsAsRows": false,
  "includeOwners": false,
  "requestDelaySecs": 1,
  "userAgent": "",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetUrl` (type: `string`):

No description

## `overviewUrl` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "pods": [
        "Alamofire"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/cocoapods-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "pods": ["Alamofire"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/cocoapods-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "pods": [
    "Alamofire"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call b2b_lead_generation/cocoapods-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/cocoapods-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/7TRPu02RvY3wddbJi/builds/v1rDX5ilT4Dln10F4/openapi.json
