# Rentalia Locations

Unsigned location RPC used to obtain gid/glevel for search.

- **Documentation:** [https://scrappa.co/docs/rentalia-api/rentalia_locations](https://scrappa.co/docs/rentalia-api/rentalia_locations)
- **API group:** Rentalia API
- **Endpoint:** `GET https://scrappa.co/api/rentalia/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 | Location text, for example Madrid. |
| `lang` | string | No | Response language, default es. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/rentalia/locations?query=Madrid&lang=es"
```

## Example response

```json
{
    "success": true,
    "data": [
        {
            "id": 14,
            "geolevel": 3,
            "name": "Madrid"
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested house was not found. This response is not billable. |
| 422 | Validation Error | A public parameter is invalid. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. This response is not billable. |

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