# Craigslist Sites API Documentation

List every Craigslist city site: the hostname to use as site in the search endpoint, the name, country, region, approximate coordinates and the subareas with their abbreviations. Filter by two-letter country code or by a name substring. The list is cached for 24 hours. A filter without matches is a successful empty result.

- **Documentation:** [https://scrappa.co/docs/craigslist-api/craigslist_sites](https://scrappa.co/docs/craigslist-api/craigslist_sites)
- **API group:** Craigslist API
- **Endpoint:** `GET https://scrappa.co/api/craigslist/sites`

## 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 |
| --- | --- | --- | --- |
| `country` | string | No | Two-letter country code, case-insensitive. Example: DE. |
| `query` | string | No | Case-insensitive substring of the site hostname or name. Example: berlin. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/craigslist/sites?country=DE"
```

## Example response

```json
{
    "success": true,
    "data": {
        "total": 15,
        "results": [
            {
                "site": "berlin",
                "name": "berlin",
                "country": "DE",
                "latitude": 52.5233,
                "longitude": 13.4127
            },
            {
                "site": "hamburg",
                "name": "hamburg",
                "country": "DE",
                "latitude": 53.5686,
                "longitude": 10.0386
            }
        ]
    },
    "meta": {
        "endpoint_family": "sites",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 502 | Invalid Source Response | Craigslist answered with a shape that no longer matches the documented contract. This response is not billable. |
| 503 | Service Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## 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)
