Reference
Every request authenticates with an API key in the Authorization: Bearer header. Tasks run asynchronously: queue, poll, then read the result.
REST API
| Method | Path | Description |
|---|---|---|
| POST | /v1/extract | Queue an extraction. Body is the task input. Returns 202, or 200 if deduplicated. |
| POST | /v1/tasks | Queue a task with an explicit kind: navigate or extract. |
| GET | /v1/tasks | List your tasks, newest first. Query: limit (1–100), before (ISO timestamp). |
| GET | /v1/tasks/:id | Task status, attempts and failure details. |
| GET | /v1/tasks/:id/result | Result of a finished task. 409 with Retry-After while it is still running. |
| GET | /v1/tasks/:id/events | Event trail. Query: after (event id), limit (1–200). |
| POST | /v1/tasks/:id/cancel | Request cancellation of a queued or running task. |
| GET | /v1/usage | Task count, browser time and limits for the current period. |
| GET | /v1/health | Public. Database reachability, worker heartbeat and queue depth. |
Task input
{
"url": "https://example.com/pricing",
"allowed_domains": ["example.com"],
"fields": {
"plan_names": { "selector": ".plan h3", "all": true },
"cta_link": { "selector": "a.cta", "attr": "href" }
},
"output_schema": {
"type": "object",
"required": ["plan_names"],
"properties": { "plan_names": { "type": "array", "items": { "type": "string" } } }
}
}Polling
# Poll until the task is terminal
curl https://runpuffin.com/v1/tasks/$TASK_ID \
-H "Authorization: Bearer $RUNPUFFIN_API_KEY"
# Then read the result
curl https://runpuffin.com/v1/tasks/$TASK_ID/result \
-H "Authorization: Bearer $RUNPUFFIN_API_KEY"Errors
Errors share one shape. A task owned by another organization returns 404, never 403. Blocked targets finish with status blocked and a POLICY_* failure code.
Error body
{
"error": { "code": "not_found", "message": "Task not found." }
}MCP server
Streamable HTTP at /mcp, stateless, POST only. It uses the same API key and queue as the REST API.
run_web_taskQueue a read-only navigation task.extract_website_dataQueue extraction of text, headings, links, tables and optional selector fields.extract_structured_dataQueue extraction validated against a JSON Schema.get_task_statusCurrent status of a task.get_task_resultResult of a finished task.get_task_eventsRedacted event timeline.cancel_taskRequest cancellation.get_usageUsage for the current period.get_platform_healthWorker and queue health.