Skip to main content
GET
Find countries, states, or cities near a lat/lng coordinate. Results are ordered from nearest to farthest.
This is not address search. It does not:
  • Find a street address
  • Check whether a point is inside a country or state border
  • Return country/state map shapes
  • Calculate travel time or road distance
It measures straight-line distance to the stored coordinate for a city, state, or country.
Availability: Professional and Business plans. Other plans receive 403. Compare plans, or see Trying it without a paid plan below.

Authentication

string
required
Your API key for authentication

Query Parameters

number
required
Latitude of the search origin. -90 to 90.
number
required
Longitude of the search origin. -180 to 180.
string
default:"city"
What to search. One of city, state, or country.
string
Only return results from this country. Use a two-letter country code such as IN or US. Do not use this with type=country.
string
Only return cities from this state. This works only with type=city and requires country.
string
Only return this kind of city. This works only with type=city. Choose settlement, administrative, section, or unknown. See City Types.
integer
Only return results with at least this population. Use a whole number of 0 or more.
number
default:"25"
Search radius in kilometers. 1500.
integer
default:"20"
Maximum number of results to return. 1100.
string
Add localized_name and matched_locale to each result. Example: ja or pt-BR. Professional and Business plans only. See Localized Place Names.
boolean
default:"false"
Include the full raw translations JSON string. Professional and Business plans only.

Response

Returns an array, nearest-first. Each item carries the standard fields for the entity at your plan’s data-access level, plus:
number
Straight-line distance from your coordinate, in kilometers, rounded to two decimal places.
string
The city kind. Included only in city results.
string
The display name for locale, when requested and available on your plan.
string
The locale used for localized_name, including fallback values such as native or en.
State and city results always include country_name (and, for cities, state_name), regardless of your plan’s data-access level — useful for display without a second lookup. This differs from Autocomplete, which instead always includes country_code/state_code on city results; nearby search doesn’t force those two.

Trying it without a paid plan

The interactive API documentation uses a shared Playground plan. It is only for trying the endpoint in the docs. For your own app, choose a Professional or Business plan. The CLI also provides a csc nearby command for this endpoint.