/tasks/{taskId}

Fetch user task.

↗ Open in API Explorer
GET

Get Task

Fetch user task.

Request

Endpoint: GET https://api.outscraper.cloud/tasks/{taskId}

Parameters

NameInTypeRequiredDescriptionExampleConstraints
taskId path string Yes Task ID. Example: 20211211132758c8e9 - -

Responses

200

application/json

User task.

{
  "metadata": {
    "service_name": "google_maps_service_v2",
    "queries": [
      "bars ny usa",
      "restaurants ny usa"
    ]
  },
  "updated": "2022-02-08T20:51:17.402668",
  "user_id": "YOUR_USER_ID",
  "status": "SUCCESS",
  "created": "2022-02-08T20:49:06.879078",
  "queue_task_id": "2b9aa187-281a-4d4e-a4c6-fbe941aaac34",
  "results": [
    {
      "product_name": "Google Maps Data",
      "file_url": "LINK_TO_RESULTS",
      "quantity": 509
    },
    {
      "product_name": "Domains",
      "quantity": 509
    }
  ],
  "id": "YOUR_TASK_ID"
}

401

application/json

Wrong or missing API Key (token).

{
  "error": true,
  "errorMessage": "401 Unauthorized: The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."
}

Code Samples

cURL

curl -X GET "https://api.outscraper.cloud/tasks/YOUR_TASK_ID" -H  "X-API-KEY: YOUR-API-KEY"
PUT

Restart Task

Allows you to recreate tasks.

Request

Endpoint: PUT https://api.outscraper.cloud/tasks/{taskId}

Parameters

NameInTypeRequiredDescriptionExampleConstraints
taskId path string Yes Task ID. Example: 20211211132758c8e9 - -

Responses

200

application/json

Task restarted.

Task restarted

401

application/json

Wrong or missing API Key (token).

{
  "error": true,
  "errorMessage": "401 Unauthorized: The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."
}

Code Samples

cURL

curl -X PUT "https://api.outscraper.cloud/tasks/your-task-id"
DELETE

Terminate Task

Allows you to terminate created tasks.

Request

Endpoint: DELETE https://api.outscraper.cloud/tasks/{taskId}

Parameters

NameInTypeRequiredDescriptionExampleConstraints
taskId path string Yes Task ID. Example: 20211211132758c8e9 - -

Responses

200

application/json

Task removed.

Task removed

401

application/json

Wrong or missing API Key (token).

{
  "error": true,
  "errorMessage": "401 Unauthorized: The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."
}

Code Samples

cURL

curl -X DELETE "https://api.outscraper.cloud/tasks/your-task-id"

Related Endpoints