Search locations

Search locations

GET/cars/locations

Pickup and dropoff on a car search are location ids, not names. This call turns a name or a code into the locationId you send as pickupLocation or dropoffLocation.

Send X-API-Key the same way as on every other call. query is required. type defaults to city. country and locale default to US and en.

Which id to send

Use locations[].locationId. A city id is numeric (22863 is Austin, Texas). An airport id is often the IATA code. The same place can appear twice — once as a city, once as an airport — with the same id.

A query that matches nothing returns 200 with an empty locations list. A missing query, a blank query, a bad locale, or an unsupported country returns 400. If the lookup itself fails, the response is 502 LOCATIONS_UNAVAILABLE.

Read more

What a car rental search API does, and what it does not: car rental API. Why one search lists several sellers for the same car: car rental aggregator API.

Parameters

Query parameters.

querystringRequired

City name, airport name, or code. 1 to 80 characters. A blank value is rejected.

typestring

Which places to return. Defaults to city.

Possible values

city

Default. Cities, and city-level airport matches.

airport

Airports only.

all

Cities and airports.

countrystring

ISO 3166-1 alpha-2 market. Omit it for US. Any other value is rejected. Same set as on a car search.

Possible values

USGBDEFRESITNLBEATCHIEPTGRPLCZROSENODKFITRAESAILINJPKRHKTWSGMYTHIDPHVNAUNZCAMXBRARCLCOPEUYPYBOECVECRPAGTHNNISVDOPRZAUA
localestring

2-letter language code. Omit it for en. Anything that is not two letters is rejected.

Returns

A successful response, captured live.

                        {
  "query": "austin",
  "locations": [
    {
      "locationId": "22863",
      "name": "Austin, Texas, United States",
      "city": "Austin",
      "country": "United States",
      "countryCode": "US",
      "locationType": "city",
      "airportCode": "AUS",
      "timezone": "America/Chicago"
    },
    {
      "locationId": "22863",
      "name": "Austin Bergstrom, Austin, Texas, United States, (AUS)",
      "city": "Austin",
      "country": "United States",
      "countryCode": "US",
      "locationType": "airport",
      "airportCode": "AUS",
      "timezone": "America/Chicago"
    },
    {
      "locationId": "34419",
      "name": "Austin, Minnesota, United States",
      "city": "Austin",
      "country": "United States",
      "countryCode": "US",
      "locationType": "city",
      "airportCode": "AUM",
      "timezone": "America/Chicago"
    },
    {
      "locationId": "29818",
      "name": "Austin, Nevada, United States",
      "city": "Austin",
      "country": "United States",
      "countryCode": "US",
      "locationType": "city",
      "airportCode": "ASQ",
      "timezone": "America/Los_Angeles"
    },
    {
      "locationId": "30031",
      "name": "Austin, Arkansas, United States",
      "city": "Austin",
      "country": "United States",
      "countryCode": "US",
      "locationType": "city",
      "airportCode": null,
      "timezone": "America/Chicago"
    },
    {
      "locationId": "12514",
      "name": "Austin, Chicago, Illinois, United States",
      "city": "Chicago",
      "country": "United States",
      "countryCode": "US",
      "locationType": "city",
      "airportCode": null,
      "timezone": "America/Chicago"
    }
  ]
}