v1

latestSwagger 2.02026-07-13153383.1 KB
/1.0/search/cities

Search for a city.

Search for a city.

get/1.0/search/cities

Query parameters

countrystring

the city's country

namestring

name of the city

pinteger

the number of the result page you'd like to have

statestring

state the city lies in

stateCodestring

state code the city lies in

Response

Success

totalnumber

the total amount of items matching the query

pagenumber

the current page. starts at 1

itemsPerPagenumber

the amount of items you get per page

Example response

{
  "cities": [
    {
      "id": "5357527",
      "name": "Hollywood",
      "stateCode": "CA",
      "state": "California",
      "coords": {
        "long": -118.3267434,
        "lat": 34.0983425
      },
      "country": {
        "code": "US",
        "name": "United States"
      }
    },
    {
      "id": "...",
      "name": "...",
      "stateCode": "...",
      "state": "...",
      "coords": {
        "long": 12345,
        "lat": 12345
      },
      "country": {
        "code": "...",
        "name": "..."
      }
    }
  ],
  "total": 42,
  "page": 1,
  "itemsPerPage": 20
}