# FreeTier Agent API

> Pay-per-call data API for AI agents. No signup or API key: unpaid calls return HTTP 402 with x402 payment requirements (USDC on Base, eip155:8453). Pay, then retry with the PAYMENT-SIGNATURE (v2) or X-PAYMENT (v1) header. Every response cites its data sources. No personal data. Built with AI assistance by FreeTier Kits.

## Discovery
- [OpenAPI 3.1 spec](https://freetier-agent-api.pages.dev/openapi.json): all endpoints, parameters, prices (x-payment-info) and the 402 response
- [x402 discovery](https://freetier-agent-api.pages.dev/.well-known/x402): resource list and priced catalog

## Free (no payment)
- [GET /api/apis/sample](https://freetier-agent-api.pages.dev/api/apis/sample): 5 sample rows from the API directory
- [GET /api/mcp-servers/sample](https://freetier-agent-api.pages.dev/api/mcp-servers/sample): 5 MCP servers
- [GET /api/llm-pricing/sample](https://freetier-agent-api.pages.dev/api/llm-pricing/sample): prices for 5 popular models
- [GET /api/x402-services/sample](https://freetier-agent-api.pages.dev/api/x402-services/sample): 5 verified x402 APIs
- [POST /mcp](https://freetier-agent-api.pages.dev/mcp): MCP server (Streamable HTTP)
- [GET /health](https://freetier-agent-api.pages.dev/health)

## Paid endpoints (x402)
- [GET /api/apis/search](https://freetier-agent-api.pages.dev/api/apis/search): $0.01 per call. Search 2,230 link-checked public & free-tier APIs (59 categories). Filters: q, category, auth=none, alive=yes, https=yes, kind, limit<=50.
- [GET /api/free-tiers](https://freetier-agent-api.pages.dev/api/free-tiers): $0.01 per call. Current free-tier limits for developer services (hosting, DB, auth, email, CI, monitoring) and AI/LLM APIs, with official source URLs. Filter: q, category.
- [GET /api/robots-check](https://freetier-agent-api.pages.dev/api/robots-check): $0.01 per call. Check whether a URL may be crawled per the site's robots.txt for a given user-agent. Returns allowed, matched rule, crawl-delay, sitemaps.
- [GET /api/page-meta](https://freetier-agent-api.pages.dev/api/page-meta): $0.02 per call. Fetch a public web page (robots.txt respected) and return title, meta description, canonical, Open Graph/Twitter tags, language, headings, link counts, HTTP status.
- [GET /api/llm-pricing](https://freetier-agent-api.pages.dev/api/llm-pricing): $0.02 per call. AI model list prices (USD per 1M input/output/cached tokens, context window, vision/tools/reasoning flags) for ~3,000 models across OpenAI, Anthropic, Google, Mistral, Groq, Bedrock, Azure, Together, Fireworks and more, plus verified free tiers/rate limits of AI APIs. Filters: q, provider, free=yes, max_input_per_m, min_context, vision=yes, tools=yes, sort=input|output|context, limit<=100.
- [GET /api/llm-cost](https://freetier-agent-api.pages.dev/api/llm-cost): $0.01 per call. Token & cost calculator: estimate tokens for a text (or pass input_tokens/output_tokens) and price it across several models using provider list prices (LiteLLM price table, MIT). Params: models (comma list of model ids like gpt-4o-mini, claude-sonnet-4-5, gemini/gemini-2.5-flash or search words, max 15), text or input_tokens, output_tokens, calls.
- [GET /api/mcp-servers](https://freetier-agent-api.pages.dev/api/mcp-servers): $0.02 per call. Search 4,259 MCP (Model Context Protocol) servers by keyword, category, language (python/typescript/go/rust...), scope (cloud/local) and official flag. Returns repo URL and description.
- [GET /api/page-check](https://freetier-agent-api.pages.dev/api/page-check): $0.03 per call. One-call page audit for agents: HTTP status, redirects, latency, title, meta description, canonical, lang, Open Graph, JSON-LD types, headings, word count, plus agent-friendliness: robots.txt rules for 14 AI crawlers, llms.txt, sitemap, and a 0-100 score with reasons.
- [GET /api/link-check](https://freetier-agent-api.pages.dev/api/link-check): $0.05 per call. Check up to 20 URLs in one call: HTTP status, final URL after redirects, redirect count, latency, content-type, ok flag.
- [GET /api/country](https://freetier-agent-api.pages.dev/api/country): $0.002 per call. Country reference lookup by ISO2/ISO3/name: capital, population, area, continent, currency, phone prefix, TLD, languages, neighbours, time zones with current UTC offset and local time.
- [GET /api/holidays](https://freetier-agent-api.pages.dev/api/holidays): $0.002 per call. Public holidays for ~490 countries/territories for 2026 and 2027; optional date=YYYY-MM-DD answers is_holiday.
- [GET /api/currency](https://freetier-agent-api.pages.dev/api/currency): $0.002 per call. Currency conversion with official ECB euro reference rates (~30 currencies, daily). Params: from, to, amount. Also returns the rate date.
- [GET /api/base-gas](https://freetier-agent-api.pages.dev/api/base-gas): $0.01 per call. Live Base mainnet gas price (gwei), latest block, and estimated ETH cost of a USDC transfer (~65k gas) and a plain ETH transfer (21k gas).
- [GET /api/page-markdown](https://freetier-agent-api.pages.dev/api/page-markdown): $0.03 per call. Convert a public web page to clean Markdown (title, headings, paragraphs, lists, links, code), scripts/nav/footer removed, max ~60k chars. robots.txt respected.
- [GET /api/email-verify](https://freetier-agent-api.pages.dev/api/email-verify): $0.005 per call. Email address check WITHOUT sending mail or SMTP probing: RFC-style syntax check, domain MX/A records via DNS-over-HTTPS, disposable-domain flag (CC0 blocklist, ~9,900 domains), role-address flag (info@, support@...), free-mail flag. Verdict: deliverable_domain | risky | invalid. Cannot confirm that the mailbox itself exists. Addresses are not stored or logged.
- [GET /api/extract-json](https://freetier-agent-api.pages.dev/api/extract-json): $0.015 per call. Messy text + JSON Schema in, clean JSON out. Uses a small LLM (Cloudflare Workers AI, Llama 3.1 8B, JSON mode) when available, else a deterministic key:value/regex extractor; the result is type-checked against your schema and missing fields are null. Limits: text <= 6,000 chars, schema <= 30 top-level properties (flat objects, arrays of scalars); the model can misread ambiguous text, so check important values. Params: text, schema (JSON string), mode=auto|heuristic. GET query or POST JSON body.
- [GET /api/x402-services](https://freetier-agent-api.pages.dev/api/x402-services): $0.01 per call. Search ~8,900 live x402 pay-per-call APIs (verified/unverified by nohumans.directory probes, CC BY 4.0): name, endpoint URL, category, price, chains, status, score. Filters: q, category, chain, max_price, status=verified, limit<=100.
- [GET /api/agent-tools](https://freetier-agent-api.pages.dev/api/agent-tools): $0.01 per call. One search across ~13,000 agent tools: 4,259 MCP servers (awesome-mcp-servers, MIT) and ~8,900 x402 pay-per-call APIs (nohumans.directory, CC BY 4.0). Filters: q, type=mcp|x402, limit<=100.

## Full dataset dumps (x402)
- [GET /api/dataset/full](https://freetier-agent-api.pages.dev/api/dataset/full): $8 per call. Buy the full Verified API Directory dataset (2,230 rows, JSON, CC BY 4.0 + MIT sources) in one call.
- [GET /api/dump/mcp-servers](https://freetier-agent-api.pages.dev/api/dump/mcp-servers): $9 per call. Full MCP server directory dump (4,259 servers, JSON). Source awesome-mcp-servers (MIT).
- [GET /api/dump/llm-pricing](https://freetier-agent-api.pages.dev/api/dump/llm-pricing): $5 per call. Full dump: list prices of ~3,000 AI models (LiteLLM table, MIT) + verified AI/dev free tiers with limits (JSON).
- [GET /api/dump/world-reference](https://freetier-agent-api.pages.dev/api/dump/world-reference): $6 per call. Full dump: 252 countries (GeoNames, CC BY 4.0), 418 time zones, ~14,000 public holidays 2026-2027 (python-holidays, MIT). JSON.
- [GET /api/dump/x402-services](https://freetier-agent-api.pages.dev/api/dump/x402-services): $6 per call. Full dump: ~8,900 x402 pay-per-call APIs with category, price, chains and probe status (JSON). Data from nohumans.directory, CC BY 4.0, attribution required.
- [GET /api/dump/agent-tools](https://freetier-agent-api.pages.dev/api/dump/agent-tools): $7 per call. Full dump: Agent Tool Directory, ~13,000 MCP servers + x402 APIs in one unified schema (JSON). MIT + CC BY 4.0 sources, attribution included.

## Optional
- Contact: tec@mail.grokbot.com
