# Openrouter Ai Models Catalog Scraper (`kawsar/openrouter-ai-models-catalog-scraper`) Actor

Scrape OpenRouter LLM models with prompt/completion pricing, context windows, max output tokens, and endpoint details. Easily filter zero-cost models or search by model name, then download your dataset as JSON, CSV, or Excel.

- **URL**: https://apify.com/kawsar/openrouter-ai-models-catalog-scraper.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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

### OpenRouter AI Models Catalog Scraper: LLM models with pricing and context

This OpenRouter models catalog scraper extracts LLM pricing, context length, and provider endpoints into structured data. Export your datasets effortlessly as JSON, CSV, or Excel.

Because AI model catalogs update whenever providers release new models or adjust pricing, this tool lets you pull fresh, real-time data whenever you need it instead of relying on outdated static sheets.

### Use cases

- **Price checks**: Compare prompt and completion costs per token before switching model setups in production.
- **Context windows**: Keep detailed track of context lengths and maximum output limits alongside model IDs.
- **Provider coverage**: Track which providers serve specific models (like `openai/gpt-4o`).
- **Free models**: Filter and extract only models that cost nothing for prompt and completion.
- **Spreadsheets**: Easily clean, filter, and export catalog datasets into CSV or Excel formats.
- **Scheduled refresh**: Set up automated runs so your project quotes and benchmarks always stay accurate.

### What this actor collects

You can run the actor in two main modes:

1. **Full model catalog** (`catalog`): Collects all available models, display titles, context limits, pricing, and specs.
2. **Provider endpoints per model** (`endpoints`): Collects precise provider configurations and endpoints for specific model IDs.

Catalog rows use the model ID as the primary key. Endpoint rows combine the model ID with provider tags so multiple providers for the same model appear clearly. Duplicate IDs inside a single run are automatically deduplicated.

The dataset field for model descriptions is named `model_description`.

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `catalog` | Choose between the full catalog or specific model endpoints. |
| `modelIds` | array | `openai/gpt-4o` | Model IDs to check. Used in endpoints mode. |
| `filterText` | string | empty | Case-insensitive match on model ID or display name. |
| `freeOnly` | boolean | `false` | Keep only models where prompt and completion prices are zero. |
| `maxItems` | integer | `100` | Maximum rows to return per run. Hard cap at 1000. |
| `requestDelaySecs` | number | `1` | Delay between consecutive requests. |
| `userAgent` | string | kawsar research UA | User-Agent string for outgoing calls. |
| `timeoutSecs` | integer | `300` | Total run timeout in seconds. |
| `requestTimeoutSecs` | integer | `30` | Per-request timeout limit. |
| `proxyConfiguration` | object | Off | Optional proxy setup if direct connections are restricted. |

#### Example input

```json
{
  "mode": "catalog",
  "filterText": "claude",
  "freeOnly": false,
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "KawsarActorResearch/1.0 (contact: research@kawsar.com)",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": { "useApifyProxy": false }
}

```

For endpoints mode, set `mode` to `endpoints` and pass target model IDs in `modelIds` (e.g., `["openai/gpt-4o"]`).

### Output

```json
{
  "id": "stepfun/step-5-preview",
  "name": "StepFun: Step 5 Preview",
  "created": 1791462849,
  "context_length": 1000000,
  "modality": "text+image+video->text",
  "price_prompt_per_token_usd": "0.000001",
  "price_completion_per_token_usd": "0.0000027",
  "max_completion_tokens": 64000,
  "supported_parameters": ["frequency_penalty", "include_reasoning"],
  "hugging_face_id": null,
  "model_description": "Step 5 Preview is StepFun's flagship model for agentic work.",
  "scraped_at": "2026-10-12T00:00:00+00:00"
}

```

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Model ID. |
| `name` | string | Model display name. |
| `created` | integer | Unix creation timestamp. |
| `context_length` | integer | Context window capacity in tokens. |
| `modality` | string | Supported modalities (e.g. text+image->text). |
| `price_prompt_per_token_usd` | string | Cost per prompt token in USD. |
| `price_completion_per_token_usd` | string | Cost per completion token in USD. |
| `max_completion_tokens` | integer | Maximum output tokens permitted. |
| `supported_parameters` | array | Parameters accepted by the model. |
| `hugging_face_id` | string | Hugging Face repository reference if available. |
| `model_description` | string | Model description and capabilities. |
| `provider_name` | string | Provider serving the model (endpoints mode). |
| `endpoint_name` | string | Endpoint designation (endpoints mode). |
| `endpoint_tag` | string | Short provider identifier tag. |
| `quantization` | string | Model quantization details if applicable. |
| `scraped_at` | string | UTC timestamp when data was retrieved. |
| `error` | boolean | Set to true if a request encountered an error. |
| `status` | integer | Response status code. |
| `message` | string | Detailed message if a step failed. |

If a request runs into an issue, the run continues seamlessly while creating an informative error row containing the status and error details.

### How it works

1. Reads your execution parameters and verifies selected modes.
2. Sends requests using your specified User-Agent header, pausing for `requestDelaySecs` between calls.
3. Handles unexpected standard rate spikes or intermittent server issues with standard exponential backoff retries.
4. Cleans and normalizes fields, applies local text/price filters, removes duplicate entries, and respects your `maxItems` target.
5. Saves data in structured output batches for fast, reliable delivery.

### Pricing

You pay Apify standard platform compute fees for running this tool. Proxy usage is disabled by default and only incurs costs if you choose to turn it on.

### Limits & Usage Guidelines

- Keep the default pause delay intact to ensure smooth, respectful requests.
- Individual providers manage access to their respective AI models. Please review relevant provider policies before redistributing model summaries or descriptions.
- This tool is independently developed by Kawsar and is not affiliated with or endorsed by any AI model provider.

### FAQ

**Can I extract only free models?**
Yes. Enable `freeOnly` in your input settings. The scraper will filter for models where both prompt and completion costs are zero.

**What happens if a model ID is misspelled or invalid?**
The tool records an error row with the failure details and continues fetching the rest of your requested model list without crashing.

**How many records can I save in a single run?**
The default `maxItems` setting is 100, expandable up to 1000 items per run. Ensure you adjust `timeoutSecs` accordingly when pulling larger datasets.

**Do I need a proxy to run this scraper?**
No. Proxies are turned off by default. You can run the tool directly without enabling proxy settings.

#### Trademark Notice

All model names, logos, and trademarks mentioned in this documentation belong to their respective owners. Their use here is purely for identification purposes and does not imply affiliation, sponsorship, or endorsement.

#### Disclaimer

This Actor is an independent tool developed by kawsar. All data is collected from publicly accessible sources. Users are responsible for complying with relevant usage terms, licensing, and attribution guidelines.

#### Is web scraping legal?

This Actor only collects publicly available data without requiring user credentials or bypassing access restrictions. Scraping public data is standard practice, but how you handle the data matters:

- **Personal data:** If your results include personal data (such as contact information or profile details), privacy laws like GDPR or CCPA may apply. Only collect and store personal data when you have a valid legal basis.
- **Copyright:** Content such as long text passages or proprietary descriptions may be copyrighted. Ensure you don't republish copyrighted text without permission.
- **Terms of use:** Respect rate limits, site guidelines, and non-commercial usage rules.
- **Legal advice:** This documentation provides general information, not legal advice. Consult a legal expert if you have specific regulatory questions.

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

# Actor input Schema

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

Full model catalog reads the public models list. Provider endpoints fetches the providers that serve each model ID you enter.

## `modelIds` (type: `array`):

Model IDs in author/slug form, used only for provider endpoints mode. One ID per line, for example openai/gpt-4o.

## `filterText` (type: `string`):

Keep rows whose model ID or display name contains this text. Matching runs locally and ignores letter case. Leave blank to keep every row.

## `freeOnly` (type: `boolean`):

When checked, keep only rows whose prompt price and completion price are both zero.

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

Maximum rows to save in one run, counting both model rows and error rows. The hard cap is 1000.

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

Seconds to wait between HTTP calls so the public API is not hit in a burst. Use 0 only for a tiny run.

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

User-Agent sent on every request. Keep an app name and a contact address so the source can see who is calling.

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

Maximum seconds the run may spend fetching. Rows already collected are still saved when this limit is hit.

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

Seconds to wait for one HTTP response before that call is treated as failed.

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

Optional proxy for requests. Leave this off unless calls fail from the default IP. Datacenter proxies are fastest. Residential proxies are harder to block.

## Actor input object example

```json
{
  "mode": "catalog",
  "modelIds": [
    "openai/gpt-4o"
  ],
  "filterText": "claude",
  "freeOnly": false,
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Model ID, name, created date, context length, modality, prompt and completion prices, and source URL.

## `errors` (type: `string`):

Failed OpenRouter requests with URL, HTTP status, and message.

## `dataset` (type: `string`):

Every row from the run, without a table view applied.

# 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 = {
    "mode": "catalog",
    "modelIds": [
        "openai/gpt-4o"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/openrouter-ai-models-catalog-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 = {
    "mode": "catalog",
    "modelIds": ["openai/gpt-4o"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/openrouter-ai-models-catalog-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 '{
  "mode": "catalog",
  "modelIds": [
    "openai/gpt-4o"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call kawsar/openrouter-ai-models-catalog-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/openrouter-ai-models-catalog-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/OS8qnCaSpJTu3eTwg/builds/OhNFAamq1hziPUBIr/openapi.json
