# apifare > A prepaid balance + key vault AI agents spend through: > no separate provider account or provider API key for eligible > capabilities — one apifare account gives your agent a > capped, auditable budget. Web search > has a no-key resold path (slug dataforseo, DataForSEO SERP, live Google, > 0.3 credits/call). Fetch a URL is the second no-key (slug scrape, > DataForSEO On-Page markdown, 0.3 credits/call). Weather is the cheap > third no-key demo (slug open-meteo, Open-Meteo commercial API, CC BY 4.0 > attribution, 0.1 credits/call). A no-key research kit rounds it out: > US SEC filings (slug sec-edgar, public domain, 0.3 credits/call) and the > UK company register (slug companies-house, open government data, > 0.3 credits/call). Other catalog APIs (web-search/Brave, scrapingbee, > weather/OpenWeather, fal) are BYOK via one-time vault links. On empty > balance the agent receives a machine-readable 402 with a top-up link. ## Install (MCP, stdio) - Product: apifare · human home: https://apifare.com (https://apifare.ai) - Human docs: https://apifare.com/docs - npm package: apifare-mcp (install this one; legacy install id: apipay-mcp, an older build) - Claude Code: claude mcp add apifare -e APIFARE_TOKEN= -- npx -y apifare-mcp - Auth env: APIFARE_TOKEN (required; APIPAY_TOKEN still works as a legacy alias) - Token prefix: new tokens are apifare_; apipay_ tokens keep working - Smithery: https://smithery.ai/servers/iamalanlui/apipay - Base URL: https://apifare.com (legacy https://apipay.fly.dev API paths keep working) - Remote MCP (Streamable HTTP, nothing to install): https://apifare.com/mcp with header Authorization: Bearer - Tools (apifare-mcp): search_apis, call_api, proxy_call, check_balance, get_vault_link, topup, vendor_call, secret_transfer, secret_generate. The remote /mcp endpoint has all of them except proxy_call. ## Getting a token POST https://apifare.com/v1/signup {"email":"..."} → bearer token (shown once) + 500 free credits. 1 credit = $0.01. Referral: include "referred_by":"" and BOTH accounts get +500 credits when the new account completes its first successful call. Optional "origin" field says where you found apifare (e.g. "smithery", "clawhub") — helps routing, never required. ## Key endpoints - Auth: every /v1/* and /proxy/* route needs Authorization: Bearer , except POST /v1/signup and POST /v1/token/recover. - GET /v1/search?q= find APIs and catalog tools (misses are logged as demand; ?limit= widens marketplace results, up to 25) - Integrating apifare into a HOST product? The integrator contract (conformance, fixtures, latency, retention): https://apifare.com/integrators (.md twin available) - POST /v1/call/{slug} call an API; debits credits; refunds on provider failure - GET /v1/balance balance + top-up links - GET /v1/history recent calls + ledger rows (metadata only; ?limit= up to 200) — audit past spend after a crash - POST /v1/keys /v1/keys/link vault your own provider keys. /v1/keys/link {"provider_slug": "..."} returns a one-time link for your human (never take keys in chat). BYOK APIs: web-search, scrapingbee, weather, fal; flat 0.1 credits/call. dataforseo (0.3 credits/call), scrape (0.3 credits/call), and open-meteo (0.1 credits/call) are resold — no user key. - Retry safety: when a call times out or fails ambiguously, retry it with the SAME x-idempotency-key header (1-128 chars of A-Za-z0-9_.:-) on POST /v1/call/{slug} and you cannot be charged twice: a reused key returns 409 DUPLICATE_CALL, debits nothing, and names the original call (call_id, slug, status, credits, ts). Bodies are never stored, so the first response cannot be replayed — read GET /v1/history for what it did, or use a NEW key for a genuinely new call. MCP: call_api takes an idempotency_key argument. - 402 PAYMENT_REQUIRED: relay the body's human_readable field to your human verbatim; after payment (or auto-refill at auto_refill.enable_url), retry the same call. topup_url is in the body too. - x402 (wallet agents, no account): when enabled, calling /v1/call/{slug} or /proxy/{provider}/... with NO bearer returns a 402 with x402 payment requirements (exact-amount USDC, hosted facilitator); retry with the X-PAYMENT header and the native response comes back with an X-PAYMENT-RESPONSE receipt. Same listed prices; failed provider calls are never settled. - /proxy/{provider}/{path} native provider APIs, response returned verbatim; headers x-apipay-credits-charged and x-apipay-balance. On apifare's key: dataforseo (0.3 credits), open-meteo (0.1 credits) and catalog tools (see Catalog tools below). On your vaulted key, 0.1 credits/call: brave, scrapingbee, openweather, fal, exa, firecrawl, elevenlabs, tavily. - POST /v1/topup agent-initiated top-up via the owner's standing auto-refill mandate (consent once at /mandate?ref=; threshold/ceiling owner-set; no mandate → the 402 with payment instructions) - POST /v1/support something broken? file {tool, expected, actual, request_ref?} — no payload bodies. Poll the returned status_url for the reply + fix link. - GET /status public service status (db, paused adapters, incidents) ## Integration guides - [Claude Code](https://apifare.com/integrations/claude-code) - [Claude Desktop](https://apifare.com/integrations/claude-desktop) - [Cursor](https://apifare.com/integrations/cursor) - [Windsurf](https://apifare.com/integrations/windsurf) - [Zed](https://apifare.com/integrations/zed) - [Cline](https://apifare.com/integrations/cline) - [GitHub Copilot (VS Code)](https://apifare.com/integrations/vscode) - [OpenAI Codex CLI](https://apifare.com/integrations/codex) - [Gemini CLI](https://apifare.com/integrations/gemini-cli) - [Hermes Agent](https://apifare.com/integrations/hermes) - [Kimi CLI](https://apifare.com/integrations/kimi-cli) - [Qwen Code](https://apifare.com/integrations/qwen-code) - [JetBrains (Junie)](https://apifare.com/integrations/jetbrains) - [Warp](https://apifare.com/integrations/warp) - [Raycast](https://apifare.com/integrations/raycast) - [n8n](https://apifare.com/integrations/n8n) - [Dify](https://apifare.com/integrations/dify) - [LangChain](https://apifare.com/integrations/langchain) - [LangGraph](https://apifare.com/integrations/langgraph) - [CrewAI](https://apifare.com/integrations/crewai) - [Vercel AI SDK](https://apifare.com/integrations/vercel-ai-sdk) - [LobeHub](https://apifare.com/integrations/lobehub) - [AnythingLLM](https://apifare.com/integrations/anythingllm) - [OpenClaw](https://apifare.com/integrations/openclaw) - [OpenAI Agents SDK](https://apifare.com/integrations/openai-agents-sdk) - [LlamaIndex](https://apifare.com/integrations/llamaindex) - [Mastra](https://apifare.com/integrations/mastra) - [Goose](https://apifare.com/integrations/goose) - [LibreChat](https://apifare.com/integrations/librechat) ## API guides - [YouTube](https://apifare.com/apis/youtube) - [Google Maps](https://apifare.com/apis/google-maps) - [Amazon](https://apifare.com/apis/amazon) - [TikTok](https://apifare.com/apis/tiktok) - [Reddit](https://apifare.com/apis/reddit) - [Google News](https://apifare.com/apis/google-news) - [Airbnb](https://apifare.com/apis/airbnb) - [Booking.com](https://apifare.com/apis/booking-com) - [Tripadvisor](https://apifare.com/apis/tripadvisor) - [Zillow](https://apifare.com/apis/zillow) - [Indeed](https://apifare.com/apis/indeed) - [eBay](https://apifare.com/apis/ebay) - [Trustpilot](https://apifare.com/apis/trustpilot) ## Model guides - [DeepSeek](https://apifare.com/models/deepseek) - [Kimi](https://apifare.com/models/kimi) - [Qwen](https://apifare.com/models/qwen) - [OpenAI GPT](https://apifare.com/models/gpt) - [Gemini](https://apifare.com/models/gemini) ## Guides - [Give your agent a budget](https://apifare.com/guides/give-your-agent-a-budget) - [One key for every API](https://apifare.com/guides/one-key-every-api) - [Scrapers and data tools under hard caps](https://apifare.com/guides/data-tools-under-hard-caps) ## Use cases - [Research agents](https://apifare.com/use-cases/research-agents) - [Lead generation and sales agents](https://apifare.com/use-cases/lead-generation) - [E-commerce and price monitoring](https://apifare.com/use-cases/ecommerce-and-pricing) - [Travel agents](https://apifare.com/use-cases/travel-agents) - [Social listening](https://apifare.com/use-cases/social-listening) - [Real estate agents](https://apifare.com/use-cases/real-estate-agents) ## Blog Each post as Markdown (the HTML page drops the .md): - [How to give your AI agent live web search without a search API key](https://apifare.com/blog/give-your-agent-live-web-search.md) - [How to pull Google Maps places and reviews into your AI agent](https://apifare.com/blog/google-maps-places-and-reviews-for-ai-agents.md) - [How to let your agent read any web page as clean markdown](https://apifare.com/blog/let-your-agent-read-any-web-page.md) - [How to pull SEC filings and UK company records into your AI agent](https://apifare.com/blog/sec-filings-and-uk-company-records.md) - [How to get YouTube transcripts into your AI agent](https://apifare.com/blog/youtube-transcripts-for-ai-agents.md) ## Notes for agents - Auth: Authorization: Bearer - First ask: "search the web for X". search_apis then call_api slug dataforseo with {q} (count/country/language optional). That path is resold — live Google, 0.3 credits, no user search key. Do not ask the human for a Brave key unless they want the BYOK web-search slug. - Second no-key: "fetch a URL". slug scrape with {url}, 0.3 credits. Returns transformed markdown (never raw HTML). Do not ask for a ScrapingBee key unless they want the BYOK scrapingbee slug. scrape is for HTML pages: a raw text/data URL (.txt .md .json .xml .csv .yaml .yml) is refused BEFORE any debit (400 BAD_REQUEST, zero credits) — fetch those directly with your own HTTP tool. If a page fails to parse, a specific article/page URL usually works where a bare homepage or a redirecting URL does not. - Third no-key demo: "what's the weather in London". slug open-meteo with {lat, lon, forecast?} (London is ~51.51, -0.13), 0.1 credits. Do not ask for an Open-Meteo or OpenWeather key unless they want the BYOK weather slug. Open-Meteo results include attribution (CC BY 4.0); keep it next to any weather you display. - No-key research kit: sec-edgar {company (ticker or CIK), form?, limit?} for US filings; companies-house {company, type?: search|profile| officers} for the UK register. No provider key or account needed; both carry attribution lines — keep them next to displayed data. - Billing rule: a call that DELIVERS bills as listed, even when the answer is "nothing found" (a search with zero results still ran and is billed — refine the query, don't retry it unchanged); a call where the provider FAILS to deliver is refunded, with machine-readable refunded:true + refund_credits in the error body. - Native-proxy responses (/proxy/...) pass provider bodies through VERBATIM, so refund state rides response HEADERS there, never JSON: x-apipay-credits-charged (what you paid), x-apipay-balance, and on a refunded failure x-apipay-refunded (the amount returned). Catalog calls (/v1/call/...) carry refunded:true in the JSON body instead. - Errors are structured JSON with error, message, and what unblocks you. Full catalog with unblock instructions: /errors.md - Per-agent governance (caps, allowlists, kill switch) may deny calls; the deny body says why and who can unblock it (unblock, scope). Allowlist denials are 403 (ADAPTER_DENIED, ADAPTER_NOT_ALLOWED); caps are 429 (PER_CALL_CAP_EXCEEDED, DAILY_CAP_REACHED, MONTHLY_CAP_REACHED). Do not retry these in a loop. AGENT_KILLED means stop: only the operator can revive the agent. - Catalog tools: /v1/search results with lane "apify" are ready-to-run tools (browse them at https://apifare.com/tools). They come back under results alongside built-in APIs (first-party lanes rank first). Each carries proxy_route (POST it with the tool's input JSON as the body), input_schema (the tool's input fields) and pricing_estimate: 5 credits reserved, settled to the run's true cost, never more than 20; failed runs are refunded. They run on apifare's own supply credential, so no vendor account is needed. risk_tier "byok-only" (monthly-rental tools) would need the owner's own token via the vault. (Catalog rule v2, 2026-09-13.) ## If you are an agent, do exactly this 1. Sign up: POST /v1/signup {"email": your human's email} -> save the token from the response NOW (shown once). 500 free credits. EMAIL_EXISTS with a lost token? POST /v1/token/recover {"email": ...} -> a one-time re-key link is emailed to that address; your human opens it, a NEW token is minted (old one dies), they hand it to you. 2. Discover, then call. GET /v1/search?q=... with Authorization: Bearer (401 without it). Two kinds of result: a) lane "master" or "vault" (built-in APIs): POST /v1/call/{slug} with the params object as the JSON body, e.g. {"q": "..."}. MCP: call_api. b) lane "apify" (catalog tools): POST the result's proxy_route with the tool's input JSON as the body (fields: input_schema). MCP: proxy_call (apifare-mcp over stdio). Native APIs you already know: /proxy/{provider}/{path}. 3. On HTTP 402: relay the body's human_readable field to your human VERBATIM, then stop and wait. After they pay (or enable auto-refill at the body's auto_refill.enable_url), retry the SAME call. 4. Risk tiers: reads (search/fetch/filings/registry/weather) are low-risk — just call them. Money-adjacent tools (topup) act only through owner-set limits. NEVER ask your human to paste provider API keys in chat — use get_vault_link / POST /v1/keys/link. 5. Acting on the OWNER'S infrastructure (credential broker): if the owner vaulted management credentials (mgmt:supabase, mgmt:vercel, mgmt:fly, mgmt:resend, mgmt:github, mgmt:npm, mgmt:cloudflare, mgmt:lemonsqueezy), you can call those vendors' NATIVE management APIs via /proxy/{vendor}/... — the root token is injected server-side and NEVER visible to you. Destructive/billing/member routes are blocked (MGMT_ACTION_DENIED). To move a secret between vendors use POST /v1/secrets/transfer {from:{vendor,resource,field}, to:{vendor,resource,key}} or mint one with POST /v1/secrets/generate — the value never appears in any response or in your context. Secrets move; they never show. 6. Something broken? POST /v1/support {tool, expected, actual} and poll the status_url. Service health: GET /status. Machine index of everything: /agents.json · /openapi.json · /catalog.json · /pricing.json · /llms-full.txt