Read as Markdown · Use with an AI agent
Batch requests
POST /v1/batch runs up to 20 independent API operations in one request. Use it for independent lookups; a later call that needs an earlier result belongs in a sequential workflow.
Send a bounded batch
Authenticate with x-api-key; this route does not accept Bearer authentication. Each item supplies platform, endpoint and flat params. Prices, rate limits, admission and billing apply to each item separately. The wrapper has no additional credit charge. Use a capped key and inspect current catalogue prices before submission.
curl 'https://www.monocrawl.com/v1/batch' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{"requests":[{"platform":"tiktok","endpoint":"profile","params":{"handle":"nasa"}},{"platform":"instagram","endpoint":"profile","params":{"handle":"nasa"}}]}'The server processes up to five items concurrently and returns results in input order, with an index on each result. The 20-item maximum is not permission to exceed your key’s concurrency or rate limits. A malformed item can fail while its siblings succeed.
Check every item and its receipt
| Field | Interpretation |
|---|---|
| success on the wrapper | The batch was accepted. It does not establish that all items succeeded. |
| results[index] | Check status, success, error, request_id and credits_used for that item. Retain successful data even if another item failed. |
| succeeded / failed | Counts of item HTTP outcomes; inspect the individual envelopes for coverage warnings. |
| credits_used on the wrapper | Sum of numeric item charges. The current wrapper treats null item charges as zero in its sum, so the total is incomplete if any item has unresolved accounting. |
| credits_remaining | Lowest known balance observed by an item while the batch ran. Read credits/balance afterwards for current funds. |
Recover without replaying successful work
Batch does not forward a wrapper Idempotency-Key to its items. Do not blindly retry an entire batch after a timeout, and do not send a new copy merely because a transport error hid the results. Keep a secure manifest of item arguments and the time of submission, then inspect usage and request IDs.
For confirmed failed, uncharged read items, follow the error’s retry guidance. A new direct request can use its own saved idempotency key, but that key cannot retroactively protect the original batch item. If an item’s charge is null or pending_reconciliation, resolve it before further paid work.
When robust automatic recovery matters more than fewer HTTP requests, use direct idempotent calls with bounded concurrency. MCP call_endpoint executes one operation at a time; JSON-RPC batching is a different protocol feature and is not supported.