Skip to main content
If you are using the Python SDK, task polling is handled automatically for you behind the scenes. However, if you are integrating via the REST API directly, you need to make a GET request to retrieve the final result of your task.

The Polling Flow

  1. Create a task via POST /v2/tasks/create.
  2. The API will respond immediately with a task_id and a status of "processing".
  3. Poll the GET /v2/tasks/{task_id} endpoint every 1-3 seconds.
  4. When the status changes to "completed", the result object will be available.

Endpoint

GET https://api.scrapely.io/v2/tasks/{task_id}

Authentication

You must provide your API key via the X-API-Key header or as a query parameter (?api_key=YOUR_API_KEY).
curl -X GET https://api.scrapely.io/v2/tasks/52989a12-a43c-4bf9-ba1d-8ab1e1509169 \
  -H "X-API-Key: YOUR_API_KEY"

Response States

The status field can be one of three values: processing, completed, or failed.

1. Processing

{
  "success": true,
  "task_id": "52989a12-a43c-4bf9-ba1d-8ab1e1509169",
  "status": "processing",
  "created_at": "2026-04-06T10:54:56.652354+00:00"
}

2. Completed

When completed, the result object will be populated with the specific data you requested (HTML, screenshot, CAPTCHA token, etc.), and a completed_at timestamp will be added.
{
  "success": true,
  "task_id": "52989a12-a43c-4bf9-ba1d-8ab1e1509169",
  "status": "completed",
  "created_at": "2026-04-06T10:54:56.652354+00:00",
  "completed_at": "2026-04-06T10:55:08.312452+00:00",
  "result": {
    "html": "<!DOCTYPE html>..."
  }
}