# Ciencuadras Autocomplete API Documentation

<p><strong>Ciencuadras Autocomplete API</strong> finds cities, localities and neighborhoods by name. Each item has a <code>type</code>, the names and the number of listings, plus a <code>search</code> object with the ready values for the <code>department</code>, <code>city</code>, <code>locality</code> and <code>neighborhood</code> filters of the search route. A query without a match returns an empty list. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/ciencuadras-api/ciencuadras_autocomplete](https://scrappa.co/docs/ciencuadras-api/ciencuadras_autocomplete)
- **API group:** Ciencuadras API
- **Endpoint:** `GET https://scrappa.co/api/ciencuadras/autocomplete`

## 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 |
| --- | --- | --- | --- |
| `q` | string | Yes | Place name, 2 to 100 characters, for example medellin. |
| `transaction` | string | No | sale (default) or rent. Used for the listing counts. |
| `size` | integer | No | Number of results, 1 to 20. Default 7. |

## Example response

```json
{
    "data": {
        "items": [
            {
                "id": 6,
                "city": "Bogot\u00e1",
                "name": "Chapinero",
                "type": "locality",
                "search": {
                    "city": "bogota",
                    "locality": "chapinero",
                    "department": "cundinamarca"
                },
                "locality": "Chapinero",
                "department": "Cundinamarca",
                "neighborhood": null,
                "total_listings": 3356
            },
            {
                "id": 3974,
                "city": "Bogot\u00e1",
                "name": "Chapinero Central",
                "type": null,
                "search": {
                    "city": "bogota",
                    "locality": "chapinero",
                    "department": "cundinamarca",
                    "neighborhood": "chapinero-central"
                },
                "locality": "Chapinero",
                "department": "Cundinamarca",
                "neighborhood": "Chapinero Central",
                "total_listings": 187
            },
            {
                "id": 4280,
                "city": "Bogot\u00e1",
                "name": "Chapinero Central",
                "type": null,
                "search": {
                    "city": "bogota",
                    "locality": "chapinero",
                    "department": "cundinamarca",
                    "neighborhood": "chapinero-central"
                },
                "locality": "Chapinero",
                "department": "Cundinamarca",
                "neighborhood": "Chapinero Central",
                "total_listings": 187
            },
            {
                "id": 4295,
                "city": "Bogot\u00e1",
                "name": "Chapinero Central",
                "type": null,
                "search": {
                    "city": "bogota",
                    "locality": "chapinero",
                    "department": "cundinamarca",
                    "neighborhood": "chapinero-central"
                },
                "locality": "Chapinero",
                "department": "Cundinamarca",
                "neighborhood": "Chapinero Central",
                "total_listings": 187
            },
            {
                "id": 1480,
                "city": "Bogot\u00e1",
                "name": "Chapinero Central",
                "type": "neighborhood",
                "search": {
                    "city": "bogota",
                    "locality": "chapinero",
                    "department": "cundinamarca",
                    "neighborhood": "chapinero-central"
                },
                "locality": "Chapinero",
                "department": "Cundinamarca",
                "neighborhood": "Chapinero Central",
                "total_listings": 170
            }
        ],
        "query": "chapin"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 503 | Upstream Unavailable | Ciencuadras could not be reached or returned data that does not match the request. This response is not billable and is retryable. |

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