Skip to Content
APIGeineAPIGeine

Countries and states

Reference lists for country and state selectors.

Subscribe on RapidAPI

List countries

GET /places/v1/countries returns every country once, in alphabetical order of name. It takes no parameters.

{
  "success": true,
  "data": {
    "countries": [
      { "country_code": "AF", "country_name": "Afghanistan" },
      { "country_code": "AX", "country_name": "Åland Islands" }
    ]
  }
}

List the states of a country

GET /places/v1/countries/{country_code}/states returns the distinct state, province or region names of a country, in alphabetical order.

  • country_code is two letters and case-insensitive: us and US are the same.
  • An unknown code, or a country without states, returns an empty states array.
  • A code that is not two letters returns 400 INVALID_REQUEST.
{ "success": true, "data": { "country_code": "IN", "states": [{ "name": "Andaman and Nicobar Islands" }, { "name": "Andhra Pradesh" }] } }

Use country_code from the countries list to request states, and type=city&country_code=… on Autocomplete to search cities within the selected country.

On this page