# Apple Swift Documentation Scraper (`parseforge/apple-swift-documentation-scraper`) Actor

Pull structured Swift documentation from Apple's official API. Retrieve symbol abstracts, hierarchy paths, interface language, symbol kind, and metadata like platforms and modules. Ideal for building offline reference tools or analyzing API coverage across Swift versions.

- **URL**: https://apify.com/parseforge/apple-swift-documentation-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Other, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.40 / 1,000 result items

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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### Apple Swift Documentation Scraper

**Scrape Swift documentation from Apple Developer, up to a million entries per run.** Every entry returns its abstract, hierarchy, identifier, kind, metadata, and topic sections. No API key or authentication required. Export to CSV, JSON, Excel, or XML.

Apple's Swift documentation is spread across hundreds of pages on developer.apple.com, making bulk analysis tedious. This Actor reads the structured JSON feed that powers the documentation site directly, so you get every symbol, article, and tutorial in one flat dataset. Filter by keyword to extract only the APIs or topics you care about.

| Who uses it | What they scrape Apple Developer Documentation for |
|---|---|
| iOS and macOS developers | Build a local, searchable index of the Swift standard library for offline reference. |
| Technical writers | Audit documentation coverage or compare Apple's descriptions against internal API docs. |
| AI and ML engineers | Create a knowledge base of official Swift APIs for fine-tuning code-generation models. |
| SDK and tooling vendors | Track additions and deprecations in the Swift language to keep compatibility shims up to date. |

### What it does

This Actor collects Swift documentation entries from Apple's official JSON endpoint and returns each one as a flat row with its abstract, hierarchy, identifier, kind, metadata, and topic sections.

- 🔍 **Keyword search:** filter the full documentation feed by any term, returning only matching symbols and articles.
- 📄 **Structured JSON output:** every row preserves the original hierarchy, identifier, kind, and metadata fields exactly as Apple defines them.
- ⚡ **Bulk extraction:** pull up to a million entries in a single run, covering the entire public Swift documentation surface.
- 📊 **Multi-format export:** save your dataset as CSV, JSON, Excel, XML, or push it to a webhook.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Apple Developer Documentation data

**📱 Build an offline Swift reference app.**

An iOS developer runs the Actor weekly to populate a local SQLite database with the latest Swift APIs, then ships it inside a developer tool app.

**🤖 Fine-tune a code generation model.**

An ML team extracts the full Swift documentation to create instruction-tuning pairs that teach a model to generate correct Swift code from natural-language prompts.

**📝 Audit internal documentation coverage.**

A technical writing team at a large SDK vendor scrapes Apple's docs to find gaps where their own Swift framework lacks equivalent documentation.

**🔎 Track API additions and changes.**

A tooling vendor runs the Actor monthly, diffs the output, and updates their linter rules to flag newly deprecated Swift APIs.

### Why choose this scraper

| | What you get |
|---|---|
| **Official Apple data source** | Reads the same JSON endpoint that powers developer.apple.com, not scraped HTML. |
| **Full documentation surface** | Covers symbols, articles, tutorials, and topic sections from the entire Swift documentation set. |
| **No authentication** | No Apple Developer account, API key, or OAuth flow required to start extracting data. |
| **Fixed schema** | Every run returns the same flat structure, so your downstream pipelines never break. |

### What a Apple Developer Documentation record looks like

Every record returns as one flat JSON row. Here is a real one from a run:

```json
{
 "imageUrl": "https://developer.apple.comSwift-PageImage-card.png",
 "title": "Swift",
 "url": "https://developer.apple.com/documentation/swift",
 "identifierUrl": "doc://com.apple.Swift/documentation/Swift",
 "interfaceLanguage": "swift",
 "kind": "symbol",
 "abstract": "Build apps using a capable open language.",
 "role": "collection",
 "roleHeading": "Framework",
 "symbolKind": "module",
 "moduleName": "Swift",
 "copyright": "Copyright &copy; 2026 Apple Inc. All rights reserved.",
 "privacyPolicy": "https://www.apple.com/privacy/privacy-policy",
 "termsOfUse": "https://www.apple.com/legal/internet-services/terms/site.html",
 "availableLanguages": "de-DE,en-US,es-419,fr-FR,it-IT,ja-JP,ko-KR,pt-BR,zh-CN"
}
```

Every value above comes from a real run. A field a record does not have comes back as `null`.

### Configure the run

Drive the Actor with an optional search query to filter documentation entries by keyword, and set a maximum number of items to return. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "maxItems": 10
}
```

A larger pull:

```json
{
 "maxItems": 200
}
```

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Set your inputs and any filters, then click **Start**.
3. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Apple Developer Documentation through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check your search query for typos. The search is a simple keyword match, so try a shorter or more general term. Also verify that your maxItems setting is not set too low.

**Why are some documentation sections empty?**

Not every documentation entry has all sections populated. Some symbols may lack a primaryContentSections array or topicSections. This reflects Apple's own documentation structure.

**The run failed with a timeout error.**

Large extractions can take time. Increase the Actor's timeout in the run settings, or reduce maxItems to fetch fewer entries per run and split the work across multiple runs.

**The JSON output contains nested objects I cannot flatten.**

Some fields like metadata and sections are nested. Use Apify's built-in flattening option in the dataset export, or process the nested JSON in your own ETL pipeline.

### FAQ

| Question | Answer |
|---|---|
| Does this scraper require an Apple Developer account? | No. It reads the public JSON endpoint that powers developer.apple.com, so no account, API key, or authentication is needed. |
| What data fields does each row contain? | Each row includes the abstract, hierarchy path, identifier (with interface language and URL), kind, legal notices, metadata (languages, platforms, role, symbol kind, title, images), primary content sections, schema version, sections, and topic sections. |
| Can I filter by a specific Swift framework or module? | The search query field filters entries by keyword across all text fields. For module-specific filtering, you can apply additional filtering in your own code after the run completes. |
| How often is the documentation updated? | The endpoint reflects Apple's live documentation. Run the Actor on a schedule to capture updates as Apple publishes them. |
| Is this legal? | Yes. The Actor reads publicly accessible data from an unauthenticated JSON endpoint. You are responsible for complying with Apple's terms of use for any data you store or redistribute. |
| What is the maximum number of items I can scrape? | Paid Apify users can extract up to 1,000,000 items per run. Free users are limited to 10 items for preview purposes. |
| Does this scraper handle rate limiting? | The endpoint does not impose rate limits under normal use. The Actor includes automatic retries with exponential backoff if transient errors occur. |
| Can I get the data in Excel format? | Yes. You can export your dataset to CSV, JSON, Excel, XML, or push it to a webhook or cloud storage via Apify integrations. |
| Does this cover SwiftUI documentation too? | The endpoint covers the Swift language and standard library. SwiftUI and other frameworks have separate documentation endpoints. This Actor focuses on the core Swift documentation. |
| How do I search for a specific API symbol? | Enter the symbol name or a keyword in the search query input field. The Actor filters the documentation feed and returns only entries that match your term. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Apple Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `searchQuery` (type: `string`):

Optional search term to filter documentation entries by keyword.

## Actor input object example

```json
{
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Complete dataset of all scraped records.

# 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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/apple-swift-documentation-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 = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parseforge/apple-swift-documentation-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 '{
  "maxItems": 10
}' |
apify call parseforge/apple-swift-documentation-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/apple-swift-documentation-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/hIAnFgM3znV3SPrCk/builds/PcnXnrFht9vtfYnyp/openapi.json
