/tasks

Fetch user tasks.

↗ Open in API Explorer
GET

Get Tasks

Fetch user tasks.

Request

Endpoint: GET https://api.outscraper.cloud/tasks

Parameters

NameInTypeRequiredDescriptionExampleConstraints
query query string No The parameter specifies the tag to search among the tasks. - -
lastId query string No The parameter specifies the last task ID. Used for pagination. - -
pageSize query integer No The parameter specifies the number of items to return. - default 10

Responses

200

application/json

User tasks.

{
  "tasks": [
    {
      "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"
    }
  ],
  "has_more": true
}

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" -H  "X-API-KEY: YOUR-API-KEY"
POST

Create Task

Allows you to create UI tasks.

Request

Endpoint: POST https://api.outscraper.cloud/tasks

Request Body Fields

FieldTypeRequiredDescriptionExampleConstraints
service_name string No ID of the service you want to use (e.g., google_maps_service_v2, google_maps_reviews_service_v3). - -
queries array<string> No Queries to search for (e.g., restaurants ny usa, bars ny usa). - -
queries[] string No - - -
enrichments array<string> No The parameter defines an enrichment or enrichments (e.g., enrichment=enrichment1&enrichment=enrichment2&enrichment=enrichment3) you want to apply to the results. Available values: domains_service, emails_validator_service, disposable_email_checker, whatsapp_checker, imessage_checker, phones_enricher_service, trustpilot_service, company_insights_service, etc. Use &enrichment=domains_service&enrichment=emails_validator_service to enrich data with Emails & Contacts Scraper (domains_service), and Email Address Verifier (emails_validator_service). It increases the time of the response. - -
enrichments[] string No - - -
tags array<string> No - - -
tags[] string No - - -

Request Example

{
  "service_name": "google_maps_service_v2",
  "queries": [],
  "enrich": false,
  "settings": {
    "output_extension": "xlsx",
    "output_columns": []
  },
  "tags": [
    "restaurant +1"
  ],
  "enrichments": [
    "domains_service",
    "company_insights_service"
  ],
  "categories": [
    "restaurant",
    "dentist"
  ],
  "locations": [
    "SE>Stockholm"
  ],
  "language": "en",
  "region": "SE",
  "limit": 0,
  "organizationsPerQueryLimit": 500,
  "filters": [],
  "exactMatch": false,
  "useZipCodes": true,
  "dropDuplicates": true,
  "dropEmailDuplicates": false,
  "ignoreWithoutEmails": false,
  "UISettings": {
    "isCustomQueries": false,
    "isCustomCategories": false,
    "isCustomLocations": false
  },
  "enrichLocations": true
}

Responses

200

application/json

Task created.

{
  "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."
}

Related Endpoints