# AI API Pricing & Model Lifecycle Report (`taroyamada/ai-api-pricing-model-lifecycle-report`) Actor

Compare and watch official public pricing, model, deprecation, and release-note pages for OpenAI, Anthropic, and Gemini without API keys or model calls.

- **URL**: https://apify.com/taroyamada/ai-api-pricing-model-lifecycle-report.md
- **Developed by:** [naoki anzai](https://apify.com/taroyamada) (community)
- **Categories:** Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 ai model 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.

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

## 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 API Pricing & Model Lifecycle Report

This Apify Actor compares and watches official public pricing, model, deprecation, and release-note pages for three v1 providers: OpenAI, Anthropic, and Gemini.

It does not accept API keys, call model endpoints, send prompts, or use provider APIs. It emits source-linked normalized observations and arithmetic monthly token-cost scenarios from the `usageProfiles` input.

### Run the next report

- [Azure Retail Price Cost Impact Report](https://apify.com/taroyamada/azure-retail-price-cost-impact-report) monitors selected Azure retail meters and estimates monthly list-price impact.
- [AWS Cloud Pricing Cost Impact Report](https://apify.com/taroyamada/aws-cloud-pricing-cost-impact-report) provides the corresponding official AWS public-price workflow.

### Store Quickstart

Use `initialRunMode: "baseline_only"` for the first scheduled run. A complete source bundle is stored and the run emits zero rows and zero charges. The next run can use `mode: "watch"` with the same input. With `emitUnchanged: false`, an identical source snapshot emits zero rows and zero charges.

```json
{
  "providers": ["openai", "anthropic", "gemini"],
  "models": ["openai:gpt-4o", "anthropic:claude-sonnet-4-20250514", "gemini:gemini-2.5-flash"],
  "usageProfiles": [
    {
      "name": "standard-month",
      "inputUnits": 1000000,
      "outputUnits": 250000,
      "cacheUnits": 100000
    }
  ],
  "mode": "compare",
  "initialRunMode": "emit_current",
  "generateReport": true,
  "emitRawRows": true,
  "emitUnchanged": false,
  "maxChargeUsd": 12,
  "dryRun": false
}
```

`dryRun: true` uses deterministic local sample rows and never fetches a page or charges PPE. The fixture-backed parsers used by the test suite live under `fixtures/`.

### Output Rows

The shared deploy integration expects these exact `rowType` values:

- `ai_model_price_row`: one normalized model pricing record when `emitRawRows` is enabled.
- `ai_model_lifecycle_alert`: an official deprecation or shutdown observation.
- `ai_api_cost_comparison_report`: an aggregate report with `providerCount`, `scenarioCount`, `sourceUrl`, and an explicit `comparisonStatus`; rows with unpriced cache units set `monthlyCostUsd` to `null` and are not rankable.
- `ai_model_migration_report`: emitted only when an official source explicitly names a replacement; it contains `provider`, `modelId`, `replacementModelId`, and `sourceUrl`.
- `ai_pricing_export`: an export handoff emitted with raw model rows.

Every row has a stable identity, provider, source URL, normalized model fields, retrieval time, limitations, and prohibited interpretations. No recommendation or inferred replacement field is emitted.

### Inputs

- `providers`: `openai`, `anthropic`, and/or `gemini` only.
- `models`: optional exact IDs, `provider:modelId` selectors, or `*`/`?` wildcard selectors.
- `filters`: status, modality, context-window, deprecation, and model ID filters.
- `usageProfiles`: monthly `inputUnits`, `outputUnits`, and `cacheUnits`; optional cache read/write splits are supported, and an omitted cache quantity means zero.
- `mode`: `compare` or `watch`.
- `initialRunMode`: `baseline_only` or `emit_current`.
- `generateReport`, `emitRawRows`, `emitUnchanged`, `maxChargeUsd`, and `dryRun` control delivery and billing.

### PPE Pricing

There is no start charge. Only rows actually delivered through configured PPE events are billable:

| Event | Row type | Price |
| --- | --- | ---: |
| `ai-model-price-row` | `ai_model_price_row` | $0.01 |
| `ai-model-lifecycle-alert` | `ai_model_lifecycle_alert` | $0.25 |
| `ai-api-cost-comparison-report` | `ai_api_cost_comparison_report` | $3.00 |
| `ai-model-migration-report` | `ai_model_migration_report` | $5.00 |
| `ai-pricing-export` | `ai_pricing_export` | $2.00 |

The delivery layer validates the complete row batch before the first push, rejects unknown event names or mismatched row types, and refuses to deliver an Apify runtime row unless the provider returns `chargedCount >= 1`. `maxChargeUsd` is an all-or-nothing pre-delivery budget.

### Source and Safety Boundaries

Only hard-coded official provider source manifests are accepted. The pricing, models, and dedicated lifecycle pages are required; release notes are optional corroborating evidence and never override a dedicated lifecycle page. The web guard checks public network targets, robots policy, response size, timeout, redirect count, and actual access-challenge markers. Normal navigation text such as `Sign in` or `Contact sales` is not itself a challenge. Structural truncation, declared-count undercoverage, partial markers, blocked pages, and non-USD pricing fail closed. A rejected bundle is skipped, its prior provider and model state is not overwritten, and no row is charged for it.

Lifecycle statuses are copied only from explicit lifecycle evidence. `No shutdown date announced` does not create a shutdown, and a model removed from a complete catalog is reported as absent rather than silently reclassified. A later catalog reappearance is emitted as a separate lifecycle change.

`dryRun` rows use `sourceMethod: "local_deterministic_fixture"` and `sourceProvenance: "not_fetched_local_fixture"`; their official URLs are references only and were not fetched.

Read [source compliance](docs/source-compliance.md), [integration guide](docs/integration-guide.md), and [store competitive snapshot](docs/store-competitive-snapshot.md) for operational details.

### Local Tests

```bash
npm test
```

The suite uses only local fixtures and covers adapters, normalization, cost arithmetic, baseline/watch state, partial-source fail-closed behavior, robots and access challenges, exact row types, budget enforcement, and PPE charge capture.

# Actor input Schema

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

v1 provider adapters. Only OpenAI, Anthropic, and Gemini are supported.

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

Optional exact model IDs, provider:model selectors, or glob selectors. Empty means all models found in the selected providers.

## `filters` (type: `object`):

Optional status, modality, and context-window filters.

## `usageProfiles` (type: `array`):

Monthly input, output, and cache token units used for source-linked cost comparisons. Values are token counts, not API calls.

## `mode` (type: `string`):

Compare current official prices or watch for source-backed changes.

## `initialRunMode` (type: `string`):

baseline\_only stores a complete source baseline with zero rows; emit\_current emits current rows/reports on an empty baseline.

## `generateReport` (type: `boolean`):

Emit an aggregate cost-comparison report when eligible current or changed source data exists.

## `emitUnchanged` (type: `boolean`):

When false, identical watch snapshots emit zero rows and zero charges.

## `emitRawRows` (type: `boolean`):

Emit one normalized ai\_model\_price\_row per eligible model and an ai\_pricing\_export handoff row.

## `maxChargeUsd` (type: `number`):

Optional all-or-nothing PPE budget. Zero means no actor-side budget cap.

## `dryRun` (type: `boolean`):

Emit local fixture-derived sample rows without live fetches, model calls, or PPE charges.

## `snapshotKey` (type: `string`):

Optional stable state namespace for separate watch baselines.

## Actor input object example

```json
{
  "providers": [
    "openai",
    "anthropic",
    "gemini"
  ],
  "models": [],
  "filters": {},
  "usageProfiles": [
    {
      "name": "standard-month",
      "inputUnits": 1000000,
      "outputUnits": 250000,
      "cacheUnits": 0
    }
  ],
  "mode": "compare",
  "initialRunMode": "baseline_only",
  "generateReport": true,
  "emitUnchanged": false,
  "emitRawRows": false,
  "maxChargeUsd": 0,
  "dryRun": false,
  "snapshotKey": ""
}
```

# Actor output Schema

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

Rows written to the run default dataset, resolved from the run defaultDatasetId.

# 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("taroyamada/ai-api-pricing-model-lifecycle-report").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("taroyamada/ai-api-pricing-model-lifecycle-report").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 taroyamada/ai-api-pricing-model-lifecycle-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=taroyamada/ai-api-pricing-model-lifecycle-report",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/UjfMuSpu3E7RVZqhE/builds/7eHVTyiUY39Dfocq0/openapi.json
