# Propiedades.com Autocomplete API Documentation

<p><strong>Propiedades.com Autocomplete API</strong> finds locations by name. Every result has an <code>id</code> you can pass as <code>location_id</code> to the search route. <code>is_state</code> marks a state or region rather than a neighbourhood. A query with no match returns an empty list. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/propiedades-com-api/propiedades_com_autocomplete](https://scrappa.co/docs/propiedades-com-api/propiedades_com_autocomplete)
- **API group:** Propiedades.com API
- **Endpoint:** `GET https://scrappa.co/api/propiedades-com/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 | Search text, 2 to 100 characters. Example: polanco. |
| `purpose` | string | No | sale (default), rent or both. |
| `type` | string | No | residential (default), commercial or industrial. |
| `subtype` | string | No | A subtype of the type, as in the search route. Omit for all. |

## Example response

```json
{
    "data": {
        "items": [
            {
                "id": 150028,
                "path": "/polanco/departamentos-renta",
                "label": "Zona Polanco, Ciudad De M\u00e9xico",
                "is_state": false,
                "latitude": 19.433333,
                "longitude": -99.2
            }
        ]
    },
    "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 | Propiedades.com 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)
