Skip to content
Examples

Add Tasks

Add Yelp search tasks to scrape business listings

The v1 API, for batchesSquids, tasks and runs: many calls on a schedule, delivered where you work. For one call that answers in seconds, use the API v2.
POSThttps://api.lobstr.io/v1/tasks

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.

Crawler ID: ac92974d3c1c9f8d3997767f090fa0b8

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Content-Typestringheaderrequired

Request body format. Value: application/json

Request Body

Field Type Required Description
squid string Yes Hash of your squid configured with the Yelp Search Export crawler
tasks array Yes Array of task objects

Task Object

You can either pass a url or use keyword + location (with optional country):

Field Type Required Description
url string No Full Yelp search URL (e.g., https://www.yelp.com/search?find_desc=Restaurants&find_loc=New+York)
keyword string No What you're looking for (business category or search term). Example: Italian restaurant
location string No City or area to search in. Example: New York, NY
country string No Country 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"
    }
  ]
}