GET
/v4/nearest-cities.jsonNearest Cities API
Find cities closest to a given coordinate. Useful for location-based recommendations and regional content delivery.
Try in Playground →Authentication
Include your API token in the request header:
X-Authorization-Token: your_token_here
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| latitude | number | Required | Latitude of the reference point |
| longitude | number | Required | Longitude of the reference point |
| limit | number | Optional | Number of cities to return (default: 10) |
Code Examples
curl "https://apihub.latlong.ai/v4/nearest-cities.json?latitude=VALUE&longitude=VALUE" \ -H "X-Authorization-Token: YOUR_TOKEN"
Response
JSON200 OK
{
"status": "success",
"code": 1001,
"data": [
{ "name": "Bangalore", "distance": "0.5 km", "state": "Karnataka" },
{ "name": "Whitefield", "distance": "18.2 km", "state": "Karnataka" },
{ "name": "Electronic City", "distance": "20.1 km", "state": "Karnataka" }
]
}Ready to try it?
Test this API interactively in the playground.

