# Inmuebles24 Locations

Autocompletes Mexican locations. Each result carries a V1-* id that can be passed straight to the search endpoint as location. Results are ranked; country_id tunes ranking for Mexican queries.

- **Documentation:** [https://scrappa.co/docs/inmuebles24-api/inmuebles24_locations](https://scrappa.co/docs/inmuebles24-api/inmuebles24_locations)
- **API group:** Inmuebles24 API
- **Endpoint:** `GET https://scrappa.co/api/inmuebles24/locations`

## 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 | Text to search for, such as guadalupe. |
| `limit` | integer | No | Maximum number of suggestions, 1-50. |
| `country_id` | integer | No | Country id used for ranking. Defaults to 18 for Mexico. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/inmuebles24/locations?query=guadalupe&limit=10"
```

## Example response

```json
{
    "success": true,
    "data": {
        "locations": [
            {
                "id": "V1-C-1229",
                "name": "Guadalupe",
                "label": "CIUDAD"
            }
        ]
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is invalid. Unknown operations, property types, currencies and sort values are rejected here rather than upstream, because upstream answers them with an empty result that looks like a valid answer. This response is not billable. |
| 402 | Payment Required | The request carried neither an API key nor an x402 payment signature, so it was answered with a payment challenge before the lookup ran. Nothing was charged. Send an X-API-KEY header, or retry with a PAYMENT-SIGNATURE. |
| 503 | Upstream Unavailable | Inmuebles24 could not be reached through any approved route within the attempt budget. Nothing was charged and the request is safe to retry. |

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