maps.guru
Geocoding

Forward Geocoding (Search)

Convert addresses and place names into geographic coordinates using our geocoding search engine.

Forward geocoding converts human-readable addresses or place names into geographic coordinates.

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/search?text={query}&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

All parameters are forwarded to the geocoding engine.

ParameterTypeRequiredDefaultDescription
textstringYesSearch query (address, place name, POI)
sizenumberNo10Maximum results (1–40)
layersstringNoFilter by layer: venue, address, street, neighbourhood, borough, localadmin, locality, county, macrocounty, region, macroregion, country, coarse, postalcode
sourcesstringNoFilter by data source: osm, oa, gn, wof
boundary.countrystringNoISO 3166-1 alpha-2 or alpha-3 country code filter
langstringNoenResponse language (BCP 47)
focus.point.latnumberNoFocus latitude for proximity boosting
focus.point.lonnumberNoFocus longitude for proximity boosting

Example Request

curl "https://maps.guru/api/v1/geocoding/search?text=Eiffel+Tower&size=1&key=mapx_your_key"

With proximity boosting (results near Paris prioritized):

curl "https://maps.guru/api/v1/geocoding/search?text=Eiffel+Tower&size=1&focus.point.lat=48.8566&focus.point.lon=2.3522&key=mapx_your_key"

Example Response

Responses are GeoJSON FeatureCollection format:

{
  "geocoding": {
    "version": "0.2",
    "query": { "text": "Eiffel Tower", "size": 1 }
  },
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [2.2945, 48.8584]
      },
      "properties": {
        "id": "way:5013364",
        "gid": "openstreetmap:venue:way/5013364",
        "layer": "venue",
        "source": "openstreetmap",
        "name": "Tour Eiffel",
        "label": "Tour Eiffel, Paris, Île-de-France, France",
        "confidence": 0.98,
        "country": "France",
        "region": "Île-de-France",
        "locality": "Paris"
      }
    }
  ]
}

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 the geocoding engine and cached

Layers Reference

Use the layers parameter to restrict results to specific place types:

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

Data Sources

Use the sources parameter to restrict results to specific datasets:

SourceDescription
osmOpenStreetMap
oaOpenAddresses
gnGeoNames
wofWho's on First
Copyright © 2026