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
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"}]'
python
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

NameInTypeDescription
operation requiredquerystringA batchable catalog operation id, e.g. instagram.web_profile_info.
format queryndjson | json | csvMaterialized result format (overridable again at download). Default ndjson.
include_errors querybooleanFailed rows appear in the download as {input, error} instead of being dropped. Default false.
notify querystringHTTPS webhook POSTed once when the job reaches a terminal status.
auth_header querystringSent verbatim as Authorization on the webhook. Stored encrypted.

Request body

json
[
  {
    "handle": "nike"
  },
  {
    "handle": "adidas"
  },
  {
    "handle": "puma"
  }
]

Example response

The example response of the API reference.

json
{
  "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

StatusWhen
400The request parameters are invalid.
401Missing, malformed, or revoked API key.
402Balance is too low for this request.
413Too many rows (max 10,000) or body over 4 MB.
429Over 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.
502The upstream fetch failed. You are not charged.
503Billing could not be confirmed, so no upstream data was returned.
504The upstream request timed out. You are not charged.

Guides that use this endpoint