POST Execute Task
Run a pre-built Holocron action
POST
https://api.anakin.io/v1/holocron/taskSubmit a task to execute a Holocron action. Credits are deducted immediately at submission and refunded automatically if the job fails. Poll for results using GET /v1/holocron/jobs/{id}.
Request Body
{
"action_id": "li_profile_scrape",
"params": {
"profile_url": "https://www.linkedin.com/in/example"
}
}| Parameter | Type | Description |
|---|---|---|
action_id required | string | The action to run. Find action IDs in the Holocron dashboard |
params | object | Action-specific input parameters |
Response
202 Accepted{
"status": "processing",
"job_id": "7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"poll_url": "/v1/holocron/jobs/7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
}| Field | Type | Description |
|---|---|---|
job_id | string | Use this to poll for results |
poll_url | string | Convenience path for the polling endpoint |
Use the job_id with GET /v1/holocron/jobs/{id} to retrieve your results.
Error Responses
Insufficient credits — 402 Payment Required
{
"status": "error",
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "You need 5 credits. Current balance: 2",
"balance": 2,
"required": 5
}
}Authentication required — 401 Unauthorized
Returned when the action requires you to connect your account for the target website. Visit the connect_url to authenticate.
{
"status": "error",
"error": {
"code": "AUTH_REQUIRED",
"message": "This action requires a LinkedIn connection.",
"connect_url": "/products/holocron/linkedin/connect"
}
}Code Examples
curl -X POST https://api.anakin.io/v1/holocron/task \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"action_id": "li_profile_scrape",
"params": {
"profile_url": "https://www.linkedin.com/in/example"
}
}'import requests
response = requests.post(
'https://api.anakin.io/v1/holocron/task',
headers={'X-API-Key': 'your_api_key'},
json={
'action_id': 'li_profile_scrape',
'params': {
'profile_url': 'https://www.linkedin.com/in/example'
}
}
)
data = response.json()
print(f"Job submitted: {data['job_id']}")const response = await fetch('https://api.anakin.io/v1/holocron/task', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
action_id: 'li_profile_scrape',
params: {
profile_url: 'https://www.linkedin.com/in/example'
}
})
});
const { job_id } = await response.json();
console.log('Job submitted:', job_id);