Developers

EveryInfra API and MCP documentation

Choose a task from the public catalog, create an API key, and make your first call. This guide covers request examples, MCP setup, authentication, billing, and error handling.

One account for data, search, CAPTCHA solving, and a free AI API

EveryInfra provides 413 data collection capabilities across 90 platforms, 17 search tools, 52 CAPTCHA types, and an OpenAI-compatible AI API that is free after a top-up. Each product has its own endpoint, permissions, and request format.

  • Public catalogs can be read without an API key.
  • Authenticated endpoints use a Bearer API key.
  • MCP and REST share the same public capability contracts.

Quickstart

Send a real request

Create an API key in the console, read the relevant catalog, and send the platform or capability identifier exactly as listed. The response includes structured output and request-level billing data.

  • Set Authorization: Bearer YOUR_API_KEY.
  • Set Content-Type: application/json for JSON request bodies.
  • Use catalog identifiers and parameter names exactly as returned.
  • For slow tasks, large limits or batches, send "mode":"async" in the request body: you receive a job_id immediately and poll GET /api/v1/jobs/{job_id} for the result. A synchronous request must finish within 85 seconds; an async job is not bound by that limit.
Request
curl -X POST https://api.everyinfra.com/api/v1/social \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"tiktok","action":"search","params":{"keyword":"AI infrastructure","limit":10}}'
Response
{
  "id": "…",
  "platform": "tiktok",
  "action": "search",
  "results": [
    {
      "id": "…",
      "text": "…",
      "author_username": "…"
    }
  ],
  "count": 10,
  "billing": {
    "charged": true,
    "charged_usd": 0.005556,
    "balance_after_usd": 12.340122
  }
}

Find supported tasks in the public catalogs

Use the catalogs to check supported tasks, inputs, prices, and availability. The compact EveryData catalog lists the essentials for each action; use the full catalog for optional parameters, limits, and response fields. Refresh prices and availability as needed rather than hard-coding them.

ProductCatalog endpointWhat it describes
EveryDataGET /api/v1/social/catalog?compact=1Platforms, actions, required parameters, delivery modes, availability, and prices
EverySearchGET /api/v1/search/toolsSearch tools, request contracts, tiers, and prices
EverySolveGET /api/v1/captcha/typesCAPTCHA types, parameters, solution shapes, availability, and prices
AI APIGET /api/v1/modelsModels the AI API currently accepts; no API key needed

Authentication

Send the API key as a Bearer token. Authentication runs before parameter validation, so a request without a valid key receives 401 rather than parameter feedback. Keep keys out of browser code, logs, and public repositories.

  • Create separate keys for separate environments or workloads.
  • Rotate a key from the console when its scope or exposure changes.
  • Use the console's restrictions when a key should be limited to specific product lines, capabilities, or IP ranges.
  • Use the same key with GET /api/v1/account to check your balance (paid, bonus, and total), this month's top-up discount, the per-minute request limit, and the last 24 hours of usage. Amounts are in USD. The call is read-only, free, and does not count toward the per-minute limit.
  • In that response, balance.total_usd is paid plus bonus balance, and calls draw on the bonus balance first. bonus_expiring lists time-limited bonus amounts that have not expired yet. rate_limit.requests_per_minute is shared by every key on the account, and usage_24h can lag by about a minute.
  • For account-wide history (daily usage, recent calls, billing, the wallet ledger), the same key can read the console API, for example GET /portal/api/requests/{request_id}. The key needs account read access; these reads are free and limited to 60 per minute per account. The full list is in the Account section of the OpenAPI spec.
  • To let an AI change the account too, grant write scopes under API Keys → Restrict access: manage keys, change settings, and open or reply to tickets. All three are off by default and only you can turn them on, signed in to the console. Through a key, at most 20 keys and 10 tickets a day can be created; viewing or rotating full keys, changing permissions or IP allowlists, re-enabling keys, and payments always stay in the console. The Account section of the OpenAPI spec lists the endpoints, for example POST /portal/api/keys/{key_id}/disable.
  • To avoid polling, add an HTTPS endpoint under Settings → Webhooks in the console. We send a signed POST when the balance falls to your threshold or an async job finishes. Verify X-EveryInfra-Signature, an HMAC-SHA256 of the timestamp, a period and the raw body made with your signing secret; reject timestamps more than 5 minutes off and de-duplicate on the event ID, since failed deliveries are retried with backoff, up to 7 attempts.
account.sh
curl https://api.everyinfra.com/api/v1/account \
  -H "Authorization: Bearer YOUR_API_KEY"

POST /api/v1/social

EveryData

Collect data from 90 platforms with 413 supported actions. Choose a platform and action, then supply the inputs listed for that action.

GET /api/v1/social/catalog?compact=1

POST /api/v1/search

EverySearch

Choose from 17 tools to search the web and retrieve source text. Specify the tool identifier and supply its required inputs.

GET /api/v1/search/tools

POST /api/v1/captcha

EverySolve

Solve 52 CAPTCHA types through one endpoint. Set the type field and supply the required inputs. You are charged for successful solutions.

GET /api/v1/captcha/types

POST /api/v1/chat/completions

AI API

OpenAI-compatible chat/completions, free for accounts that have topped up. Use it to clean, classify, extract, and summarize the data you collect.

GET /api/v1/models

Validate request parameters

Unknown parameters return 422 with the supported parameter list and, when available, a nearest-name suggestion. Invalid enum values return the allowed values. Parameters are not silently ignored or replaced with defaults.

  • Use snake_case parameter names from the catalog.
  • Treat did_you_mean as a repair hint, not a successful fallback.
  • For multi-target inputs, review the catalog's billing and limit rules before sending an array.

AI API (free after a top-up)

The AI API is OpenAI-compatible chat/completions. Any account that has topped up calls it at no charge, without using its balance, to clean, deduplicate, classify, extract, and summarize the data it collects; the prompt sets the output format.

  • With the OpenAI SDK, set base_url to https://api.everyinfra.com/api/v1 and send your EveryInfra API key in the Authorization: Bearer header; a ?key= in the URL is rejected.
  • The chat endpoint is POST /api/v1/chat/completions, with OpenAI's request and response format.
  • There are two models: gemini-3.6-flash, the default, and the lighter gemini-flash-lite. GET /api/v1/models returns the same list and needs no key. A misspelled model returns 422 with the likely correct name.
  • Streaming is supported: send stream: true to receive SSE that ends with data: [DONE], and add stream_options.include_usage for token usage.
  • messages may total up to 45,000 characters; larger inputs return 422 input_too_large, so split them into smaller requests.
ai_quickstart.py
from openai import OpenAI
import os

client = OpenAI(base_url="https://api.everyinfra.com/api/v1",
                api_key=os.environ["EVERYINFRA_API_KEY"])
reply = client.chat.completions.create(
    model="gemini-3.6-flash",
    messages=[{"role": "user", "content": "Return JSON only: label this review's sentiment, topic and intent."}],
)
print(reply.choices[0].message.content)

Limits by total top-ups, across all keys on the account

Total top-upsRequests per minuteIn flight
Topped up, under $100505
$100 or more50050
$500 or more5,000500

Trial credit and credit codes do not count toward total top-ups; an account that has never topped up gets 403 ai_topup_required. Tiers are ceilings, not guaranteed throughput.

StatusMeaning
403 ai_topup_requiredThe account has never topped up; any top-up enables the AI API.
429 rate_limitedThe per-minute limit was reached (per_minute_limit) or too many requests are in flight (concurrency_limit); wait for Retry-After, then retry.
503 ai_busyThe service is busy; retry after Retry-After.
403 ai_disabledThe AI API is paused for this account.
422 unknown_modelThe model does not exist; the message suggests the likely correct name.

The AI API is for organizing the data you collect with EveryInfra. If it is used for something else, or the calls look clearly abnormal, we may pause the AI API for that account; the account itself, its other APIs, and its balance are not affected.

MCP for AI agents

Use MCP when a compatible client should discover and call EveryInfra tools directly. The current discovery surface covers data, search, CAPTCHA, and AI chat through everyinfra_chat (free after a top-up, not streamed) while reusing each REST capability's authentication, billing, limits, validation, and balance-adjustment rules.

  • Configure the remote server URL and an EveryInfra API key in the client.
  • Use capability discovery before a data, search, or CAPTCHA call.
  • Keep the API key in the client's secret or environment configuration.
  • Call the free everyinfra_account tool (no arguments) to check the balance, discount, per-minute limit, and recent usage; it returns the same summary as GET /api/v1/account.
  • After a data call with mode: "async", read the result with the free everyinfra_get_job tool and the returned job_id; it returns the same view as GET /api/v1/jobs/{job_id}.
  • For account records, the free tools everyinfra_usage, everyinfra_requests, everyinfra_billing, everyinfra_keys, and everyinfra_tickets return daily usage, recent calls (look one up by request_id to see how its charge settled), spend and the wallet ledger, the key list, and support tickets. They need account read access on the key: keys without product-line limits can read usage, calls, and billing by default; product-limited keys and ticket access are enabled under API Keys → Restrict access in the console.
  • When the account needs funds, everyinfra_topup_link returns the console top-up page; the account owner pays there, and the tool never creates a payment or charges anything.
  • Once the account owner grants write scopes to the key in the console, an AI can also use everyinfra_key_create, everyinfra_key_update, everyinfra_key_disable, everyinfra_key_delete, everyinfra_settings_update, everyinfra_webhook_set, everyinfra_webhook_test, everyinfra_ticket_create, and everyinfra_ticket_reply. A key created this way is never broader than the calling key and never gets write scopes, console-created keys can only be disabled, and every change shows up in the console's notifications.
Endpoint
POST /mcp
Transport
Streamable HTTP, stateless
Tools
Tool names under the everyinfra_* namespace are public client contracts.

Understand charges and balance adjustments

Check the public catalog for the price and billing unit of the capability you need. Each response records the amount charged. For products billed on successful delivery, failed or empty results are not charged.

  • Do not convert internal wallet units into currency in your client.
  • Display the currency and amounts returned by the API, and use them to reconcile charges.
  • When a delivery-based operation does not complete, no final charge remains and any reserved amount returns to the account balance automatically.
  • Each paid response's billing object includes charged_usd, the amount charged for that call in USD (0 when nothing was charged, null while the outcome is still unknown), and balance_after_usd, the wallet balance once the call settles (null if it cannot be read). Watch balance_after_usd during a batch instead of polling the account.
  • When a failed call's reserved amount has been returned, the error body's billing also carries balance_after_usd.

Error handling

Read the HTTP status and error body together. Validation errors explain which inputs to fix. Before retrying, check what failed and whether repeating the request could duplicate an action.

StatusMeaningAction
401Missing, invalid, or disabled API keyCheck the Bearer token and key status.
402Insufficient wallet balanceCheck the current balance with GET /api/v1/account, then fund the account or reduce the request scope.
404Unknown route or resourceCheck the endpoint and resource identifier.
422Invalid parameter, value, platform, action, or typeRead supported values and did_you_mean from the response.
429Rate limit reachedWait for Retry-After before retrying. The limit is per account, with all API keys counted together; a key can also have its own lower limit.
5xxThe request could not be deliveredRecord the request ID. For timeout (timeout), retry the same request with "mode":"async" to receive a job_id instead of waiting.

Do catalog endpoints require an API key?

No. Public capability catalogs can be read before registration. Authenticated calls still require a valid Bearer API key.

Are MCP and REST separate products?

No. MCP is another way to access the currently discovered EveryInfra tools. Data, search, CAPTCHA, and AI chat reuse the corresponding REST authentication, billing, validation, rate-limit, and balance-adjustment rules.

Is the AI API free?

Yes. Any account that has topped up can call it without using its balance. Limits follow total top-ups: 50 requests per minute and up to 5 at once below $100; 500 and 50 from $100; 5,000 and 500 from $500; trial credit and credit codes do not count.

How do I check my balance from code?

Call GET /api/v1/account with the same Bearer API key. It returns your paid, bonus, and total balance in USD, this month's top-up discount, the per-minute request limit, and the last 24 hours of usage, without charging or counting toward the limit. Every paid response also includes billing.balance_after_usd.

Can an unsupported parameter be ignored?

No. Unknown parameters return 422 with supported values and a nearest-name suggestion when one can be determined.

How should I send a large batch of requests?

Use async mode: add "mode": "async" to the request body. Each call returns a job_id at once, and you poll GET /api/v1/jobs/{job_id} for the result. A synchronous call must finish within 85 seconds or it fails with a timeout (not charged); an async job is not bound by that limit.