# OpenAPI Spec Scraper — APIs to LLM Agent Tools (MCP-Ready) (`scrapersdelight/openapi-spec-scraper`) Actor

Bulk-scrape machine-readable API specs from the apis.guru directory (2,500+ APIs) or any spec URL, normalized into LLM-agent-ready rows — one per endpoint: method, path, summary, parameters, auth, tags. Build agent-tool / RAG datasets in one run. $4 per 1,000 endpoints.

- **URL**: https://apify.com/scrapersdelight/openapi-spec-scraper.md
- **Developed by:** [Scrapers Delight](https://apify.com/scrapersdelight) (community)
- **Categories:** AI, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 per record returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🧰 OpenAPI Spec Scraper — API Directory → Agent-Tool / RAG Dataset

**Turn the world's machine-readable APIs into a clean, LLM-agent-ready dataset. Bulk-scrape the [apis.guru](https://apis.guru) directory (2,500+ public API specs) — or any OpenAPI/Swagger URL — and get normalized rows, one per endpoint: method, path, summary, parameters, auth scheme, server, and tags. Perfect for building agent tool catalogs, MCP servers, and RAG knowledge bases. Monitor the directory for newly-added APIs.**

No login, no anti-bot — the directory and specs are public JSON.

---

### What does it do?

Most spec converters take **one** pasted spec. This actor works on the **bulk directory axis**: point it at apis.guru (search or take the top N), and it fetches each API's OpenAPI/Swagger spec and **normalizes** it into ready-to-load rows.

- 📚 **2,500+ APIs** in the apis.guru directory (or your own spec URLs).
- 🔧 **One row per endpoint** (agent-tool ready): `method`, `path`, `operation_id`, `summary`, `parameters`, `auth`, `tags`, `server` — or one row per API with an `endpoints[]` array.
- 🔔 **Monitor mode** — alert when new APIs are added to the directory.

---

### What data does it extract?

**Per endpoint** (`emitMode: per-endpoint`): `api`, `api_title`, `server`, `auth_schemes`, `method`, `path`, `operation_id`, `summary`, `tags`, `parameters[]` (`{name, in, required, type}`), `request_body_required`, `response_codes`, `scraped_at`.

**Per API** (`emitMode: per-api`): `api`, `title`, `description`, `version`, `spec_version`, `server`, `auth_schemes`, `endpoint_count`, `endpoints[]`.

---

### Who is it for?

- 🤖 **AI agent / tool builders & MCP authors** assembling machine-usable tool catalogs.
- 📚 **RAG / knowledge-base builders** indexing API documentation as structured text.
- 🧑‍💻 **Developer-tooling teams** building API search, SDKs, and integrations.

---

### How to use it (step by step)

1. Click **Try for free**.
2. **Search** the directory (e.g. `stripe`, `google`, `weather`) — or paste **spec URLs** / **API names**.
3. Pick the **output shape** (per-endpoint is agent-tool ready).
4. Click **Start**, then open the **Dataset** tab to view/export.
5. *(Optional)* set **monitorMode** + a **Schedule** to catch newly-added APIs.

#### Quick start

```json
{ "searchTerm": "stripe", "emitMode": "per-endpoint" }
````

#### Bulk-directory example

```json
{ "maxApis": 200, "emitMode": "per-endpoint", "includeParameters": true }
```

***

### Input

| Field | What it does |
|-------|--------------|
| `searchTerm` | filter the apis.guru directory by name/title |
| `apiNames` | specific directory keys (e.g. `stripe.com`) |
| `specUrls` | any raw OpenAPI/Swagger spec URLs |
| `emitMode` | `per-endpoint` (agent-tool ready) · `per-api` |
| `includeParameters`, `includeSchemas` | enrich each endpoint |
| `maxApis` | cap on directory APIs (0 = all matching) |
| `monitorMode`, `alertOnNewApi` | recurring new-API watcher + alerts |
| `webhookUrl`, `slackWebhookUrl`, `emailRecipients` | alert channels |
| `proxyConfiguration`, `requestConcurrency` | proxy + parallelism |

***

### Output

One dataset record per endpoint (or per API). Export to **JSON, CSV, Excel, HTML, or RSS** — or fetch JSONL via the **Apify API** to load straight into an agent/RAG pipeline.

***

### How much does it cost?

Pay-per-event — you pay for what you pull:

| Event | What it covers | Suggested price |
|-------|----------------|-----------------|
| `lot-scraped` | each endpoint (or API) row returned | ~$0.001 / row |
| `monitor-run-completed` | each scheduled watch run | ~$0.05 / run |
| `new-lot-detected` | each newly-added API | ~$0.02 / API |
| `alert-delivered` | each Slack/email/webhook push | ~$0.005 / alert |

*(Final per-event prices are set on the actor's pricing page.)*

***

### Is it legal?

The apis.guru directory and the linked specs are **public, openly-licensed API descriptions** — no personal data. You're responsible for your use: review apis.guru's terms and each spec's own license/terms before redistributing.

***

### FAQ

**OpenAPI 3 and Swagger 2?**
Both — the normalizer handles `openapi` 3.x and `swagger` 2.0 (server, auth, parameters).

**Can I use a spec that isn't in the directory?**
Yes — pass its URL in `specUrls`.

**What's the best output for an AI agent?**
`per-endpoint` — each row is a self-contained tool descriptor.

**How do I export?**
JSON / JSONL, CSV, Excel, HTML, or RSS from the Dataset tab, or via the Apify API.

***

### Feedback

Want full request/response schema flattening or OpenAPI→MCP tool-manifest output? Open an issue on the actor.

# Actor input Schema

## `searchTerm` (type: `string`):

Filter the apis.guru directory by API name or title (e.g. 'google', 'stripe', 'weather'). Leave empty to take the first N APIs.

## `apiNames` (type: `array`):

Exact-ish directory keys to fetch (e.g. 'stripe.com', 'github.com'). Substring match.

## `specUrls` (type: `array`):

Any OpenAPI/Swagger spec URLs (JSON) to normalize directly — works for specs not in the directory (e.g. a raw GitHub spec).

## `emitMode` (type: `string`):

Per-endpoint = one row per API endpoint (agent-tool / RAG ready). Per-api = one row per API with an endpoints array.

## `includeParameters` (type: `boolean`):

Include each endpoint's parameters (name, in, required, type).

## `includeSchemas` (type: `boolean`):

Include each endpoint's response status codes.

## `maxApis` (type: `integer`):

Cap on APIs from the directory (the full directory is ~2,500). 0 = all matching.

## `monitorMode` (type: `boolean`):

Recurring watcher: diff the directory against the prior run and output/alert ONLY newly-added APIs. Pair with a Schedule.

## `alertOnNewApi` (type: `boolean`):

In monitor mode, alert for each newly-added API.

## `webhookUrl` (type: `string`):

POST endpoint for new-API alerts.

## `slackWebhookUrl` (type: `string`):

Slack incoming-webhook URL.

## `emailRecipients` (type: `array`):

Emails for the new-API digest (via apify/send-mail).

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

Proxy settings. The directory + specs are public; datacenter rotation is plenty.

## `requestConcurrency` (type: `integer`):

Max parallel spec fetches.

## `diagnose` (type: `boolean`):

Dev only. Logs the directory size + the first normalized API/endpoint, then exits.

## Actor input object example

```json
{
  "emitMode": "per-endpoint",
  "includeParameters": true,
  "includeSchemas": false,
  "maxApis": 50,
  "monitorMode": false,
  "alertOnNewApi": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "requestConcurrency": 6,
  "diagnose": false
}
```

# Actor output Schema

## `endpoints` (type: `string`):

The dataset of normalized API endpoints (or APIs, in per-api mode).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapersdelight/openapi-spec-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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call scrapersdelight/openapi-spec-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapersdelight/openapi-spec-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OpenAPI Spec Scraper — APIs to LLM Agent Tools (MCP-Ready)",
        "description": "Bulk-scrape machine-readable API specs from the apis.guru directory (2,500+ APIs) or any spec URL, normalized into LLM-agent-ready rows — one per endpoint: method, path, summary, parameters, auth, tags. Build agent-tool / RAG datasets in one run. $4 per 1,000 endpoints.",
        "version": "0.1",
        "x-build-id": "Zx7LiuhO1wbcrC1xZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapersdelight~openapi-spec-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapersdelight-openapi-spec-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapersdelight~openapi-spec-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapersdelight-openapi-spec-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapersdelight~openapi-spec-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapersdelight-openapi-spec-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchTerm": {
                        "title": "Search the directory",
                        "type": "string",
                        "description": "Filter the apis.guru directory by API name or title (e.g. 'google', 'stripe', 'weather'). Leave empty to take the first N APIs."
                    },
                    "apiNames": {
                        "title": "Specific API names",
                        "type": "array",
                        "description": "Exact-ish directory keys to fetch (e.g. 'stripe.com', 'github.com'). Substring match.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "specUrls": {
                        "title": "Raw spec URLs",
                        "type": "array",
                        "description": "Any OpenAPI/Swagger spec URLs (JSON) to normalize directly — works for specs not in the directory (e.g. a raw GitHub spec).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "emitMode": {
                        "title": "Output shape",
                        "enum": [
                            "per-endpoint",
                            "per-api"
                        ],
                        "type": "string",
                        "description": "Per-endpoint = one row per API endpoint (agent-tool / RAG ready). Per-api = one row per API with an endpoints array.",
                        "default": "per-endpoint"
                    },
                    "includeParameters": {
                        "title": "Include parameters",
                        "type": "boolean",
                        "description": "Include each endpoint's parameters (name, in, required, type).",
                        "default": true
                    },
                    "includeSchemas": {
                        "title": "Include response codes",
                        "type": "boolean",
                        "description": "Include each endpoint's response status codes.",
                        "default": false
                    },
                    "maxApis": {
                        "title": "Max APIs per run",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap on APIs from the directory (the full directory is ~2,500). 0 = all matching.",
                        "default": 50
                    },
                    "monitorMode": {
                        "title": "Monitor mode (new-API watcher)",
                        "type": "boolean",
                        "description": "Recurring watcher: diff the directory against the prior run and output/alert ONLY newly-added APIs. Pair with a Schedule.",
                        "default": false
                    },
                    "alertOnNewApi": {
                        "title": "Alert on new APIs",
                        "type": "boolean",
                        "description": "In monitor mode, alert for each newly-added API.",
                        "default": true
                    },
                    "webhookUrl": {
                        "title": "Webhook URL",
                        "type": "string",
                        "description": "POST endpoint for new-API alerts."
                    },
                    "slackWebhookUrl": {
                        "title": "Slack webhook URL",
                        "type": "string",
                        "description": "Slack incoming-webhook URL."
                    },
                    "emailRecipients": {
                        "title": "Email recipients",
                        "type": "array",
                        "description": "Emails for the new-API digest (via apify/send-mail).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Proxy settings. The directory + specs are public; datacenter rotation is plenty.",
                        "default": {
                            "useApifyProxy": true
                        }
                    },
                    "requestConcurrency": {
                        "title": "Request concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Max parallel spec fetches.",
                        "default": 6
                    },
                    "diagnose": {
                        "title": "Diagnostic mode (dev)",
                        "type": "boolean",
                        "description": "Dev only. Logs the directory size + the first normalized API/endpoint, then exits.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
