GET /v1/jobs/{job_id}/results

Crawl job results API: download a finished crawl job's results

Send the job_id of a ready crawl job and get its results, each target with its operation, arguments, status and items, in responses of at most 3 MiB. Send next_cursor back as cursor until complete is true. The job is charged once when it finishes, and retries and repeat downloads are free.

Price
Free
Batch
No
Failed calls
Not charged

Example request

curl
curl 'https://api.virev.ai/v1/jobs/job_7641d5f0-717d-4b70-a2f1-f58d846d7242/results' \
  -H "Authorization: Bearer $VIREV_API_KEY"
python
import os
import requests

response = requests.request(
    "GET",
    "https://api.virev.ai/v1/jobs/job_7641d5f0-717d-4b70-a2f1-f58d846d7242/results",
    headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())

Parameters

NameInTypeDescription
job_id requiredpathstring Example job_7641d5f0-717d-4b70-a2f1-f58d846d7242.
cursor querystring

Example response

The example response of the API reference.

json
{
  "data": {
    "batch_id": "job_7641d5f0-717d-4b70-a2f1-f58d846d7242",
    "results": [
      {
        "index": 0,
        "operation": "user_feed",
        "args": {
          "handle": "nike"
        },
        "status": "done",
        "items": []
      }
    ],
    "next_cursor": null,
    "complete": true
  },
  "meta": {
    "cost": "$0.0000",
    "request_id": "req_job_example"
  }
}

How it works

Read paid results in responses bounded to 3 MiB. Send next_cursor to this route until complete is true. Download cursors differ from acquisition cursors. Each response may contain part of a target. Retries and repeated downloads never charge again. Before billing, the crawler confirms that each output unit fits 3 MiB in the selected raw or normalized mode. An oversized unit fails the job with result_item_too_large; results return 413 without a charge. Modes never switch automatically. If the crawler confirms that a retained snapshot is missing or corrupt after billing, the usage charge is reversed once and the job becomes failed. A later results read that finds the result again restores the job to ready and charges it again at the same price, or answers 402 when the balance cannot pay. Temporary store/network errors, invalid cursors and pending result preparation do not reverse charges. A failed reversal returns 503 billing_unavailable; retry the same result request. Results stay on the crawler and no unbounded aggregate crosses the portal.

Errors

StatusWhen
400Invalid cursor or query parameters.
401Invalid or revoked API key.
402The full job charge exceeds the balance. Top up at https://api.virev.ai/settings/billing, then poll again. No result data is returned before settlement.
404Job does not exist or belongs to another account.
409result_snapshot_missing or result_snapshot_corrupt: retained-data loss triggers one reversal of the paid charge, and a later read that finds the result again charges it again. result_preparation_required: retry later; this temporary condition does not reverse charges. job_cancelled: the job was cancelled with POST /v1/jobs/{job_id}/cancel, so it has no results and costs nothing.
413A result unit exceeds the byte budget for the selected mode. The job failed before billing.
502scrape_blocked: the platform blocked the read, answered as a sync call answers it. upstream_error: the crawler job failed. No charge was made.
503temporarily_unavailable: the job failed because a crawl route was closed for every caller. Retry-After gives the seconds until it opens again; submit a new job then. No charge was made. Without Retry-After, 503 means the job service was unavailable; retry without a second charge.