# Subito.it Places API Documentation

<p><strong>Subito.it Places API Documentation</strong> Find regions, provinces and towns by name prefix. The town istat key is the value for to in search, the province key is the value for ci. A query without matches is a successful, billable response with an empty places list.</p>

- **Documentation:** [https://scrappa.co/docs/subito-api/subito_places](https://scrappa.co/docs/subito-api/subito_places)
- **API group:** Subito.it API
- **Endpoint:** `GET https://scrappa.co/api/subito/places`

## 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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Place name prefix, 2 to 60 characters, e.g. mila. |
| `limit` | integer | No | Places to return, 1 to 20. Defaults to 10. |

## Example response

```json
{
    "data": {
        "places": [
            {
                "region": {
                    "key": 4,
                    "name": "Lombardia"
                },
                "province": {
                    "key": 8,
                    "code": "MI",
                    "name": "Milano"
                }
            },
            {
                "town": {
                    "name": "Milano",
                    "istat": "015146"
                },
                "region": {
                    "key": 4,
                    "name": "Lombardia"
                },
                "province": {
                    "key": 8,
                    "code": "MI",
                    "name": "Milano"
                }
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "places"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable and makes no upstream call. |
| 503 | Invalid Source Response | Subito 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)
