# OpenRouter AI Model Pricing Scraper (`parseforge/openrouter-models-pricing-scraper`) Actor

Scrape AI model catalog and pricing from OpenRouter public API. Get prompt/completion price per token, context length, modality, top providers, and supported features for 300+ AI models. No API key required.

- **URL**: https://apify.com/parseforge/openrouter-models-pricing-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** AI, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $32.85 / 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/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

![ParseForge Banner](https://raw.githubusercontent.com/ParseForge/apify-assets/main/parseforge-banner.png)

## 🤖 OpenRouter AI Model Pricing Scraper

> 🚀 **Pull the entire OpenRouter model catalog in seconds.** Filter by provider, modality, context length, and price. No API key, no registration, no manual CSV wrangling.

> 🕒 **Last updated:** 2026-05-12 · **📊 24 fields** per record · **300+ AI models** indexed · **55+ providers** including OpenAI, Anthropic, Google, Meta, Mistral · **Per-1M-token pricing** normalized

The OpenRouter AI Model Pricing Scraper extracts the complete public model catalog from OpenRouter, a unified gateway that exposes hundreds of large language models from the major AI labs and independent providers. The actor lists every model with **prompt and completion prices normalized to USD per million tokens**, context length, modality, tokenizer family, supported parameters, knowledge cutoff, and links back to the canonical OpenRouter model page.

You can search by free-text query, narrow to a single provider like **OpenAI** or **Anthropic**, restrict to a modality such as `text+image->text`, set minimum context length, and cap maximum prompt or completion price. A `freeOnly` flag returns just the no-cost models, which is handy for prototyping. Results sort by newest first, lowest price, or longest context. The output is flat JSON ready to feed into a price comparison dashboard, an AI gateway selector, or a cost-aware routing layer in your own app.

| 🎯 Target audience | 💼 Primary use cases |
|---|---|
| AI app builders | Choose the cheapest model that meets your context and modality needs |
| FinOps and procurement | Track LLM unit economics across vendors over time |
| ML researchers | Survey the available open and proprietary model landscape |
| Tooling and gateway vendors | Keep your in-app catalog in sync with OpenRouter |
| Content and developer marketing | Source up-to-date model spec tables for blog posts and docs |

---

### 📋 What the OpenRouter Models Pricing Scraper does

- 🔎 **Free-text search.** Match by model id, display name, or description fragments.
- 🏷️ **Provider filter.** Pick one of 55+ providers from a curated enum, including AI21, Anthropic, Cohere, DeepSeek, Google, Meta Llama, Mistral, OpenAI, Perplexity, Qwen, x-AI, and more.
- 🎨 **Modality filter.** Filter to `text->text`, `text+image->text`, `text->image`, or `text+audio->text` models in one click.
- 💰 **Price ceilings.** Set max prompt price and max completion price (USD per 1M tokens) to keep budget-friendly options.
- 📏 **Context length floor.** Only return models that handle at least N tokens of context.
- 🆓 **Free tier only.** Toggle `freeOnly` to surface models with zero prompt and completion cost for prototyping.
- 🔃 **Sort modes.** Newest first, ascending prompt price, ascending completion price, descending context, or alphabetical name.

Each record carries a full normalized fingerprint: model id, canonical slug, name, description, knowledge cutoff, context length, max completion tokens, input and output modalities, tokenizer, prompt and completion prices per million tokens, optional input-cache and image and web-search and internal-reasoning prices, moderation flag, Hugging Face id, supported parameters, default parameters, and a direct URL to the OpenRouter model page.

> 💡 **Why it matters:** Model pricing changes weekly. Without a fresh catalog you risk wiring your product to an overpriced or deprecated endpoint. This actor lets you re-pull the full landscape on demand and compare apples to apples on a single price unit.

---

### 🎬 Full Demo

🚧 Coming soon: a 3-minute walkthrough showing how to filter the catalog, compare prompt prices across providers, and export the result to a spreadsheet.

---

### ⚙️ Input

<table>
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>query</code></td><td>string</td><td>Free-text search across model id, name, and description.</td></tr>
<tr><td><code>provider</code></td><td>enum</td><td>Vendor prefix in the model id. 55+ values plus a blank for all.</td></tr>
<tr><td><code>modality</code></td><td>enum</td><td>One of <code>text-&gt;text</code>, <code>text+image-&gt;text</code>, <code>text-&gt;image</code>, <code>text+audio-&gt;text</code>.</td></tr>
<tr><td><code>minContextLength</code></td><td>integer</td><td>Minimum context window in tokens. Useful for filtering to 100k+ models.</td></tr>
<tr><td><code>maxPromptPricePerMillion</code></td><td>number</td><td>Max USD price per 1M input tokens.</td></tr>
<tr><td><code>maxCompletionPricePerMillion</code></td><td>number</td><td>Max USD price per 1M output tokens.</td></tr>
<tr><td><code>freeOnly</code></td><td>boolean</td><td>Restrict to models with zero prompt and completion price.</td></tr>
<tr><td><code>sortBy</code></td><td>enum</td><td><code>created</code>, <code>promptPrice</code>, <code>completionPrice</code>, <code>contextLength</code>, or <code>name</code>.</td></tr>
<tr><td><code>maxItems</code></td><td>integer</td><td>Free users 10, paid users up to 1,000,000.</td></tr>
</table>

Example: cheapest text-to-text models with at least 100k context.

```json
{
  "modality": "text->text",
  "minContextLength": 100000,
  "sortBy": "promptPrice",
  "maxItems": 20
}
````

Example: all Anthropic models under $5 per million completion tokens.

```json
{
  "provider": "anthropic",
  "maxCompletionPricePerMillion": 5,
  "sortBy": "created",
  "maxItems": 50
}
```

> ⚠️ **Good to Know:** OpenRouter prices its source data in USD per token, not per million. This actor multiplies by 1,000,000 and rounds to six decimals so every record uses one consistent unit. Filters such as `maxPromptPricePerMillion` apply to the normalized value.

***

### 📊 Output

Each record is a flat JSON object with the fields below.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `id` | string | `openai/gpt-chat-latest` |
| 🔗 `url` | string | `https://openrouter.ai/models/openai/gpt-chat-latest` |
| 🪪 `canonicalSlug` | string | `openai/gpt-chat-latest-20260505` |
| 🏷️ `name` | string | `OpenAI: GPT Chat Latest` |
| 📝 `description` | string | `GPT Chat Latest points to OpenAI's stable API alias...` |
| 🗓️ `createdAt` | string | `2026-05-05T16:56:52.000Z` |
| 🧠 `knowledgeCutoff` | string | `2025-08-31` |
| 📏 `contextLength` | number | `400000` |
| 📤 `maxCompletionTokens` | number | `128000` |
| 🎨 `modality` | string | `text+image+file->text` |
| 🎛️ `inputModalities` | array | `["text", "image", "file"]` |
| 🗣️ `outputModalities` | array | `["text"]` |
| 🔤 `tokenizer` | string | `GPT` |
| 💵 `promptPricePerMillion` | number | `5` |
| 💵 `completionPricePerMillion` | number | `30` |
| 🗃️ `inputCachePricePerMillion` | number | `0.5` |
| 🔎 `webSearchPrice` | number | `0.01` |
| 🛡️ `isModerated` | boolean | `true` |
| 🤗 `huggingFaceId` | string | `null` |
| ⚙️ `supportedParameters` | array | `["tools", "tool_choice", ...]` |
| 🎚️ `defaultParameters` | object | `{ "temperature": null, ... }` |
| 🔗 `links` | object | `{ "details": "/api/v1/models/.../endpoints" }` |
| ⏱️ `scrapedAt` | string | `2026-05-12T16:50:28.264Z` |

#### 📦 Sample records

<details>
<summary>Typical: flagship multimodal chat model</summary>

```json
{
  "id": "openai/gpt-chat-latest",
  "url": "https://openrouter.ai/models/openai/gpt-chat-latest",
  "canonicalSlug": "openai/gpt-chat-latest-20260505",
  "name": "OpenAI: GPT Chat Latest",
  "description": "GPT Chat Latest points to OpenAI's stable API alias chat-latest that always resolves to the latest Instant chat model used in ChatGPT.",
  "createdAt": "2026-05-05T16:56:52.000Z",
  "knowledgeCutoff": null,
  "contextLength": 400000,
  "maxCompletionTokens": 128000,
  "modality": "text+image+file->text",
  "inputModalities": ["text", "image", "file"],
  "outputModalities": ["text"],
  "tokenizer": "GPT",
  "promptPricePerMillion": 5,
  "completionPricePerMillion": 30,
  "isModerated": true,
  "huggingFaceId": null,
  "supportedParameters": ["frequency_penalty", "logit_bias", "logprobs", "max_tokens", "presence_penalty", "response_format", "seed", "stop", "structured_outputs", "tool_choice", "tools", "top_logprobs"],
  "scrapedAt": "2026-05-12T16:50:28.264Z",
  "inputCachePricePerMillion": 0.5,
  "webSearchPrice": 0.01
}
```

</details>

<details>
<summary>Edge case: extra-long context router alias</summary>

```json
{
  "id": "~openai/gpt-latest",
  "url": "https://openrouter.ai/models/~openai/gpt-latest",
  "canonicalSlug": "~openai/gpt-latest",
  "name": "OpenAI GPT Latest",
  "description": "This model always redirects to the latest model in the OpenAI GPT family.",
  "createdAt": "2026-04-27T19:32:14.000Z",
  "knowledgeCutoff": "2025-12-01",
  "contextLength": 1050000,
  "maxCompletionTokens": 128000,
  "modality": "text+image+file->text",
  "tokenizer": "Router",
  "promptPricePerMillion": 5,
  "completionPricePerMillion": 30,
  "isModerated": true,
  "inputCachePricePerMillion": 0.5,
  "webSearchPrice": 0.01,
  "scrapedAt": "2026-05-12T16:50:28.264Z"
}
```

</details>

<details>
<summary>Sparse: small-tier model with minimal optional fields</summary>

```json
{
  "id": "~openai/gpt-mini-latest",
  "url": "https://openrouter.ai/models/~openai/gpt-mini-latest",
  "canonicalSlug": "~openai/gpt-mini-latest",
  "name": "OpenAI GPT Mini Latest",
  "description": "This model always redirects to the latest model in the OpenAI GPT Mini family.",
  "createdAt": "2026-04-27T19:34:31.000Z",
  "knowledgeCutoff": "2025-08-31",
  "contextLength": 400000,
  "maxCompletionTokens": 128000,
  "modality": "text+image+file->text",
  "tokenizer": "Router",
  "promptPricePerMillion": 0.75,
  "completionPricePerMillion": 4.5,
  "isModerated": false,
  "scrapedAt": "2026-05-12T16:50:28.264Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 💵 | **Prices in one unit.** USD per 1M tokens across every model, no math required. |
| 🏷️ | **55+ providers covered.** Curated enum lets you scope to any vendor in one click. |
| 🎨 | **Modality-aware.** Filter for vision, audio, image-out, or text-only models. |
| 📏 | **Context-aware.** Pull just the 100k+ or 1M+ context models when you need them. |
| 🆓 | **Free-tier toggle.** Surface only no-cost models for prototyping. |
| ⚡ | **Single API call.** The actor reads the full catalog in one shot for fast runs. |
| 🔌 | **Integrates everywhere.** Land results in Sheets, Notion, Slack, or a database. |

> 📊 300+ models, 55+ providers, 1 free actor.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ OpenRouter Models Pricing Scraper** *(this Actor)* | Free tier available | Whole OpenRouter catalog | On-demand | Provider, modality, price, context | One JSON input |
| Manual catalog scraping | Engineering time | Per-vendor only | Manual | Custom code | High |
| Vendor pricing pages | Free | One vendor each | Inconsistent | None | Browser only |
| Paid model intelligence services | $100+ per month | Often broader | Daily | Vendor-specific | Account, key, SDK |

For teams that need to keep a live view of LLM cost and capability across vendors, this actor is the shortest path from question to spreadsheet.

***

### 🚀 How to use

1. 🔐 **Create a free Apify account.** Sign up at [Apify](https://console.apify.com/sign-up?fpr=vmoqkp) and claim the $5 starter credit.
2. 🎚️ **Open the actor.** Pick filters such as `provider`, `modality`, `minContextLength`, or `maxPromptPricePerMillion`.
3. 📋 **Optional: search.** Add a free-text query like `coding` or `reasoning` to narrow the list.
4. ▶️ **Run it.** Free users get a 10-row preview, paid users can pull up to 1,000,000 records per run.
5. 📤 **Export.** Download JSON, CSV, or Excel, or push results into Google Sheets, Airtable, Slack, Notion, or a database via Apify integrations.

> ⏱️ Total time from sign-up to first dataset: about 90 seconds.

***

### 💼 Business use cases

<table>
<tr><td width="50%">

#### 🛠️ AI product engineering

- Pick the cheapest model that meets latency and context needs
- Build a routing layer that adapts to price changes
- Audit model usage cost across feature flags
- Compare tokenizer families for prompt budgeting

</td><td width="50%">

#### 💼 FinOps and procurement

- Track LLM unit economics across vendors
- Benchmark vendor pricing against internal targets
- Forecast spend by mapping volume to current rates
- Snapshot pricing for vendor contract reviews

</td></tr>
<tr><td width="50%">

#### 📊 Analytics and BI

- Dashboards that compare price per million tokens across providers
- Trend reports on model launches and price moves
- Coverage maps of modality availability
- Inventory of models with image or audio input

</td><td width="50%">

#### 📣 Developer marketing

- Always-current spec tables for blog posts and docs
- Comparison charts for product launches
- Newsletter data for AI-cost roundups
- Course material with real, current numbers

</td></tr>
</table>

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Empirical datasets for papers, thesis work, and coursework
- Longitudinal studies tracking changes across snapshots
- Reproducible research with cited, versioned data pulls
- Classroom exercises on data analysis and ethical scraping

</td>
<td width="50%">

#### 🎨 Personal and creative

- Side projects, portfolio demos, and indie app launches
- Data visualizations, dashboards, and infographics
- Content research for bloggers, YouTubers, and podcasters
- Hobbyist collections and personal trackers

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Transparency reporting and accountability projects
- Advocacy campaigns backed by public-interest data
- Community-run databases for local issues
- Investigative journalism on public records

</td>
<td width="50%">

#### 🧪 Experimentation

- Prototype AI and machine-learning pipelines with real data
- Validate product-market hypotheses before engineering spend
- Train small domain-specific models on niche corpora
- Test dashboard concepts with live input

</td>
</tr>
</table>

***

### 🔌 Automating OpenRouter Models Pricing Scraper

Drive this actor from your own stack with a few lines of code.

- Trigger runs from **Node.js** using the [Apify JavaScript client](https://docs.apify.com/api/client/js/)
- Trigger runs from **Python** using the [Apify Python client](https://docs.apify.com/api/client/python/)
- Read the [Apify REST API docs](https://docs.apify.com/api/v2) to call the actor over HTTP

Schedules let you re-pull the catalog every day or every hour. Pair a daily schedule with a webhook to push deltas into your pricing dashboard.

***

### ❓ Frequently Asked Questions

#### 💰 Is there a cost to run this Actor?

The actor itself is free to use on Apify. You pay only for the platform compute and storage you consume during a run. New accounts come with $5 of starter credit, which covers many small runs.

#### 🔑 Do I need an OpenRouter API key?

No. The actor reads the public OpenRouter model catalog endpoint, which does not require authentication. You only need an OpenRouter account if you later want to call the models themselves.

#### 📊 How many models are returned?

The catalog grows over time. As of the most recent run, OpenRouter publishes around 300 models across 55+ providers. The actor returns every model that matches your filters.

#### 💵 How is pricing normalized?

OpenRouter prices its source data in USD per token. The actor multiplies by 1,000,000 and rounds to six decimals so every record uses one consistent unit, prompt and completion. Optional unit prices for cached input and image input and web search are preserved as published.

#### 🎨 Which modalities are supported?

The modality enum covers `text->text`, `text+image->text`, `text->image`, and `text+audio->text`. The raw output also captures multi-input modalities like `text+image+file->text` exactly as published.

#### 🤝 Can I use this Actor for commercial use?

Yes. The OpenRouter catalog is a public listing of models offered by third-party providers. You are responsible for following any terms on the model pages themselves before you call those models in production.

#### 💳 Do I need a paid Apify plan?

A paid plan is not required. Free accounts can preview up to 10 rows per run. Paid plans unlock up to 1,000,000 rows per run plus larger storage and compute budgets.

#### 🆘 What if a run fails?

Open the run in the Apify console to inspect the log, the input, and any partial dataset. Network errors and upstream rate limits are surfaced as `error` items in the dataset rather than as silent crashes.

#### ⚖️ Is scraping this data legal?

The OpenRouter model catalog is a public listing. This actor reads only the published catalog endpoint with no login or token, so the data flow is the same one any browser or curl request would produce. Compliance with the source terms and local law remains your responsibility.

#### 🔎 Can I filter by provider name?

Yes. The `provider` input is an enum of vendor prefixes used in OpenRouter model ids (for example `anthropic`, `openai`, `meta-llama`). Pick one to restrict the catalog to that vendor.

#### 🆓 How do I find only the free models?

Set `freeOnly` to `true`. The actor returns every model whose prompt price and completion price are both zero.

***

### 🔌 Integrate with any app

Stream results into the tools your team already uses.

- [**Make**](https://apify.com/integrations) - low-code automation across thousands of apps
- [**Zapier**](https://apify.com/integrations) - trigger and route data into 6,000+ services
- [**n8n**](https://apify.com/integrations) - self-hosted workflow runner with native Apify support
- [**Slack**](https://apify.com/integrations) - notifications when runs complete or hit anomalies
- [**Google Sheets**](https://apify.com/integrations) - one-click dataset to spreadsheet sync
- [**BigQuery and Snowflake**](https://apify.com/integrations) - warehouse loads via webhook or schedule

***

### 🔗 Recommended Actors

- [**🐙 GitHub Trending Scraper**](https://apify.com/parseforge/github-trending-scraper) - track open-source AI and ML repos by language and date
- [**📦 NPM Packages Scraper**](https://apify.com/parseforge/npm-packages-scraper) - inspect Node.js AI client libraries by downloads and versions
- [**📚 Open Library Scraper**](https://apify.com/parseforge/open-library-scraper) - source AI and ML book metadata for content pipelines
- [**🔎 CrossRef Scraper**](https://apify.com/parseforge/crossref-scraper) - pull peer-reviewed AI research papers and citation graphs
- [**🌐 Wikidata Entity Search Scraper**](https://apify.com/parseforge/wikidata-entity-search-scraper) - enrich model metadata with structured entity references

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more data feeds across developer ecosystems, research, and AI tooling.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) and a human will reply within one business day.

***

> This Actor accesses publicly available data only. By using it you accept the responsibility to comply with the source's Terms of Service, rate limits, and applicable laws including data-protection regulations. The data is scraped on-demand from the upstream public API and is not cached or pre-stored by this Actor.

# Actor input Schema

## `query` (type: `string`):

Free-text search across model id, name and description. Leave empty for no text filter.

## `provider` (type: `string`):

Filter by model provider (vendor prefix in the model id, e.g. anthropic, openai, google).

## `modality` (type: `string`):

Filter by input/output modality

## `minContextLength` (type: `integer`):

Only include models with at least this many tokens of context (e.g. 100000 for 100k+).

## `maxPromptPricePerMillion` (type: `number`):

Only include models whose prompt price is at or below this value. E.g. 1.0 = under $1 per million input tokens.

## `maxCompletionPricePerMillion` (type: `number`):

Only include models whose completion price is at or below this value.

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

If enabled, returns only models with prompt and completion price both = 0 (free tier).

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

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

## `sortBy` (type: `string`):

Sort results by

## Actor input object example

```json
{
  "provider": "",
  "modality": "",
  "freeOnly": false,
  "maxItems": 10,
  "sortBy": "created"
}
```

# Actor output Schema

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

Overview of scraped data

## `fullData` (type: `string`):

Complete dataset

# 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,
    "sortBy": "created"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/openrouter-models-pricing-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,
    "sortBy": "created",
}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OpenRouter AI Model Pricing Scraper",
        "description": "Scrape AI model catalog and pricing from OpenRouter public API. Get prompt/completion price per token, context length, modality, top providers, and supported features for 300+ AI models. No API key required.",
        "version": "0.0",
        "x-build-id": "EnZEuYXdBZZnKge1n"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~openrouter-models-pricing-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-openrouter-models-pricing-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/parseforge~openrouter-models-pricing-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-openrouter-models-pricing-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/parseforge~openrouter-models-pricing-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-openrouter-models-pricing-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": {
                    "query": {
                        "title": "Search query (optional)",
                        "type": "string",
                        "description": "Free-text search across model id, name and description. Leave empty for no text filter."
                    },
                    "provider": {
                        "title": "Provider filter (optional)",
                        "enum": [
                            "",
                            "ai21",
                            "aion-labs",
                            "alfredpros",
                            "alibaba",
                            "allenai",
                            "amazon",
                            "anthracite-org",
                            "anthropic",
                            "arcee-ai",
                            "baidu",
                            "bytedance",
                            "bytedance-seed",
                            "cognitivecomputations",
                            "cohere",
                            "deepcogito",
                            "deepseek",
                            "essentialai",
                            "google",
                            "gryphe",
                            "ibm-granite",
                            "inception",
                            "inclusionai",
                            "inflection",
                            "kwaipilot",
                            "liquid",
                            "mancer",
                            "meta-llama",
                            "microsoft",
                            "minimax",
                            "mistralai",
                            "moonshotai",
                            "morph",
                            "nex-agi",
                            "nousresearch",
                            "nvidia",
                            "openai",
                            "openrouter",
                            "perceptron",
                            "perplexity",
                            "poolside",
                            "prime-intellect",
                            "qwen",
                            "rekaai",
                            "relace",
                            "sao10k",
                            "stepfun",
                            "switchpoint",
                            "tencent",
                            "thedrummer",
                            "undi95",
                            "upstage",
                            "writer",
                            "x-ai",
                            "xiaomi",
                            "z-ai"
                        ],
                        "type": "string",
                        "description": "Filter by model provider (vendor prefix in the model id, e.g. anthropic, openai, google).",
                        "default": ""
                    },
                    "modality": {
                        "title": "Modality (optional)",
                        "enum": [
                            "",
                            "text->text",
                            "text+image->text",
                            "text->image",
                            "text+audio->text"
                        ],
                        "type": "string",
                        "description": "Filter by input/output modality",
                        "default": ""
                    },
                    "minContextLength": {
                        "title": "Minimum context length (optional)",
                        "minimum": 0,
                        "maximum": 10000000,
                        "type": "integer",
                        "description": "Only include models with at least this many tokens of context (e.g. 100000 for 100k+)."
                    },
                    "maxPromptPricePerMillion": {
                        "title": "Max prompt price (USD per 1M tokens, optional)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Only include models whose prompt price is at or below this value. E.g. 1.0 = under $1 per million input tokens."
                    },
                    "maxCompletionPricePerMillion": {
                        "title": "Max completion price (USD per 1M tokens, optional)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Only include models whose completion price is at or below this value."
                    },
                    "freeOnly": {
                        "title": "Free models only",
                        "type": "boolean",
                        "description": "If enabled, returns only models with prompt and completion price both = 0 (free tier).",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "created",
                            "promptPrice",
                            "completionPrice",
                            "contextLength",
                            "name"
                        ],
                        "type": "string",
                        "description": "Sort results by",
                        "default": "created"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
