const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.context.dev/v1/batch/{batch_id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.context.dev/v1/batch/{batch_id}/results"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/batch/{batch_id}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/batch/{batch_id}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.context.dev/v1/batch/{batch_id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://api.context.dev/v1/batch/{batch_id}/results \
--header 'Authorization: Bearer <token>'{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"data": [
{
"url": "https://example.com/products/anvil",
"status": "ok",
"result": {
"url": "<string>",
"html": {
"requested": true,
"success": true,
"data": "<string>",
"error_code": "<string>",
"message": "<string>"
},
"markdown": {
"requested": true,
"success": true,
"data": "<string>",
"error_code": "<string>",
"message": "<string>"
},
"screenshot": {
"requested": true,
"success": true,
"data": "<string>",
"error_code": "<string>",
"message": "<string>"
},
"images": {
"requested": true,
"success": true,
"data": [
{
"url": "<string>",
"alt": "<string>",
"width": 2,
"height": 2,
"classification": "photography",
"fileUrl": "<string>"
}
],
"error_code": "<string>",
"message": "<string>"
},
"bytes": {
"requested": true,
"success": true,
"data": {
"contentType": "text/html; charset=utf-8",
"base64": "<string>"
},
"error_code": "<string>",
"message": "<string>"
},
"parsed": {
"type": "custom",
"requested": true,
"success": true,
"data": {},
"error_code": "<string>",
"message": "<string>"
},
"highlights": {
"requested": true,
"success": true,
"data": [
"<string>"
],
"error_code": "<string>",
"message": "<string>"
},
"json": {
"requested": true,
"success": true,
"data": {},
"error_code": "<string>",
"message": "<string>",
"isTruncated": true
},
"product": {
"requested": true,
"success": true,
"data": {
"isProductPage": true,
"product": {
"name": "<string>",
"description": "<string>",
"brand": "<string>",
"sku": "<string>",
"price": 123,
"regularPrice": 123,
"currency": "<string>",
"availability": "in_stock",
"category": "<string>",
"imageUrl": "<string>",
"images": [
"<string>"
],
"dimensions": [
"<string>"
],
"features": [
"<string>"
],
"targetAudience": [
"<string>"
],
"tags": [
"<string>"
],
"variants": [
{
"sku": "<string>",
"attributes": {},
"url": "<string>",
"images": [
"<string>"
]
}
]
}
},
"error_code": "<string>",
"message": "<string>"
},
"profile": {
"id": "<string>"
},
"metadata": {
"title": "<string>",
"description": "<string>",
"language": "<string>",
"keywords": [
"<string>"
],
"canonicalUrl": "<string>",
"author": "<string>",
"siteName": "<string>",
"image": "<string>",
"favicon": "<string>",
"publishedTime": "<string>",
"modifiedTime": "<string>",
"robots": "<string>",
"openGraph": {},
"twitter": {},
"alternates": [
{
"href": "<string>",
"hreflang": "<string>",
"type": "<string>",
"title": "<string>"
}
],
"headings": [
{
"level": 3,
"text": "<string>"
}
],
"jsonLd": [
{}
],
"additionalMeta": {}
},
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"cache_metadata": {
"status": "hit",
"age_ms": 1
},
"isPartial": true,
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
},
"credits_used": 1,
"itemId": "sku-1",
"meta": {},
"ocr_pages": 1
}
],
"has_more": true,
"next_cursor": "<string>",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "RATE_LIMITED",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}List batch results
Page through a finished batch’s results as JSON. Results remain available for 180 days.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.context.dev/v1/batch/{batch_id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.context.dev/v1/batch/{batch_id}/results"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/batch/{batch_id}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/batch/{batch_id}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.context.dev/v1/batch/{batch_id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://api.context.dev/v1/batch/{batch_id}/results \
--header 'Authorization: Bearer <token>'{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"data": [
{
"url": "https://example.com/products/anvil",
"status": "ok",
"result": {
"url": "<string>",
"html": {
"requested": true,
"success": true,
"data": "<string>",
"error_code": "<string>",
"message": "<string>"
},
"markdown": {
"requested": true,
"success": true,
"data": "<string>",
"error_code": "<string>",
"message": "<string>"
},
"screenshot": {
"requested": true,
"success": true,
"data": "<string>",
"error_code": "<string>",
"message": "<string>"
},
"images": {
"requested": true,
"success": true,
"data": [
{
"url": "<string>",
"alt": "<string>",
"width": 2,
"height": 2,
"classification": "photography",
"fileUrl": "<string>"
}
],
"error_code": "<string>",
"message": "<string>"
},
"bytes": {
"requested": true,
"success": true,
"data": {
"contentType": "text/html; charset=utf-8",
"base64": "<string>"
},
"error_code": "<string>",
"message": "<string>"
},
"parsed": {
"type": "custom",
"requested": true,
"success": true,
"data": {},
"error_code": "<string>",
"message": "<string>"
},
"highlights": {
"requested": true,
"success": true,
"data": [
"<string>"
],
"error_code": "<string>",
"message": "<string>"
},
"json": {
"requested": true,
"success": true,
"data": {},
"error_code": "<string>",
"message": "<string>",
"isTruncated": true
},
"product": {
"requested": true,
"success": true,
"data": {
"isProductPage": true,
"product": {
"name": "<string>",
"description": "<string>",
"brand": "<string>",
"sku": "<string>",
"price": 123,
"regularPrice": 123,
"currency": "<string>",
"availability": "in_stock",
"category": "<string>",
"imageUrl": "<string>",
"images": [
"<string>"
],
"dimensions": [
"<string>"
],
"features": [
"<string>"
],
"targetAudience": [
"<string>"
],
"tags": [
"<string>"
],
"variants": [
{
"sku": "<string>",
"attributes": {},
"url": "<string>",
"images": [
"<string>"
]
}
]
}
},
"error_code": "<string>",
"message": "<string>"
},
"profile": {
"id": "<string>"
},
"metadata": {
"title": "<string>",
"description": "<string>",
"language": "<string>",
"keywords": [
"<string>"
],
"canonicalUrl": "<string>",
"author": "<string>",
"siteName": "<string>",
"image": "<string>",
"favicon": "<string>",
"publishedTime": "<string>",
"modifiedTime": "<string>",
"robots": "<string>",
"openGraph": {},
"twitter": {},
"alternates": [
{
"href": "<string>",
"hreflang": "<string>",
"type": "<string>",
"title": "<string>"
}
],
"headings": [
{
"level": 3,
"text": "<string>"
}
],
"jsonLd": [
{}
],
"additionalMeta": {}
},
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"cache_metadata": {
"status": "hit",
"age_ms": 1
},
"isPartial": true,
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
},
"credits_used": 1,
"itemId": "sku-1",
"meta": {},
"ocr_pages": 1
}
],
"has_more": true,
"next_cursor": "<string>",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "RATE_LIMITED",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}batches:read permission. See the guide for examples and usage.Authorizations
Send Authorization: Bearer <API_KEY>. Keys have full access unless restricted to scopes.
Path Parameters
Batch ID.
"batch_9f2c8a"
Query Parameters
Records per page. Defaults to 25. A page can close early so its payload stays under ~8 MB; rely on next_cursor rather than counting records.
1 <= x <= 100next_cursor from the previous page.
^\d+:\d+$Response
One page of result records. Keep paging with next_cursor while has_more is true.
Unique ID of this request, also in X-Request-Id. Include it when contacting support.
"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"
Result records on this page.
At least one requested output succeeded. Check result.isPartial and each output success for incomplete results.
- Scraped page
- Failed page
Show child attributes
Show child attributes
Whether another page is available.
Cursor for the next page.
Credits this request used and your remaining balance.
Show child attributes
Show child attributes
Was this page helpful?