Better Fetch

OpenRouter Models Pricing Scraper

Fetch and filter the public OpenRouter model catalog, returning normalized model pricing, context windows, modalities, tokenizer families, provider limits, supported parameters, Hugging Face IDs, and OpenRouter model URLs.

Aiv0.1.1~1 credit/runSource on GitHub

Overview

OpenRouter Models Pricing Scraper gives agents and product teams a structured snapshot of OpenRouter's public LLM catalog. Pull the catalog in one bounded request, filter by provider, modality, context length, free-only status, prompt price, completion price, or keyword, then return normalized rows with model IDs, canonical slugs, names, descriptions, providers, OpenRouter URLs, context windows, max completion tokens, modalities, tokenizer families, USD-per-million prompt and completion prices, cache and image pricing when published, moderation flags, Hugging Face IDs, supported parameters, reasoning labels, and details URLs. It is designed for AI gateway catalogs, cost-aware model routing, FinOps dashboards, procurement snapshots, model comparison pages, and agent-readable LLM capability inventories.

Last validated: Jul 3, 2026

Playground

Maximum model rows to return.

Optional free-text search across model id, name, description, and Hugging Face ID.

Sort mode after filtering.

Optional exact modality such as text->text or text+image->text.

Optional OpenRouter model id prefix such as anthropic, openai, google, meta-llama, mistralai, or qwen.

Only return models with zero prompt and completion prices.

Minimum context length in tokens.

Maximum prompt price in USD per 1M tokens.

Maximum completion price in USD per 1M tokens.

Sign in to run this tool

~1 credit per run · runs against your account

Input

limitintegerdefault: 25

Maximum model rows to return.

querystring

Optional free-text search across model id, name, description, and Hugging Face ID.

sort_by"created" | "name" | "context_length" | "prompt_price" | "completion_price"default: "created"

Sort mode after filtering.

modalitystring

Optional exact modality such as text->text or text+image->text.

providerstring

Optional OpenRouter model id prefix such as anthropic, openai, google, meta-llama, mistralai, or qwen.

free_onlybooleandefault: false

Only return models with zero prompt and completion prices.

min_context_lengthinteger

Minimum context length in tokens.

max_prompt_price_per_millionnumber

Maximum prompt price in USD per 1M tokens.

max_completion_price_per_millionnumber

Maximum completion price in USD per 1M tokens.

Output

countintegerrequired

Number of returned model rows

querystring

Query filter applied

modelsobject[]required

Filtered OpenRouter model catalog rows

modalitystring

Modality filter applied

providerstring

Provider prefix filter applied

source_urlstringrequired

OpenRouter catalog URL fetched

total_availableintegerrequired

Total model rows in the source catalog before filters

Examples

free-text-models

{
  "limit": 3,
  "sort_by": "context_length",
  "modality": "text->text",
  "free_only": true
}

anthropic-claude-search

{
  "limit": 2,
  "query": "claude",
  "sort_by": "created",
  "provider": "anthropic"
}

Use cases

Cost-aware routing

Filter OpenRouter models by context length, modality, and price ceiling before choosing candidates for an AI routing layer.

LLM FinOps dashboards

Normalize prompt and completion prices to USD per million tokens so finance and engineering teams can compare models quickly.

Model catalog enrichment

Add provider, tokenizer, supported-parameter, modality, context-window, Hugging Face, and OpenRouter URL fields to internal AI catalogs.

FAQ

Does OpenRouter Models Pricing Scraper require an OpenRouter API key?

No. Version 0.1 reads OpenRouter's public model catalog endpoint. You only need an OpenRouter key when you want to call the models themselves.

Does it call or benchmark the models?

No. It only reads catalog metadata and pricing. It does not send prompts, measure latency, or consume OpenRouter model credits.

How is pricing normalized?

OpenRouter publishes token-level prices. The tool multiplies token prices by 1,000,000 and returns USD-per-million-token fields for easier comparison.

Use it anywhere

MCP (Claude, Cursor, any client)

# Add the Better Fetch MCP connector (or paste the URL into
# Claude → Settings → Connectors → Add custom connector):
claude mcp add --transport http better-fetch https://betterfetch.co/api/mcp \
  --header "Authorization: Bearer bf_your_key_here"

# Then ask for the tool by name: openrouter_models_pricing_scraper

REST

curl -sS -X POST "https://betterfetch.co/api/tools/openrouter_models_pricing_scraper/run" \
  -H "Authorization: Bearer bf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": {"limit":3,"sort_by":"context_length","modality":"text->text","free_only":true}}'

Run locally

git clone https://github.com/better-fetch/tools/tree/main/tools/openrouter-models-pricing-scraper && cd openrouter-models-pricing-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"limit":3,"sort_by":"context_length","modality":"text->text","free_only":true}'