GET Get Job Status
Poll for status and retrieve results for a Holocron task
GET
https://api.anakin.io/v1/holocron/jobs/{id}Retrieve the status and results of a Holocron task. Poll this endpoint until the job reaches completed or failed. See the Polling Jobs guide for recommended patterns.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id required | string | The job ID returned from POST /v1/holocron/task |
Response — Processing
200 OK{
"status": "processing"
}Response — Completed
200 OK{
"status": "completed",
"data": {
"name": "Jane Doe",
"headline": "Software Engineer at Acme Corp",
"location": "San Francisco, CA",
"connections": 500
},
"credits_used": 2,
"execution_ms": 8420
}Response — Failed
200 OK{
"status": "failed",
"error": {
"code": "EXECUTION_FAILED",
"message": "The target page could not be loaded."
},
"credits_used": 0
}Response Fields
| Field | Type | Description |
|---|---|---|
status | string | processing, completed, or failed |
data | object | Structured result data (present when completed) |
credits_used | number | Credits charged for this job. 0 on failure (credits are refunded) |
execution_ms | number | Total execution time in milliseconds |
error | object | Error details (present when failed) |
Job Statuses
| Status | Description |
|---|---|
processing | Job is queued or actively running |
completed | Job finished successfully — data is populated |
failed | Job encountered an error — credits were refunded |
Code Examples
curl https://api.anakin.io/v1/holocron/jobs/7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c \
-H "X-API-Key: your_api_key"import requests
import time
job_id = '7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c'
while True:
response = requests.get(
f'https://api.anakin.io/v1/holocron/jobs/{job_id}',
headers={'X-API-Key': 'your_api_key'}
)
data = response.json()
if data['status'] == 'completed':
print(data['data'])
break
elif data['status'] == 'failed':
print(f"Job failed: {data['error']['message']}")
break
time.sleep(3)const jobId = '7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c';
const poll = async () => {
while (true) {
const res = await fetch(`https://api.anakin.io/v1/holocron/jobs/${jobId}`, {
headers: { 'X-API-Key': 'your_api_key' }
});
const data = await res.json();
if (data.status === 'completed') {
console.log(data.data);
break;
} else if (data.status === 'failed') {
console.error(data.error.message);
break;
}
await new Promise(r => setTimeout(r, 3000));
}
};
poll();For polling patterns, see the Polling Jobs reference.