Skip to Content
APIGeineAPIGeine

Autocomplete

Search cities, states and countries by name.

Subscribe on RapidAPI

GET /places/v1/autocomplete

Parameters

ParameterRequiredDefaultMeaning
qYesSearch text, 1-100 characters. Surrounding whitespace is ignored.
typeNoall typescity, state (state, province or region) or country.
country_codeNoall countriesTwo-letter country code, case-insensitive.
limitNo10Number of suggestions, 1-50.

Matching

  • Prefix match: a place matches when its name starts with q. san matches San Diego and Santa Clara, not Lausanne.
  • Case-insensitive: SAN, San and san give the same results.
  • Accents matter: são matches São Paulo, sao does not.
  • No match is not an error: you get 200 with an empty results array.

Ordering

  1. Name, alphabetically. An exact match always comes first (georgia returns Georgia before Georgiana).
  2. For the same name: countries, then states, then cities.
  3. Then by display_name.

Duplicate records of the same place are returned once. Different places can share a label (for example two towns with the same name in the same state); they are returned separately with their own coordinates.

Result fields

FieldTypeMeaning
idstringStable identifier, prefixed with the type (city:…, state:…, country:…)
typestringcity, state or country
namestringPlace name
display_namestringLabel for display: name, state (for cities) and country
country_codestringTwo-letter country code
country_namestringCountry name
state_namestring or nullState or region; null for countries
latitude, longitudestring or nullDecimal degrees, as strings
timezonestring or nullIANA time zone, for example Asia/Kolkata
currency_codestring or nullISO 4217 currency of the country

Missing values are always null; fields are never omitted.

On this page