Get Batch Results
Retrieve batch verification results using GET /v1/batch/:id/results.
Get Batch Results
Retrieve the verification results for items in a batch.
GET
/v1/batch/:id/resultsGet paginated verification results for a batch job.
Path Parameters
Path Parameters
| Parameter | Type | Description |
|---|
Query Parameters
Query Parameters
| Parameter | Type | Description |
|---|
Example Request
Response
Success Response (200)
{
"batch": {
"id": "batch_abc123def456",
"status": "completed",
"totalItems": 50,
"processedItems": 50,
"successCount": 48,
"failureCount": 2
},
"items": [
{
"id": "item_001",
"itemIndex": 0,
"idempotencyKey": "fact-001",
"content": "The Earth is approximately 4.5 billion years old.",
"itemContext": { "source": "textbook" },
"status": "completed",
"verificationId": "ver_xyz789",
"verdict": "true",
"confidence": 0.95,
"decision": "accept",
"costCents": 5,
"processingTimeMs": 1250,
"errorMessage": null,
"createdAt": "2024-01-15T10:00:00Z",
"completedAt": "2024-01-15T10:00:02Z"
},
{
"id": "item_002",
"itemIndex": 1,
"idempotencyKey": "fact-002",
"content": "The Great Wall of China is visible from space.",
"itemContext": null,
"status": "completed",
"verificationId": "ver_abc456",
"verdict": "false",
"confidence": 0.88,
"decision": "reject",
"costCents": 5,
"processingTimeMs": 1180,
"errorMessage": null,
"createdAt": "2024-01-15T10:00:00Z",
"completedAt": "2024-01-15T10:00:02Z"
},
{
"id": "item_003",
"itemIndex": 2,
"status": "failed",
"verificationId": null,
"verdict": null,
"confidence": null,
"errorMessage": "Verification timeout after 120 seconds",
"retryCount": 3
}
],
"pagination": {
"total": 50,
"limit": 20,
"offset": 0,
"hasMore": true
}
}Response Fields
| Parameter | Type | Description |
|---|
Item Statuses
| Status | Description |
|---|---|
pending | Item created, not yet queued |
queued | Item sent to processing queue |
processing | Item currently being verified |
completed | Verification completed successfully |
failed | Verification failed after retries |
skipped | Item skipped (batch was cancelled) |
Error Responses
404 Not Found
{
"error": {
"code": "not_found",
"message": "Batch not found"
}
}Fetching All Results
async function fetchAllResults(client, batchId) {
const allItems = [];
let offset = 0;
const limit = 100;
while (true) {
const results = await client.getBatchResults(batchId, { limit, offset });
allItems.push(...results.items);
if (!results.pagination.hasMore) break;
offset += limit;
}
return allItems;
}Filtering Failed Items
# Get only failed items
curl -X GET "https://api.check.ai/v1/batch/batch_abc123/results?status=failed" \
-H "Authorization: Bearer vfy_your_api_key"