Zerocost

Zerocost developers

Everything for building on Zerocost: the REST API and OpenAPI spec, the MCP server, OAuth 2.0, the zerocost CLI and the @zerocost/sdk package.

Zerocost REST API

Public endpoints need no key. Account endpoints use OAuth 2.0. Errors are JSON with a stable code.

curl "https://zerocost.app/api/v1/search?q=payouts"
  • OpenAPI 3.1 spec

    Machine-readable description of every endpoint, with typed schemas and OAuth scopes.

  • API index

    Live list of endpoints and how each is authenticated.

  • Batch

    POST /api/v1/batch - up to 20 GET requests in one call.

  • Sandbox

    Call any account endpoint or MCP account tool with Authorization: Bearer zc_sandbox to get demo data without an account.

  • Versioning and deprecation policy

    Additive-only v1, Deprecation and Sunset headers at least 90 days before removal.

  • Docs search

    GET /api/v1/search?q= - keyword search across docs and product pages.

  • Pricing

    GET /api/v1/pricing - live revenue share, CPMs and dataset prices.

  • Your account

    GET /api/v1/me, /me/apps, /me/earnings, /me/api-keys with an OAuth token.

Zerocost MCP servers

Streamable HTTP MCP server for Claude, ChatGPT, Cursor and other agents. Public tools need no auth; account tools start an OAuth flow automatically.

claude mcp add --transport http zerocost https://zerocost.app/mcp
  • Product MCP server

    https://zerocost.app/mcp - get_pricing and get_quickstart without auth; whoami, list_my_apps, get_my_earnings, list_my_api_keys with OAuth.

  • Server card

    Name, transport, auth and tool schemas.

  • Docs MCP server

    https://zerocost.app/docs/mcp - documentation only, no auth: search_docs, get_doc, list_pages.

OAuth 2.0

Authorization code with PKCE, dynamic client registration (with Idempotency-Key support) and read-only scopes.

profile:read
See your name, company, role and email.
apps:read
See your apps and ad placements, including impressions, clicks and revenue.
earnings:read
See your earnings totals and payout history.
api_keys:read
See the names, environments and status of your API keys (keys are masked).

Zerocost CLI

The zerocost command searches the docs, prints pricing, scaffolds the SDK, and - after `zerocost login` - reads your apps, earnings and API keys. Add --json for scripts and agents.

npx @zerocost/cli docs "install the sdk"
npx @zerocost/cli login
npx @zerocost/cli earnings --json

Zerocost SDK

Add native ads and consent-gated data collection to a web app.

npm install @zerocost/sdk

For AI agents

Machine-readable entry points.

  • llms.txt

    Full product description for language models (docs index: /docs/llms.txt).

  • agents.md

    Where to start, what needs a human, and the rules.

  • Agent skill

    SKILL.md for installing and configuring the SDK.

  • Resource catalog

    Every agent-facing resource in one ARD catalog.

  • NLWeb

    Natural-language questions answered with schema.org results.

  • A2A agent

    Agent2Agent card for the Zerocost Q&A agent at /a2a.

  • Markdown pages

    Append .md to any page URL for a markdown version with frontmatter.

Questions? Contact the team or read the documentation.