# TruckScout24 IDs API Documentation

Read the public sitemap index and one gzip child, then return listing ids in the exact ts-a-b-c form that the detail route accepts. Without a child, the first listing child is read. This family makes two upstream reads.

- **Documentation:** [https://scrappa.co/docs/truckscout24-api/truckscout24_ids](https://scrappa.co/docs/truckscout24-api/truckscout24_ids)
- **API group:** TruckScout24 API
- **Endpoint:** `GET https://scrappa.co/api/truckscout24/v1/ids`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `child` | string | No | Optional sitemap .xml.gz child name from a previous response. |
| `offset` | integer | No | Zero-based id offset inside the child. Defaults to 0. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/truckscout24/v1/ids?child=listing_1.xml.gz"
```

## Example response

```json
{
    "success": true,
    "data": {
        "child": "listing_1.xml.gz",
        "offset": 0,
        "ids": [
            "ts-233-69-146"
        ],
        "total": 50000,
        "has_more": true
    },
    "meta": {
        "endpoint_family": "ids"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter is invalid. This response is not billable. |
| 502 | Invalid Source Response | TruckScout24 returned an unexpected response. This response is not billable. |
| 503 | Source Unavailable | The public source is temporarily unavailable. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
