# Add Tasks

Add Leboncoin boutique directory URLs to scrape

Add Leboncoin boutique directory URLs to your **Leboncoin Boutiques Scraper** squid. Each task should be a Leboncoin boutiques category URL.

<Note>Crawler ID: `c6e88128aef71c079e58f0518687e10c`</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 Leboncoin Boutiques Scraper |
| **tasks** | array | Yes | Array of task objects, each containing a `url` field |

## Task Object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **url** | string | Yes | A Leboncoin boutiques directory URL (e.g. `/boutiques/vehicules/toutes_categories` or `/boutiques/immobilier/toutes_categories`) |

<Tip>
  Browse to a Leboncoin boutiques category page, then copy the path (e.g. `/boutiques/vehicules/toutes_categories`). You can also pass the full 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": "/boutiques/vehicules/toutes_categories"
      }
    ]
  }'
```

```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": "/boutiques/vehicules/toutes_categories"},
        {"url": "/boutiques/immobilier/toutes_categories"}
    ]
}

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": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
      "created_at": "2026-06-09T10:00:00.000000",
      "is_active": true,
      "params": {
        "url": "/boutiques/vehicules/toutes_categories"
      },
      "object": "task"
    }
  ]
}
```
