Skip to main content
POST
/
v1
/
tasks
Add Task Params
curl --request POST \
  --url https://api.lobstr.io/v1/tasks \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'

Documentation Index

Fetch the complete documentation index at: https://docs.lobstr.io/llms.txt

Use this file to discover all available pages before exploring further.

Use this format to dynamically define search inputs using structured metadata like city, category, and country. Location values can be obtained from the Get Geolocation endpoint. This method is ideal for automation and scaling across regions.

Headers

Authorization
string
required
Your API authentication token. Value: Token YOUR_API_KEY
Content-Type
string
required
Request body format. Value: application/json

Task Parameters

FieldTypeRequiredDescription
citystringYesCity name with postal code (e.g., Alpine 91901)
categorystringYesBusiness category to search (e.g., restaurant)
countrystringNoCountry name (e.g., United States)
regionstringNoState or province (e.g., California)
districtstringNoCounty or local district (e.g., San Diego)

Request Body

FieldTypeRequiredDescription
squidstringYesHash of your squid configured with the google-maps-leads-scraper crawler
tasksarrayYesArray of task objects with location parameters
Use the Get Geolocation endpoint to fetch valid values for city, region, and district.
The city field must include the postal code (e.g., Anaheim 92801).

Code Examples

curl -X POST "https://api.lobstr.io/v1/tasks" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tasks": [
      {
        "city": "Alpine 91901",
        "category": "restaurant",
        "country": "United States",
        "region": "California",
        "district": "San Diego"
      },
      {
        "city": "Anaheim 92801",
        "category": "restaurant",
        "country": "United States"
      }
    ],
    "squid": "YOUR_SQUID_HASH"
  }'

Response

200
{
  "duplicated_count": 0,
  "tasks": [
    {
      "id": "c3113ec3820d0253e2130b23f5b01a74",
      "created_at": "2025-06-24T11:11:30.222467",
      "is_active": true,
      "params": {
        "city": "Alpine 91901",
        "category": "restaurant",
        "country": "United States",
        "region": "California",
        "district": "San Diego"
      },
      "module": 5,
      "object": "task"
    },
    {
      "id": "d3deeac80b3dff7be992bb7f5d4ce63d",
      "created_at": "2025-06-24T11:11:30.222613",
      "is_active": true,
      "params": {
        "city": "Anaheim 92801",
        "category": "restaurant",
        "country": "United States"
      },
      "module": 5,
      "object": "task"
    }
  ]
}