# AI Model Pricing Tracker (`naimhasan/ai-model-pricing`) Actor

Track real-time AI pricing: 445+ API models and 65 subscription plans from OpenAI, Anthropic, Google, xAI, Mistral, GitHub, Cursor, and more. Filter by provider, price, or sort order. Export JSON data for cost analysis and budgeting.

- **URL**: https://apify.com/naimhasan/ai-model-pricing.md
- **Developed by:** [Sakib Al Hasan Naim](https://apify.com/naimhasan) (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 usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## AI Model Pricing Tracker

Real-time pricing for 445+ AI models and 65 subscription plans from 13 providers — all in one place.

### What It Does

Fetches current API pricing (per-token costs) and subscription plans from OpenRouter and major AI providers. Every run returns fresh, structured JSON data you can use for cost analysis, budgeting, market research, and competitive intelligence.

### Data Included

- **445+ API models** — input, output, cache pricing per million tokens
- **65 subscription plans** — ChatGPT, Claude, Gemini, Grok, Copilot, Cursor, Windsurf, Mistral, Perplexity, Replit, and more
- **13 providers** — OpenAI, Anthropic, Google, xAI, Mistral, Microsoft, GitHub, Cursor, Windsurf, Replit, Perplexity, Cohere, Meta

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `providers` | string\[] | \[] | Filter by provider (e.g. `["openai", "anthropic"]`) |
| `minPrice` | number | 0 | Minimum prompt price ($/M tokens) |
| `maxPrice` | number | 0 | Maximum price (0 = no limit) |
| `includeFree` | boolean | true | Include free models |
| `sortBy` | string | "price-asc" | Sort: price-asc, price-desc, name, context-desc |

### Output Schema

Each API model entry:

```json
{
  "model_id": "openai/gpt-4o",
  "name": "GPT-4o",
  "provider": "openai",
  "type": "api",
  "pricing": {
    "prompt_per_m_tokens": 2.5,
    "completion_per_m_tokens": 10.0,
    "cache_read_per_m_tokens": 1.25
  },
  "context_length": 128000,
  "is_free": false
}
```

Each subscription plan entry:

```json
{
  "provider": "openai",
  "plan_name": "ChatGPT Plus",
  "type": "subscription",
  "price_monthly_usd": 20,
  "features": ["GPT-5.6", "Deep Research", "Codex"],
  "url": "https://chatgpt.com/pricing/"
}
```

### How to Use

#### Quick Start

1. Add this Actor to your account
2. Click **Start** with default input (empty `{}`)
3. Check the **Dataset** tab for results

#### Filter by Provider

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

#### Find Cheapest Models (exclude free)

```json
{"includeFree": false, "sortBy": "price-asc", "maxPrice": 1.0}
```

#### Via API

```bash
## Set your token
export APIFY_TOKEN=your_token

## Run the Actor
curl "https://api.apify.com/v2/acts/asN08mVaKBET0T81t/runs?token=$APIFY_TOKEN" \
  -X POST \
  -d '{"providers": ["openai"]}' \
  -H 'Content-Type: application/json'

## Get results
curl "https://api.apify.com/v2/datasets/YOUR_DATASET_ID/items?token=$APIFY_TOKEN"
```

#### Via Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("naimhasan/ai-model-pricing").call(input={
    "providers": ["openai", "anthropic"],
    "sortBy": "price-asc"
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['model_id']}: ${item['pricing']['prompt_per_m_tokens']}/M")
```

#### Via JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('naimhasan/ai-model-pricing').call({
    providers: ['openai', 'anthropic'],
    sortBy: 'price-asc'
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(item => console.log(`${item.model_id}: $${item.pricing.prompt_per_m_tokens}/M`));
```

### Use Cases

- **Cost optimization** — find the cheapest model for your workload
- **Market research** — track AI pricing trends over time
- **Budget planning** — estimate API costs before committing
- **Competitive analysis** — compare providers side by side
- **Product building** — power AI cost calculators or comparison tools

### Data Source

- API pricing: [OpenRouter](https://openrouter.ai/api/v1/models) (real-time, 445+ models)
- Subscription plans: Manually curated and verified against official pricing pages (last verified September 2026)

### Pricing

Free to use. Standard Apify platform compute costs apply.

### Updates

Data refreshes on every run. Subscription plans are updated when providers change pricing. Run the Actor on a schedule to track price changes over time.

***

**Built with ❤️ by [naimhasan](https://apify.com/naimhasan)**

# Actor input Schema

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

Provider names to include (empty = all). E.g. \["openai", "anthropic"]

## `minPrice` (type: `number`):

Only include models with prompt price >= this value

## `maxPrice` (type: `number`):

Only include models with prompt price <= this value (0 = no limit)

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

Whether to include free tier models in results

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

How to sort the results

## Actor input object example

```json
{
  "providers": [],
  "minPrice": 0,
  "maxPrice": 0,
  "includeFree": true,
  "sortBy": "price-asc"
}
```

# Actor output Schema

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

No description

# 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("naimhasan/ai-model-pricing").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("naimhasan/ai-model-pricing").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 naimhasan/ai-model-pricing --silent --output-dataset

```

## MCP server setup

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

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/asN08mVaKBET0T81t/builds/zImMHAgfvHvLAlqPQ/openapi.json
