# LLM Pricing Scraper — OpenRouter Model Prices & Changes (`agentdataco/llm-model-pricing-feed`) Actor

Scrape prices for 400+ LLMs (OpenAI, Anthropic, Google, DeepSeek, Meta, Mistral and more) from OpenRouter: input/output $ per 1M tokens, context length, modalities. Flags new models and price changes since your last run.

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

## Pricing

Pay per event

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 Model Prices & Price Changes

Get **LLM API pricing** for **400+ models** listed on OpenRouter (OpenAI, Anthropic, Google, DeepSeek, Meta, Mistral, xAI, Qwen and more): **input and output price per 1M tokens**, context length, modalities and tool support. Every run is compared with the previous one, so the Actor also tells you about **new models**, **price changes**, context changes and removed models.

### What does this LLM pricing scraper do?

It reads OpenRouter's public models API, normalises prices to USD per 1M tokens and compares the result with the snapshot saved by your last run (in a named key-value store). Filter by provider, search term or free models only, or set `onlyChanged` to get just the models that changed. No API key or login is needed. Prices are OpenRouter's listed prices and can differ from direct provider prices.

### Why use it?

- Public OpenRouter models API — no key needed
- Prices normalised to $ per 1M tokens
- Change detection: new_model / price_changed / context_changed
- Filter by provider, search term or free-only

### Data source

OpenRouter public models API `GET https://openrouter.ai/api/v1/models`. Prices are OpenRouter's listed prices and may differ from direct provider prices.

### Input

- **search**: Model name filter
- **providers**: Provider filter
- **freeOnly**: Free models only
- **onlyChanged**: Only new/changed since last run
- **stateStoreName**: Named store for snapshots

Example input:

```json
{
  "providers": [
    "openai",
    "anthropic",
    "google"
  ],
  "onlyChanged": false
}
```

### Output

Each dataset item looks like this:

```json
{
  "id": "anthropic/claude-sonnet",
  "provider": "anthropic",
  "promptUsdPer1M": 3,
  "completionUsdPer1M": 15,
  "contextLength": 200000,
  "isFree": false,
  "change": "unchanged"
}
```

Export as JSON, CSV, Excel or HTML, or pull via the Apify API, webhooks, Make, Zapier, n8n or the Apify MCP server.

### How much does it cost?

Pay per event: **$0.001 per run** + **$0.0005 per result** (≈ $0.50 per 1,000 results). You are never charged for results on a failed run: if no data is found, the run fails loudly with an explanation instead of returning an empty "success".

### Use cases

- AI cost dashboards and model routers
- Alerts when a model's price drops
- Directories and comparison sites keeping LLM prices current
- Analysts tracking LLM price trends

### Scheduling & monitoring

Schedule it daily or weekly in Apify Console and connect a webhook/Slack/email integration to get new items automatically.

### FAQ

**Is this legal?** It uses OpenRouter's public models API (no authentication). Prices are as listed by OpenRouter. No personal data is collected.

**Something broke?** Open an issue on the Issues tab; the actor is tested daily.

### Tips

**Tip: price-change alerts.** Schedule a daily run with `onlyChanged: true` and connect email, Slack or a webhook, and you hear about every LLM price cut or increase the day it happens. Keeping each run's dataset gives you a price history per model.

***

### More AI-ecosystem Actors from Agent Data Co

Built and maintained by **Agent Data Co**. Our Actors collect public AI-ecosystem data and work well together on a daily schedule:

- [GitHub Trending AI Repos Scraper](https://apify.com/agentdataco/github-ai-agent-tracker): AI agent, MCP and LLM repos with stars and topics
- [Show HN Scraper (Hacker News AI launches)](https://apify.com/agentdataco/hn-show-hn-ai-launches): new AI launches on Hacker News with points and comments
- [MCP Servers Scraper (official MCP registry)](https://apify.com/agentdataco/mcp-registry-exporter): every server in the official MCP registry
- [Hugging Face Scraper](https://apify.com/agentdataco/huggingface-trending): trending models, datasets and Spaces
- [SaaS Pricing Page Monitor](https://apify.com/agentdataco/ai-pricing-page-monitor): plan and price changes on any pricing page
- [App Store Reviews Scraper](https://apify.com/agentdataco/ai-app-reviews): iOS reviews for any app, by country

# Actor input Schema

## `search` (type: `string`):

Optional substring filter on model id/name, e.g. 'claude' or 'llama'.

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

Optional provider filter, e.g. openai, anthropic, google, x-ai, meta-llama.

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

Only models with $0 prompt and completion price.

## `onlyChanged` (type: `boolean`):

Output only models that are new or changed price/context since the previous run (uses the named state store).

## `stateStoreName` (type: `string`):

Named key-value store keeping the previous snapshot.

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

Cap on results.

## `allowEmpty` (type: `boolean`):

Do not fail on zero results.

## Actor input object example

```json
{
  "providers": [],
  "freeOnly": false,
  "onlyChanged": false,
  "stateStoreName": "llm-model-pricing-feed-state",
  "maxItems": 1000,
  "allowEmpty": false
}
```

# Actor output Schema

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

Dataset items produced by this run (one item per charged result).

## `runSummary` (type: `string`):

Count of results, duration and whether the charge limit was hit.

## `removedModels` (type: `string`):

Model IDs present in the previous snapshot but no longer listed.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("agentdataco/llm-model-pricing-feed").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("agentdataco/llm-model-pricing-feed").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 '{}' |
apify call agentdataco/llm-model-pricing-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agentdataco/llm-model-pricing-feed"
        }
    }
}
```

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/mii4UohAF0x9volDv/builds/W9MN7ppegdjhXZ9BC/openapi.json
