GET /v1/batch/snapshot/{snapshot_id}
Batch results API: download a batch job's rows as NDJSON, JSON or CSV
Send the snapshot_id of a finished batch job and get its rows in submission order, each with its input and data, or its error when include_errors is set. Pick format for NDJSON, JSON or CSV, and page large snapshots with batch_size and part. A job that is still running answers 409 snapshot_not_ready.
- Price
- Free
- Batch
- No
- Failed calls
- Not charged
Example request
curl 'https://api.virev.ai/v1/batch/snapshot/SNAPSHOT_ID' \
-H "Authorization: Bearer $VIREV_API_KEY"import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/batch/snapshot/SNAPSHOT_ID",
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
snapshot_id required | path | string | The id returned by POST /v1/batch/trigger. |
format | query | ndjson | json | csv | Override the job's format. CSV columns are dot-flattened keys; nested arrays/objects are JSON-encoded cells. |
batch_size | query | integer | Rows per page for paged download; with it, part selects the page. |
part | query | integer | Zero-based page index. Without batch_size the whole snapshot is part 0, so a later part needs batch_size. |
Example response
The example response of the API reference, with lists cut to their first 3 items and long text shortened.
[
{
"input": {
"handle": "nike"
},
"data": {
"id": "13460080",
"username": "nike",
"full_name": "Nike",
"biography": "Just Do It.",
"followers": 290883678,
"following": 267,
"posts": 1677,
"is_verified": true,
"is_private": false,
"avatar_url": "https://scontent-gru1-2.cdninstagram.com/v/t51.82787-19/551608484_18567162979020081_1135468084872726555_n.jpg?stp=dst-jpg_s320x320_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4zOTkuYzIifQ&_nc_ht=scontent-gru1-2.cdninstagram.com&_n…",
"external_url": "http://empli.fi/nike",
"links": [
{
"url": "http://empli.fi/nike",
"title": null
}
],
"category": null,
"business_category": null,
"is_business": true,
"is_professional": true,
"business_email": null,
"business_phone": null,
"business_address": "One Bowerman Dr, Beaverton, Oregon, 97005",
"pronouns": [],
"highlight_reel_count": 5,
"has_clips": true,
"is_recently_joined": false,
"fbid": "17841400602400210",
"extra": {}
}
},
{
"input": {
"handle": "adidas"
},
"data": {
"id": "20269764",
"username": "adidas",
"full_name": "adidas",
"biography": "Through Sport We Have The Power To Change Lives #YouGotThis",
"followers": 29837145,
"following": 1059,
"posts": null,
"is_verified": true,
"is_private": false,
"avatar_url": "https://scontent.cdninstagram.com/v/t51.82787-19/839334195_18666329605045765_5263068549495526888_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=pyx9E6Wz…",
"external_url": "https://linktr.ee/adidas",
"links": [
{
"url": "https://linktr.ee/adidas",
"title": null
}
],
"category": null,
"business_category": null,
"is_business": null,
"is_professional": null,
"business_email": null,
"business_phone": null,
"business_address": null,
"pronouns": [],
"highlight_reel_count": null,
"has_clips": true,
"is_recently_joined": null,
"fbid": "17841401372920316",
"extra": {}
}
},
{
"input": {
"handle": "puma"
},
"data": {
"id": "10145706",
"username": "puma",
"full_name": "PUMA",
"biography": null,
"followers": 12944878,
"following": 156,
"posts": 3410,
"is_verified": true,
"is_private": false,
"avatar_url": "https://scontent.cdninstagram.com/v/t51.2885-19/459303202_479954131680638_1811732038334385568_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=6y4B96ggjd4…",
"external_url": "http://clicklinkin.bio/puma",
"links": [
{
"url": "http://clicklinkin.bio/puma",
"title": null
}
],
"category": null,
"business_category": null,
"is_business": null,
"is_professional": null,
"business_email": null,
"business_phone": null,
"business_address": null,
"pronouns": [],
"highlight_reel_count": null,
"has_clips": true,
"is_recently_joined": null,
"fbid": "17841401011180158",
"extra": {}
}
}
]How it works
Streams results in submission order once the job is terminal; 409 snapshot_not_ready while it runs. Every row carries its input alongside data (or error, with include_errors=true). Completed rows of failed/canceled jobs stay downloadable until expiry. For very large snapshots page with batch_size + part — each page is one bounded response.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
404 | No such snapshot, or results expired. |
409 | Snapshot is not ready for download. |
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. |