maps.guru
Geocoding

Nearby Search

Find places, venues, and points of interest near a geographic coordinate using our Pelias-powered geocoding engine.

Nearby search returns places sorted by distance from a given point. Use it for "what's around me" features, nearby POI discovery, or location-based recommendations.

Try It

Enter your API key to see live map demos.

Don't have one? Get your free API key

Endpoint

GET https://maps.guru/api/v1/geocoding/nearby?point.lat={lat}&point.lon={lon}&key={api_key}

Authentication

API key required via one of:

  • Query parameter: ?key=mapx_your_key
  • Header: Authorization: Bearer mapx_your_key
  • Header: X-API-Key: mapx_your_key

Parameters

ParameterTypeRequiredDefaultDescription
point.latnumberYesLatitude of the center point (-90 to 90)
point.lonnumberYesLongitude of the center point (-180 to 180)
boundary.circle.radiusnumberNo50Search radius in kilometres (max 50)
sizenumberNo10Maximum results (1–40)
layersstringNoFilter by layer: venue, address, street, neighbourhood, locality, county, region, country, coarse, postalcode
sourcesstringNoFilter by data source: osm, oa, gn, wof
langstringNoenResponse language (BCP 47)

Example Request

Find places near Baner, Pune:

curl "https://maps.guru/api/v1/geocoding/nearby?point.lat=18.559&point.lon=73.786&size=5&key=mapx_your_key"

With a smaller radius and venue filter:

curl "https://maps.guru/api/v1/geocoding/nearby?point.lat=18.559&point.lon=73.786&boundary.circle.radius=1&layers=venue&size=10&key=mapx_your_key"

Example Response

Responses are GeoJSON FeatureCollection format with results sorted by distance:

{
  "geocoding": {
    "version": "0.2",
    "query": {
      "point.lat": 18.559,
      "point.lon": 73.786,
      "size": 5
    }
  },
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [73.787145, 18.558889]
      },
      "properties": {
        "id": "way:264286363",
        "gid": "openstreetmap:venue:way/264286363",
        "layer": "venue",
        "source": "openstreetmap",
        "name": "Baneshwar Temple",
        "label": "Baneshwar Temple, Pune, MH, India",
        "confidence": 0.7,
        "distance": 0.121,
        "country": "India",
        "region": "Maharashtra",
        "county": "Pune",
        "locality": "Pune"
      }
    }
  ]
}

The distance property indicates how far (in kilometres) each result is from the queried point.

Caching

Responses are cached for 1 hour at the edge using Cloudflare KV. The X-Cache response header indicates cache status:

  • X-Cache: HIT — served from cache
  • X-Cache: MISS — fetched from Pelias and cached

How Nearby Differs from Reverse Geocoding

FeatureNearbyReverse
PurposeFind what's around a pointFind the address of a point
ResultsMultiple places sorted by distanceClosest matching address
Use case"Show me restaurants nearby""What address is at this pin?"
Default radius50 kmN/A (closest match)
Layer filterCommonly venueCommonly address

Layers Reference

LayerDescription
venuePoints of interest, businesses, landmarks
addressStreet-level addresses
streetStreet names
neighbourhoodNeighbourhoods and districts
localityCities and towns
countyCounties
regionStates and provinces
countryCountries
postalcodePostal codes
coarseAll administrative layers combined
Copyright © 2026