apidirect-io Batch API
Run up to 100 calls to any endpoints in one request.
Run up to 100 calls to any endpoints in one request.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/apidirect-io:apidirect-io-batch-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Direct Batch API
version: 1.9.1
description: 'Real-time public data from LinkedIn, Twitter/X, Reddit, YouTube, Instagram, TikTok, Facebook, Threads, Bluesky, Substack, Truth Social, Google Search, Google Maps, news sites, forums, Amazon and Trustpilot, through one REST API with one API key.
## Authentication
Send your API key in the `X-API-Key` header on every request. Create a free account at apidirect.io, then copy a key from the dashboard.
## Pricing
Pay per request with no subscription. Every endpoint has a monthly free tier, and each operation below lists its price. See Pricing.
## Errors
Every error is JSON with an HTTP status, a human-readable `error` and a machine-readable `code`, for example `{"error": "Missing API key", "code": "missing_api_key"}`. Retry 502, 503 and 504 responses, and 429 `concurrency_limit_exceeded` or `upstream_rate_limit`, with exponential backoff. See Error Handling.
## Limits
Up to 10 concurrent requests per endpoint per account; requests to different endpoints are counted separately. Use `POST /v1/batch` to run up to 100 calls in one request. See Rate Limits.'
termsOfService: https://apidirect.io/terms
contact:
name: API Direct support
url: https://apidirect.io
email: support@apidirect.io
x-logo:
url: https://apidirect.io/static/A.png
altText: API Direct
servers:
- url: https://apidirect.io
description: Production
security:
- ApiKeyAuth: []
tags:
- name: Batch
description: Run up to 100 calls to any endpoints in one request.
paths:
/v1/batch:
post:
tags:
- Batch
operationId: batchRequests
summary: Batch Requests
description: 'Run up to 100 API calls in one request, in any mix of endpoints. Items run concurrently server-side and each returns its own status and body, in input order. The JSON body can be at most 1 MB. Allow up to 13 minutes for a large batch to finish.
Batching is free: each item bills under its own endpoint at its normal rate and uses that endpoint''s free tier, exactly like a direct call. Items the batch could not get to return `status: 0` and are never billed.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BatchRequest'
example:
requests:
- endpoint: /v1/twitter/user
params:
username: naval
- endpoint: /v1/twitter/user
params:
username: paulg
- endpoint: /v1/instagram/user
params:
username: instagram
responses:
'200':
description: 'Per-item results. Check each item''s `status`: one item failing never fails the batch.'
content:
application/json:
schema:
$ref: '#/components/schemas/BatchResponse'
example:
results:
- index: 0
endpoint: /v1/twitter/user
status: 200
body:
user:
name: Naval
username: naval
followers: 2100000
- index: 1
endpoint: /v1/twitter/user
status: 200
body:
user:
name: Paul Graham
username: paulg
- index: 2
endpoint: /v1/instagram/user
status: 200
body:
user:
username: instagram
summary:
total: 3
succeeded: 3
failed: 0
duration_ms: 4200
'400':
description: Invalid batch body (`invalid_parameter`), or the call did not use an `X-API-Key` header (`unsupported_auth`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid API key (`missing_api_key`, `invalid_api_key`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Account blocked after a failed payment (`account_blocked`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'413':
description: Request body larger than 1 MB (`payload_too_large`). Split the batch into smaller ones.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Too many batches running at once for this account (`concurrency_limit_exceeded`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
externalDocs:
url: https://apidirect.io/docs/batch
components:
schemas:
BatchRequest:
type: object
required:
- requests
properties:
requests:
type: array
minItems: 1
maxItems: 100
description: The calls to run, 1 to 100 of them, in any mix of endpoints.
items:
$ref: '#/components/schemas/BatchRequestItem'
BatchResult:
type: object
properties:
index:
type: integer
description: Position of the item in `requests`.
endpoint:
type: string
description: The endpoint the item called.
tag:
type:
- string
- 'null'
description: The item's tag, when one was sent.
status:
type: integer
description: 'The item''s HTTP status: 2xx on success, the endpoint''s normal 4xx/5xx on error, or 0 when the item was not attempted (never billed).'
body:
type: object
description: Exactly what the endpoint returns when called directly, or its error body.
Error:
type: object
required:
- error
- code
properties:
error:
type: string
description: Human-readable error message.
code:
type: string
description: Machine-readable error code, such as `missing_parameter`, `invalid_parameter`, `missing_api_key`, `invalid_api_key`, `payment_required`, `account_blocked`, `not_found`, `concurrency_limit_exceeded`, `daily_limit_exceeded`, `monthly_limit_exceeded`, `upstream_rate_limit`, `upstream_error`, `upstream_timeout`, `service_unavailable`, `endpoint_suspended`, `payload_too_large` or `rate_limited`. New codes may be added.
example:
error: 'Missing required parameter: query'
code: missing_parameter
BatchRequestItem:
type: object
required:
- endpoint
properties:
endpoint:
type: string
pattern: ^/v1(/[a-z0-9\-]+)+$
description: The endpoint path to call, for example `/v1/twitter/user`. Every endpoint except `/v1/web/ai-mode` and `/v1/time` is allowed.
example: /v1/twitter/user
params:
type: object
maxProperties: 25
description: The query parameters the endpoint takes when called directly. Values must be strings or numbers (send booleans as "true").
additionalProperties:
oneOf:
- type: string
maxLength: 2000
- type: number
example:
username: naval
tag:
type: string
maxLength: 100
description: Optional label echoed back on this item's result.
BatchResponse:
type: object
properties:
results:
type: array
description: One result per request item, in input order.
items:
$ref: '#/components/schemas/BatchResult'
summary:
type: object
properties:
total:
type: integer
description: Number of items in the batch.
succeeded:
type: integer
description: Items that returned 2xx.
failed:
type: integer
description: Items that did not succeed.
duration_ms:
type: integer
description: Total batch execution time.
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: Your API key (starts with `ak_live_`), from https://apidirect.io/dashboard/keys.
externalDocs:
description: API Direct documentation
url: https://apidirect.io/docs