# Add Tasks

Add LaCentrale search URLs to scrape vehicle listings using the lobstr.io API

Add LaCentrale search or listing URLs as tasks to your squid. The scraper will extract all vehicle listings matching your search criteria from the French automotive marketplace.

<Note>Crawler ID: `665c260fd9139121a4530d23b35b26db`</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>

## URL Format

Use LaCentrale listing URLs with your desired search filters:

`https://www.lacentrale.fr/listing?yearMin=2025`

`https://www.lacentrale.fr/listing?makesModelsCommercialNames=PEUGEOT`

Build your search on lacentrale.fr with filters (make, model, year, price, etc.) and copy the URL.

## Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **url** | string | Yes | LaCentrale search or category URL |

<Tip>
  Apply filters on lacentrale.fr (make, model, year, price range, location) to target specific vehicle segments.
</Tip>

<Note>
  LaCentrale limits search results to 347 pages maximum per URL. Use multiple filtered searches for comprehensive coverage.
</Note>

<Tip>
  Use the `fetch_since` setting to only scrape recently added listings for monitoring new inventory.
</Tip>

## Code Examples

<CodeGroup>
```bash cURL
curl -X POST "https://api.lobstr.io/api/v2/squid/YOUR_SQUID_ID/task" \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.lacentrale.fr/listing?yearMin=2024&makesModelsCommercialNames=PEUGEOT"
  }'
```

```python Python
import requests

API_TOKEN = "YOUR_API_TOKEN"
SQUID_ID = "YOUR_SQUID_ID"

url = f"https://api.lobstr.io/api/v2/squid/{SQUID_ID}/task"
headers = {
    "Authorization": f"Token {API_TOKEN}",
    "Content-Type": "application/json"
}
data = {
    "url": "https://www.lacentrale.fr/listing?yearMin=2024&makesModelsCommercialNames=PEUGEOT"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
```
</CodeGroup>

## Response

```json 200
{
  "id": "task_abc123def456",
  "status": "pending",
  "created_at": "2025-01-15T10:30:00Z",
  "url": "https://www.lacentrale.fr/listing?yearMin=2024&makesModelsCommercialNames=PEUGEOT"
}
```
