Batch status and results
curl --request GET \
--url https://api.prefetch.io/batch/{endpoint}/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.prefetch.io/batch/{endpoint}/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.prefetch.io/batch/{endpoint}/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prefetch.io/batch/{endpoint}/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.prefetch.io/batch/{endpoint}/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prefetch.io/batch/{endpoint}/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prefetch.io/batch/{endpoint}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "crw_7c2e9a4b1d0f4e6a8b3c5d7e9f1a2b3c",
"status": "completed",
"url": "https://stripe.com",
"total": 3,
"completed": 3,
"failed": 0,
"credits_used": 36,
"created_at": "2026-10-13T09:14:03.221Z",
"started_at": "2026-10-13T09:14:04.010Z",
"finished_at": "2026-10-13T09:14:41.512Z",
"expires_at": "2026-10-14T09:14:03.221Z",
"error": null,
"kind": "batch",
"endpoint": "enrich",
"next": null,
"data": [
{
"url": "https://stripe.com",
"depth": 0,
"status_code": 200,
"ok": true,
"error": null,
"error_code": null,
"domain": "stripe.com",
"brand": {
"colors": {
"brand_colors": [
{
"color": "rgb(99, 91, 255)",
"hex": "#635BFF",
"name": "Medium Slate Blue"
}
]
}
},
"company": {
"name": "Stripe, Inc.",
"emails": [],
"addresses": []
},
"classification": {
"iab_id": "IAB3-4",
"category": "Business"
}
}
]
},
"meta": {
"requestId": "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b",
"durationMs": 1840
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}Batches
GET /batch/{endpoint}/{id}
Progress and results of a batch, a page at a time. Each answered URL carries what a single call returns.
GET
/
batch
/
{endpoint}
/
{id}
Batch status and results
curl --request GET \
--url https://api.prefetch.io/batch/{endpoint}/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.prefetch.io/batch/{endpoint}/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.prefetch.io/batch/{endpoint}/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prefetch.io/batch/{endpoint}/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.prefetch.io/batch/{endpoint}/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prefetch.io/batch/{endpoint}/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prefetch.io/batch/{endpoint}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "crw_7c2e9a4b1d0f4e6a8b3c5d7e9f1a2b3c",
"status": "completed",
"url": "https://stripe.com",
"total": 3,
"completed": 3,
"failed": 0,
"credits_used": 36,
"created_at": "2026-10-13T09:14:03.221Z",
"started_at": "2026-10-13T09:14:04.010Z",
"finished_at": "2026-10-13T09:14:41.512Z",
"expires_at": "2026-10-14T09:14:03.221Z",
"error": null,
"kind": "batch",
"endpoint": "enrich",
"next": null,
"data": [
{
"url": "https://stripe.com",
"depth": 0,
"status_code": 200,
"ok": true,
"error": null,
"error_code": null,
"domain": "stripe.com",
"brand": {
"colors": {
"brand_colors": [
{
"color": "rgb(99, 91, 255)",
"hex": "#635BFF",
"name": "Medium Slate Blue"
}
]
}
},
"company": {
"name": "Stripe, Inc.",
"emails": [],
"addresses": []
},
"classification": {
"iab_id": "IAB3-4",
"category": "Business"
}
}
]
},
"meta": {
"requestId": "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b",
"durationMs": 1840
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"error": "Credit limit exceeded",
"error_code": "CREDITS_EXHAUSTED",
"retryable": false,
"success": false,
"retryAfterSeconds": 123,
"limit": 123,
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}Overview
Returns the batch’s progress and a page of answered URLs, in completion order. Each item carries every field the single endpoint returns for that URL (domain, brand, company, classification, screenshot_url, styleguide…), plus the batch’s own bookkeeping:
| Field | Meaning |
|---|---|
ok | false when the URL could not be answered. You are not charged for it. |
error, error_code | Why, as one of the API’s error codes. |
status_code | 200 for an answered URL. |
next until it is null to read every result. Results stay readable until expires_at, 24 hours after the batch was created.
Example request
curl "https://api.prefetch.io/batch/enrich/crw_7c2e9a4b1d0f4e6a8b3c5d7e9f1a2b3c?limit=50" \
-H "X-API-Key: $PREFETCH_API_KEY"
Example response
{
"success": true,
"data": {
"id": "crw_7c2e9a4b1d0f4e6a8b3c5d7e9f1a2b3c",
"status": "completed",
"kind": "batch",
"endpoint": "enrich",
"url": "https://stripe.com",
"total": 3,
"completed": 3,
"failed": 0,
"credits_used": 36,
"created_at": "2026-10-13T09:14:03.221Z",
"started_at": "2026-10-13T09:14:04.010Z",
"finished_at": "2026-10-13T09:14:41.512Z",
"expires_at": "2026-10-14T09:14:03.221Z",
"error": null,
"next": null,
"data": [
{
"url": "https://stripe.com",
"depth": 0,
"status_code": 200,
"ok": true,
"error": null,
"error_code": null,
"domain": "stripe.com",
"brand": { "colors": { "brand_colors": [{ "color": "rgb(99, 91, 255)", "hex": "#635BFF", "name": "Medium Slate Blue" }] } },
"company": { "name": "Stripe, Inc.", "emails": [], "addresses": [] },
"classification": { "iab_id": "IAB3-4", "category": "Business" }
}
]
},
"meta": { "requestId": "2e3d4c5b-6a7f-4b8c-9d0e-1f2a3b4c5d6e", "durationMs": 88 }
}