# LLM API Prices Scraper: Compare Cost per 1M Tokens (`hydrocore/llm-api-prices`) Actor

Compare AI model API prices across 200+ providers: input, output and blended price per 1M tokens, the cheapest provider per model, context window, tool calling, reasoning, image input and open weights. Live OpenRouter prices plus models.dev. Price-change monitor.

- **URL**: https://apify.com/hydrocore/llm-api-prices.md
- **Developed by:** [Hydrocore Data](https://apify.com/hydrocore) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.32 / 1,000 price rows

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

## LLM API Prices: Compare Every Model and Provider

Get the price of every large language model API from **200+ providers and gateways** in one table: **input, output and blended price per 1M tokens**, the **cheapest provider for each model**, how many providers sell it, **context window, max output, tool calling, reasoning, image input and open weights**. OpenRouter prices are read **live** from the OpenRouter API on every run; the other providers come from the open models.dev catalog. Filter by model, provider, context, price or capability, and turn on **monitor mode** to get only new and changed prices on a schedule. No API keys.

### ✅ What you get

- Input, output, blended, cache read and cache write price per 1M tokens (USD)
- Cheapest-provider flag and number of providers per model
- Context window, max output tokens, release date and knowledge cutoff
- Tool calling, reasoning, image input, open weights, input and output types
- Model ID to use with each provider and a docs link
- Monitor mode: new and changed prices with the previous price

### 🏆 Why this Actor

- **Every provider side by side:** the same model (for example Claude Sonnet 4.5) is matched across Anthropic, Bedrock, Azure, Vertex, OpenRouter and many gateways, so you see the spread and the cheapest one.
- **One number to compare:** a blended price (3 input : 1 output tokens) next to the raw input, output and cache prices.
- **Live where it matters:** OpenRouter prices change often and are read live every run instead of from a stale copy.
- **Price alerts:** monitor mode remembers prices and saves only new offers and price changes, with the previous price.
- **Agent-ready:** flat rows, stable keys, a summaryText sentence and field descriptions, so ChatGPT, Claude, n8n or an MCP agent can pick the cheapest model that meets its needs.

### 💡 Use cases

**Apify Store use cases:** Track products & prices · Feed AI agents & RAG · Market research

- Cut AI costs: find the cheapest provider for the model you already use
- Model routing: feed a router or agent the cheapest model with tools and 128k+ context
- Price alerts: daily schedule that reports any price change
- Market research: track providers, open-weight models and price trends
- AI agents (ChatGPT, Claude, n8n, MCP): "which provider sells model X cheapest?"

### 🚀 How to use

1. Type **model names** to find (or leave empty for all models).
2. Optional: pick providers, minimum context, a price ceiling or capabilities, and the sort.
3. Run, then open **Overview**, **Capabilities** or **Price changes**, or export the data. Schedule it with monitor mode for alerts.

### ⚙️ Input

| Field | What it does |
|---|---|
| `models` | Words matched against model names and IDs (default example: claude-sonnet-4-5, gpt-5-mini). Empty = all. |
| `providers` | Provider IDs or name parts (default all). |
| `onlyCheapestPerModel` | Only the cheapest paid provider per model; ties are all kept (default false). |
| `minContextTokens` | Minimum context window (default 0 = any). |
| `maxBlendedPricePer1M` | Max blended USD per 1M tokens (default any). |
| `requireToolCalling / requireReasoning / requireImageInput / onlyOpenWeights` | Capability filters (default off). |
| `includeFree` | Include $0 offers (default false). |
| `sortBy` | cheapest (default), largestContext, newest, model. |
| `maxResults` | Most rows to save, default 200, up to 20,000. |
| `onlyChanges / monitorKey` | Monitor mode: only new or changed prices since the last run with the same name (default off). |

Example input:

```json
{
  "models": [
    "claude-sonnet-4-5",
    "gpt-5-mini"
  ],
  "onlyCheapestPerModel": false,
  "requireToolCalling": true,
  "sortBy": "cheapest",
  "maxResults": 50
}
```

### ⬆️ Output

One row per model and provider. Every row has the same 32 keys in the same order; missing values are `null`. If nothing matches, one free `status` row explains why. The example is a real row from a test run of the current build.

Overview fields:

| Field | Type | Example | Description |
|---|---|---|---|
| `modelName` | string | "Claude Sonnet 4.5 (latest)" | Model name as shown by the provider. |
| `provider` | string | "Anthropic" | API provider or gateway selling the model. |
| `inputPricePer1M` | number | 3 | USD per 1M input (prompt) tokens. |
| `outputPricePer1M` | number | 15 | USD per 1M output (completion) tokens. |
| `blendedPricePer1M` | number | 6 | USD per 1M tokens at 3 input : 1 output, the usual way to compare one number. |
| `isCheapestForModel` | boolean | false | true when no other paid provider offers this model for less (blended). null for $0 offers. |
| `providerCountForModel` | integer | 40 | How many providers offer this model (across all providers, before your filters). |
| `contextTokens` | integer | 200000 | Context window in tokens. |
| `toolCalling` | boolean | true | Supports tool / function calling. |
| `reasoning` | boolean | true | Reasoning (thinking) model. |
| `modelId` | string | "claude-sonnet-4-5" | The ID to use in this provider's API. |
| `summaryText` | string | "Claude Sonnet 4.5 (latest) on Anthropic: $3 input / $15 out… | Plain-English summary of the offer. |

All 32 fields (in order): `recordType`, `modelName`, `provider`, `inputPricePer1M`, `outputPricePer1M`, `blendedPricePer1M`, `isCheapestForModel`, `providerCountForModel`, `contextTokens`, `maxOutputTokens`, `toolCalling`, `reasoning`, `imageInput`, `openWeights`, `isFree`, `priceChange`, `previousBlendedPricePer1M`, `modelKey`, `modelId`, `providerId`, `cacheReadPricePer1M`, `cacheWritePricePer1M`, `inputModalities`, `outputModalities`, `family`, `releaseDate`, `knowledgeCutoff`, `providerDocsUrl`, `source`, `summaryText`, `inputValue`, `scrapedAt`.

Real row from a test run of the current build:

```json
{
  "recordType": "offer",
  "modelName": "Claude Sonnet 4.5 (latest)",
  "provider": "Anthropic",
  "inputPricePer1M": 3,
  "outputPricePer1M": 15,
  "blendedPricePer1M": 6,
  "isCheapestForModel": false,
  "providerCountForModel": 40,
  "contextTokens": 200000,
  "maxOutputTokens": 64000,
  "toolCalling": true,
  "reasoning": true,
  "imageInput": true,
  "openWeights": false,
  "isFree": false,
  "priceChange": null,
  "previousBlendedPricePer1M": null,
  "modelKey": "claude-sonnet-4-5",
  "modelId": "claude-sonnet-4-5",
  "providerId": "anthropic",
  "cacheReadPricePer1M": 0.3,
  "cacheWritePricePer1M": 3.75,
  "inputModalities": "text, image, pdf",
  "outputModalities": "text",
  "family": "claude-sonnet",
  "releaseDate": "2025-09-29",
  "knowledgeCutoff": "2025-07-31",
  "providerDocsUrl": "https://docs.anthropic.com/en/docs/about-claude/models",
  "source": "models.dev",
  "summaryText": "Claude Sonnet 4.5 (latest) on Anthropic: $3 input / $15 output per 1M tokens (blended $6). Context 200,000 tokens. Supports tool calling, reasoning, image input. 40 providers offer this model.",
  "inputValue": null,
  "scrapedAt": "2026-11-13T21:30:34.608Z"
}
```

Views: **Overview**, **Capabilities**, **Price changes**, **Detailed (all fields)**. Export as JSON, CSV, Excel, XML or HTML from the Storage tab or the API (`/datasets/{id}/items?format=csv&view=overview`). The run summary (`OUTPUT` record in the key-value store) counts offers loaded from each source, duplicates, rows filtered out, unchanged (monitor), over the cap and saved, plus any source warnings.

### 💰 Pricing

Competitive pricing, pay per result: **$0.0004 per price row** on the Free plan, less on higher plans, plus the $0.0005 Actor start. 200 rows cost about $0.08; a full table of all paid offers (about 8,300 on 2026-11-13) about $3.30. Filtered, unchanged (monitor) and over-cap offers are never charged.

| Event | What it is | Free | Bronze | Silver | Gold+ |
|---|---|---|---|---|---|
| Price row | One model x provider price offer saved. Filtered, unchanged (monitor) and over-cap offers are free. | $0.0004 | $0.00037 | $0.00034 | $0.00032 |
| Actor start | Once per run (Apify standard start event, per GB of memory; the default 256 MB = one fee) | $0.0005 | $0.0005 | $0.0005 | $0.0005 |

### 🔁 Integrations

Works with the Apify API, MCP (AI agents), Make, n8n, Zapier, Google Sheets and webhooks. Field names are stable camelCase, so mappings do not break between runs.

### ❓ FAQ

**Where do the prices come from?**

OpenRouter prices come live from the public OpenRouter models API on each run. All other providers come from models.dev, an open-source catalog of model prices and limits maintained by the community and providers. Prices are list prices in USD per 1M tokens.

**How is the blended price calculated?**

(3 x input price + 1 x output price) / 4, the common way to compare models with one number. Use the input and output columns if your workload is different.

**How are the same models matched across providers?**

By modelKey: the model ID in lower case with the vendor prefix, version suffix and release date removed (claude-sonnet-4-5-20250929 and anthropic/claude-sonnet-4.5 both become claude-sonnet-4-5). Variants with different names may still appear as separate keys.

**Why are $0 offers hidden?**

Some providers list models at $0 because they are free tiers or included in a subscription. That would put them above every real price, so they are off by default. Turn on Include free / $0 offers to see them.

**Is the cheapest provider always the best choice?**

No. Gateways and resellers can differ in speed, rate limits, data policy and reliability. Use the cheapest flag as a starting point and check the provider before switching.

**How fresh is the data?**

OpenRouter is live. The catalog is read fresh on every run; how often each provider entry is updated depends on the catalog, so always check the provider docs (providerDocsUrl) before committing.

**How does monitor mode work?**

The Actor stores the blended price of every offer under your monitor name. The next run saves only offers that are new or whose price changed, with previousBlendedPricePer1M. The first run saves everything that matches.

**Are embeddings or image models included?**

No. Only token-priced chat and text models are included; embedding, image, speech and video models use other price units.

**How fast is it?**

A few seconds. The two sources are downloaded once per run and filtered in memory.

**Is it good for AI agents?**

Yes. An agent can ask for the cheapest provider for a model with tool calling and a minimum context, and get flat rows with model IDs it can call directly.

### Ready-made examples

- [Cheapest providers for popular LLM models](https://apify.com/hydrocore/llm-api-prices/examples/cheapest-providers-for-popular-llm-models)

### 🛟 Support

Found a problem or need a field? Open an issue on the Issues tab; we read every issue.

### Changelog

- 1.0 (2026-11-13): first release.

# Actor input Schema

## `models` (type: `array`):

Words matched against model names and IDs (any match), for example claude-sonnet-4-5, gpt-5-mini, llama, deepseek. Empty = every model.

## `providers` (type: `array`):

Keep only these providers (ID or part of the name: openai, anthropic, google, amazon-bedrock, azure, groq, together, openrouter ...). Empty = all.

## `onlyCheapestPerModel` (type: `boolean`):

Keep only the provider with the lowest blended price for each model (across all providers, not only the ones you filtered). Providers tied at the lowest price are all kept.

## `minContextTokens` (type: `integer`):

For example 128000 or 1000000. 0 = any.

## `maxBlendedPricePer1M` (type: `string`):

Keep offers at or below this blended price (3 input : 1 output tokens), for example 1 or 0.5. Empty = any.

## `requireToolCalling` (type: `boolean`):

Only models that support tool / function calling.

## `requireReasoning` (type: `boolean`):

Only reasoning (thinking) models.

## `requireImageInput` (type: `boolean`):

Only models that accept images.

## `onlyOpenWeights` (type: `boolean`):

Only models with downloadable (open) weights.

## `includeFree` (type: `boolean`):

Also save offers priced at $0 (free tiers and subscription-included models). Off by default so price comparisons stay clean.

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

Order of the saved rows. Sorting happens before Max results.

## `maxResults` (type: `integer`):

Most rows to save (default 200, up to 20,000).

## `onlyChanges` (type: `boolean`):

Remember prices between runs and save only offers that are new or whose blended price changed. Schedule it daily for price alerts. The first run saves everything.

## `monitorKey` (type: `string`):

Name of the memory used by monitor mode. Use different names for different watch lists. Default: default. Example: daily-watch-1.

## Actor input object example

```json
{
  "models": [
    "claude-sonnet-4-5",
    "gpt-5-mini"
  ],
  "onlyCheapestPerModel": false,
  "minContextTokens": 0,
  "requireToolCalling": false,
  "requireReasoning": false,
  "requireImageInput": false,
  "onlyOpenWeights": false,
  "includeFree": false,
  "sortBy": "cheapest",
  "maxResults": 200,
  "onlyChanges": false
}
```

# Actor output Schema

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

Model, provider, prices, cheapest flag and key capabilities.

## `capabilities` (type: `string`):

Context, output, modalities and flags.

## `changes` (type: `string`):

Monitor mode: new and changed prices.

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

Every field for each row.

## `summary` (type: `string`):

Run summary: offers loaded per source, duplicates, filtered out, unchanged (monitor), over the cap, saved, source warnings and whether monitor mode was on its first run.

# 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 = {
    "models": [
        "claude-sonnet-4-5",
        "gpt-5-mini"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydrocore/llm-api-prices").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 = { "models": [
        "claude-sonnet-4-5",
        "gpt-5-mini",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hydrocore/llm-api-prices").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 '{
  "models": [
    "claude-sonnet-4-5",
    "gpt-5-mini"
  ]
}' |
apify call hydrocore/llm-api-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydrocore/llm-api-prices"
        }
    }
}
```

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/q9raVPhpKvV5inEuG/builds/WuqQKUAWRYrqD0Dv7/openapi.json
