# Add Tasks

Add Yelp business URLs to scrape reviews

Add Yelp business page URLs to collect all reviews for each business. The scraper extracts the full review text, star rating, reviewer profile, photos, and community votes.

<Note>Crawler ID: `ea1c83f60e32a4e1de91a1ed1e41b268`</Note>

## Headers

<ParamField header="Authorization" type="string" required>
  Your API authentication token. Value: `Token YOUR_API_KEY`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Request body format. Value: `application/json`
</ParamField>

## Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **squid** | string | Yes | Hash of your squid configured with the Yelp Reviews Export crawler |
| **tasks** | array | Yes | Array of task objects, each containing a `url` field |

## Task Object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **url** | string | Yes | Full Yelp business URL — must contain `/biz/<alias>` (e.g., `https://www.yelp.com/biz/olio-e-piu-new-york-7`). Also accepts country variants (yelp.fr, yelp.co.uk, etc.) |

<Tip>
  Find the business on Yelp, then copy the URL from the address bar. Make sure it contains `/biz/` — not a search URL.
</Tip>

## Code Examples

<CodeGroup>
```bash cURL
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/biz/olio-e-piu-new-york-7"
      }
    ]
  }'
```

```python Python
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.lobstr.io/v1"
headers = {"Authorization": f"Token {API_KEY}"}

squid_id = "YOUR_SQUID_HASH"

payload = {
    "squid": squid_id,
    "tasks": [
        {"url": "https://www.yelp.com/biz/olio-e-piu-new-york-7"},
        {"url": "https://www.yelp.com/biz/le-bernardin-new-york"}
    ]
}

response = requests.post(f"{BASE_URL}/tasks",
    headers=headers,
    json=payload
)

data = response.json()
print(f"Added {len(data['tasks'])} tasks")
print(f"Duplicates skipped: {data['duplicated_count']}")
```
</CodeGroup>

## Response

```json 200
{
  "duplicated_count": 0,
  "tasks": [
    {
      "id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
      "created_at": "2026-05-12T10:00:00.000000",
      "is_active": true,
      "params": {
        "url": "https://www.yelp.com/biz/olio-e-piu-new-york-7"
      },
      "module": 116,
      "object": "task"
    }
  ]
}
```
