API

GET /api/v1/cities
GET /api/v1/cities    List cities. Optionally list cities near a point location.

Return an array of cities, ordered by city name.
Two optional parameters control paging: "page" and "per page" (see below). The default "page" value is 1. The default "per_page" value is 10.
To find cities nearest a given point, include "lat" and "lon" parameters (see below).
If lat & lon are not provided, cities are returned in alphabetical order by city name.

Parameters

page
(optional)
The number of the page. Default is 1. Must be between 1 and 10000.
per_page
(optional)
The number of cities returned per page. Default is 10. Must be between 1 and 500.
lat
(optional)
The latitude of the location to search.
lon
(optional)
The longitude of the location to search.

curl Examples

curl https://neighborland.com/api/v1/cities

Example Response

[
  {
    "id": "bldr",
    "url": "https://neighborland.com/api/v1/cities/bldr",
    "alternate_url": "https://neighborland.com/cities/bldr",
    "name": "Boulder",
    "state": "CO"
  }
]