POST /v1/batch/trigger
Batch API: run any endpoint over up to 10,000 inputs
Send a batchable operation id and a JSON array of inputs, each the same query or body the single call takes, and get a snapshot_id with the row count and estimated cost. Each row bills at the single-call price as it runs, failed rows are free, and the estimate must fit your balance. Add format, include_errors and a notify webhook as needed.
- Price
- Free
- Batch
- No
- Failed calls
- Not charged
Example request
curl -X POST 'https://api.virev.ai/v1/batch/trigger?operation=instagram.web_profile_info' \
-H "Authorization: Bearer $VIREV_API_KEY" \
-H 'Content-Type: application/json' \
-d '[{"handle":"nike"},{"handle":"adidas"},{"handle":"puma"}]'import os
import requests
response = requests.request(
"POST",
"https://api.virev.ai/v1/batch/trigger",
params={
"operation": "instagram.web_profile_info",
},
json=[{
"handle": "nike",
}, {
"handle": "adidas",
}, {
"handle": "puma",
}],
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
operation required | query | string | A batchable catalog operation id, e.g. instagram.web_profile_info. |
format | query | ndjson | json | csv | Materialized result format (overridable again at download). |
include_errors | query | boolean | Failed rows appear in the download as {input, error} instead of being dropped. |
notify | query | string | HTTPS webhook POSTed once when the job reaches a terminal status. |
auth_header | query | string | Sent verbatim as Authorization on the webhook. Stored encrypted. |
Request body
[
{
"handle": "nike"
},
{
"handle": "adidas"
},
{
"handle": "puma"
}
]Example response
The example response of the API reference.
{
"data": {
"snapshot_id": "s_c6841285ac67fa80",
"operation": "instagram.web_profile_info",
"status": "starting",
"rows_total": 3,
"estimated_cost": "$0.0015",
"created_at": "2026-11-25T18:52:37.121Z",
"expires_at": "2026-12-09T18:52:37.121Z"
},
"meta": {
"cost": "$0.0000",
"balance": "$326.8749",
"request_id": "req_e6d5e6a78eb33c21ef121a73fe85b8ef"
}
}How it works
Run an array of inputs against any batchable catalog operation. Each row is EXACTLY the input the single-call route takes — a JSON object of query params for GET operations, the request body for POST operations. Free to call; a flat pre-authorization (rows × single-call price) must fit your balance, and each row bills individually as it executes (failed rows are free). At most 10,000 rows and a 4 MB body.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
413 | Too many rows (max 10,000) or body over 4 MB. |
429 | Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged. |
502 | The upstream fetch failed. You are not charged. |
503 | Billing could not be confirmed, so no upstream data was returned. |
504 | The upstream request timed out. You are not charged. |