# EconomyCarRentals Location Autocomplete

Find rental-car pickup locations by text. Responses group airports, offices, railway stations, and hotels when available, and include country metadata plus opaque hierarchy and selection keys. A confirmed no-match returns empty groups and is not billed. This endpoint does not provide live availability, vehicles, prices, supplier terms, or booking.

- **Documentation:** [https://scrappa.co/docs/economy-car-rentals-api/economy_car_rentals_autocomplete](https://scrappa.co/docs/economy-car-rentals-api/economy_car_rentals_autocomplete)
- **API group:** EconomyCarRentals API
- **Endpoint:** `GET https://scrappa.co/api/economy-car-rentals/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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Unicode location text containing 3 to 120 characters. |
| `limit` | integer | No | Maximum upstream matches to consider. Defaults to 200; allowed range is 1 to 200. |
| `language_id` | string | No | Response language identifier. Version 1 supports 01 only. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/economy-car-rentals/autocomplete?query=LHR&limit=10&language_id=01"
```

## Example response

```json
{
    "search_parameters": {
        "engine": "economy_car_rentals_autocomplete",
        "query": "LHR",
        "limit": 10,
        "language_id": "01"
    },
    "groups": [
        {
            "type": "AIRPORT",
            "label": "Airport location",
            "icon": "fa-plane",
            "locations": [
                {
                    "name": "London Heathrow Heathrow Airport (LHR)",
                    "country_code": "GB",
                    "country_name": "United Kingdom",
                    "country_id": 25,
                    "hierarchy_key": "35;560;1956",
                    "selection_key": "1956;4633"
                }
            ]
        }
    ],
    "related_searches": [],
    "related_searches_label": "Related searches",
    "meta": {
        "endpoint_family": "autocomplete",
        "proxy_tier": "mobile-proxies",
        "attempts": 1,
        "duration_ms": 518
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | Returned when query, limit, or language_id is invalid. |
| 503 | Service Unavailable | Returned as a non-billable failure when the location source is temporarily unavailable or returns an invalid response. |

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