# LLM Pricing Scraper - OpenRouter AI Model & Token Costs (`bhole_krishna/llm-pricing-scraper`) Actor

LLM Pricing Scraper collects LLM API pricing for 450+ AI models from OpenRouter: price per million input and output tokens, plus every provider serving each model with its own cost, uptime, latency and throughput. Covers GPT, Claude, Gemini, Llama and more. No API key needed.

- **URL**: https://apify.com/bhole_krishna/llm-pricing-scraper.md
- **Developed by:** [Krishna Dubey](https://apify.com/bhole_krishna) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.

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 Pricing Scraper - OpenRouter AI Model & Token Costs

Know what every LLM API call costs — and which provider serves a model cheapest, fastest and most reliably.

This Actor collects the full OpenRouter catalogue (450+ AI models, including GPT, Claude, Gemini and Llama) with prices converted to **USD per million tokens**, and then, for each model, every provider serving it with that provider's own price, uptime, latency and throughput.

No API key needed.

### Why the provider breakdown matters

The same model is served by many providers at different prices and speeds. Claude Haiku 5.5, for example, is available from Anthropic, Google, Azure, Amazon Bedrock and others — same model, different price, different latency, different uptime. Most price lists stop at the model level and miss this entirely.

### What you get

Three kinds of row, each tagged with `type`:

**`model`** — one per model in the catalogue

| Field | Meaning |
| --- | --- |
| `modelId`, `name`, `author` | `anthropic/claude-haiku-5.5` |
| `inputPricePerMillionUsd` | Input price per 1M tokens |
| `outputPricePerMillionUsd` | Output price per 1M tokens |
| `cacheReadPricePerMillionUsd`, `cacheWritePricePerMillionUsd` | Prompt-caching prices |
| `contextLength`, `maxCompletionTokens` | Size limits |
| `inputModalities`, `outputModalities` | text, image, file, audio |
| `isFree` | Whether both token prices are zero |

**`provider_endpoint`** — one per provider serving that model

| Field | Meaning |
| --- | --- |
| `providerName` | Who actually serves it |
| `inputPricePerMillionUsd`, `outputPricePerMillionUsd` | That provider's price |
| `uptimeLast30m`, `uptimeLast1d` | Reliability |
| `latencyMsLast30m` | Time to first token |
| `throughputLast30m` | Tokens per second |
| `quantization` | fp8, bf16, unknown … |
| `supportsTools`, `toolChoiceModes` | Tool-calling support |

**`ollama_model`** — optional, models from the Ollama library that run on your own hardware (token price zero).

### Input

| Field | Type | Description |
| --- | --- | --- |
| `models` | array | Model ids or fragments, e.g. `anthropic/claude`. Empty collects the whole catalogue |
| `includeProviderBreakdown` | boolean | Fetch per-provider rows (default on) |
| `maxBreakdownModels` | integer | How many models to break down, cheapest first (default 25) |
| `includeOllama` | boolean | Also list the Ollama library |
| `maxPricePerMillionInputUsd` | integer | Drop models above this input price |
| `maxItems` | integer | Row cap |

#### Example input

```json
{
    "models": ["anthropic/claude", "openai/gpt-5"],
    "includeProviderBreakdown": true,
    "maxBreakdownModels": 10,
    "maxItems": 300
}
```

### Uses

- **Budgeting** — compare real per-million prices instead of per-token decimals
- **Provider selection** — find the cheapest provider that still meets your latency and uptime bar
- **Cost alerts** — schedule it daily and watch for price changes
- **Model shopping** — filter by price, context length or modality

### Notes and limits

- Prices come from OpenRouter's public catalogue. A provider's direct price can differ from what OpenRouter lists.
- Models tagged `:batch` are batch endpoints: cheaper, with no uptime or latency figures.
- The provider breakdown costs one request per model, so collecting it for the whole catalogue is slow. `maxBreakdownModels` keeps runs short.
- Prices are a snapshot of the moment the run happened.

### FAQ

**Do I need an OpenRouter account?**
No. The catalogue and endpoint data are public.

**Why are prices per million tokens when the API gives per token?**
Because that is how vendors quote and how teams budget. The raw values are fractions like `0.0000001`, which are awkward to compare.

**Does this include models not on OpenRouter?**
Not yet. Turn on `includeOllama` for locally-runnable open models.

# Actor input Schema

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

Model ids or parts of them, for example 'anthropic/claude' or 'gpt-5'. Leave empty to collect the whole OpenRouter catalogue.

## `includeProviderBreakdown` (type: `boolean`):

For each model, also collect every provider serving it, with that provider's own price, uptime, latency and throughput. This is one extra request per model.

## `maxBreakdownModels` (type: `integer`):

How many models to fetch provider details for, cheapest first. Keeps runs short when the catalogue is large.

## `includeOllama` (type: `boolean`):

Also list models from the Ollama library — these run on your own hardware, so their token price is zero.

## `maxPricePerMillionInputUsd` (type: `integer`):

Drop models above this input price. Leave empty for no limit.

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

Stop after saving this many rows.

## Actor input object example

```json
{
  "models": [
    "anthropic/claude",
    "openai/gpt-5"
  ],
  "includeProviderBreakdown": true,
  "maxBreakdownModels": 25,
  "includeOllama": false,
  "maxItems": 1000
}
```

# Actor output Schema

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

Models and provider endpoints.

## `providers` (type: `string`):

Per-provider prices, uptime and latency.

## `csv` (type: `string`):

The same rows as a spreadsheet.

# 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": [
        "anthropic/claude",
        "openai/gpt-5"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bhole_krishna/llm-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 = { "models": [
        "anthropic/claude",
        "openai/gpt-5",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bhole_krishna/llm-pricing-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 '{
  "models": [
    "anthropic/claude",
    "openai/gpt-5"
  ]
}' |
apify call bhole_krishna/llm-pricing-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bhole_krishna/llm-pricing-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/oz5gtlFvllmSTxLMi/builds/rhrNyOkPl72uKNjLd/openapi.json
