Skip to main content
POST
/
v1
/
tasks
Add Tasks
curl --request POST \
  --url https://api.lobstr.io/v1/tasks \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'
Add Yelp search tasks to scrape business listings. You can provide either a Yelp search URL or use keyword + location to build the search programmatically.

Headers

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

Request Body

FieldTypeRequiredDescription
squidstringYesHash of your squid configured with the Yelp Search Export crawler
tasksarrayYesArray of task objects

Task Object

You can either pass a url or use keyword + location (with optional country):
FieldTypeRequiredDescription
urlstringNoFull Yelp search URL (e.g., https://www.yelp.com/search?find_desc=Restaurants&find_loc=New+York)
keywordstringNoWhat you’re looking for (business category or search term). Example: Italian restaurant
locationstringNoCity or area to search in. Example: New York, NY
countrystringNoCountry to scope the location list. Leave empty to use top worldwide cities
Either url or keyword + location is required. When using keyword and location, filters set in the squid settings (price, sort, distance, etc.) are applied automatically.
To use advanced Yelp filters (cuisine type, outdoor seating, etc.), apply them on Yelp’s website first and then copy the resulting URL.

Code Examples

curl -X POST "https://api.lobstr.io/v1/tasks" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "squid": "YOUR_SQUID_HASH",
    "tasks": [
      {
        "url": "https://www.yelp.com/search?find_desc=Restaurants&find_loc=New+York%2C+NY"
      }
    ]
  }'

Response

200
{
  "duplicated_count": 0,
  "tasks": [
    {
      "id": "82367f24d9450b2222080eed91662968",
      "created_at": "2025-07-17T09:06:47.287893",
      "is_active": true,
      "params": {
        "keyword": "Italian restaurant",
        "location": "New York, NY",
        "country": "US"
      },
      "module": 115,
      "object": "task"
    }
  ]
}