/search
Forward geocoding — turn an address or place name into coordinates.
GET https://api.geoheim.com/searchParameters
| Parameter | Type | Description |
|---|---|---|
qrequired | string | Free-form search query. Supports addresses, place names, postcodes. Unicode and transliteration are handled automatically."Kungsgatan 15, Stockholm" / "Munich" / "München" / "80331" |
format | stringdefault: "json" | Response format."json" | "jsonv2" | "geojson" |
countrycodes | string | Comma-separated ISO 3166-1 alpha-2 country codes. Restricts results to these countries."se" / "de,at,ch" / "us,ca" |
limit | integerdefault: 5 | Maximum number of results to return. Max: 50.10 |
addressdetails | integerdefault: 0 | Set to 1 to include a breakdown of the address into elements (road, city, country, etc).1 |
viewbox | string | Preferred area to search in, given as minLon,minLat,maxLon,maxLat. Results inside the viewbox are ranked higher."17.9,59.8,18.2,59.9" |
bounded | integerdefault: 0 | Set to 1 to strictly restrict results to the viewbox. Requires viewbox to be set.1 |
accept-language | string | Preferred language for results. Uses standard HTTP Accept-Language format. Falls back to local name."en" / "de,en;q=0.5" |
key | string | API key as query parameter. Alternative to Authorization: Bearer header. Header is preferred for security."hk_live_…" |
Example: basic search
curl "https://api.geoheim.com/search?q=Kungsgatan+15+Stockholm&format=json&addressdetails=1" \ -H "Authorization: Bearer hk_live_…"
Example: restrict to countries
curl "https://api.geoheim.com/search?q=Main+Street&countrycodes=us,ca&limit=3&format=json" \ -H "Authorization: Bearer hk_live_…"
Without countrycodes, "Main Street" returns results globally. Adding countrycodes=us,ca restricts to US and Canada.
Example: search within a bounding box
curl "https://api.geoheim.com/search?q=pizza&viewbox=18.0,59.3,18.1,59.4&bounded=1&format=json" \ -H "Authorization: Bearer hk_live_…"
With bounded=1, only results inside the viewbox are returned. Without it, results inside the viewbox are simply ranked higher.
GeoJSON response format
curl "https://api.geoheim.com/search?q=Stockholm&format=geojson" \ -H "Authorization: Bearer hk_live_…"
Response fields
place_idInternal Heimdall ID for this result.lat, lonWGS84 coordinates as strings.display_nameFull formatted address/name.typeResult type: "address", "city", "road", "postcode", etc.importance0-1 score indicating prominence. Cities > streets > house numbers.addressStructured address breakdown (when addressdetails=1). Fields vary by country.boundingboxArray of [south, north, west, east] as strings.osm_type, osm_idOpenStreetMap element type and ID.Nominatim-compatible
This endpoint accepts the same parameters and returns the same response format as Nominatim's /searchendpoint. If you're migrating from Nominatim, change the base URL — everything else works.