Skip to content
Geocoding API

Geocoding API

The Geocoding API converts between addresses and coordinates. Use forward geocoding to get coordinates for a search term, or reverse geocoding to get an address from a location.

Data comes from OpenStreetMap and additional regional sources.

Try it

Search for a place and see the raw response from the Geocoding API. Clear the box to enter your own term.

Base URL

https://geocoder.maptoolkit.net

Authentication

Add your API key as ?api_key=YOUR_API_KEY to every request. See Authentication for details.

Forward Geocoding

Search for an address or place name and get back coordinates.

Endpoint:

GET https://geocoder.maptoolkit.net/search

Parameters:

ParameterTypeRequiredDescription
qstringYesThe address or place name to search for.
countrycodesstringNoLimit results to specific countries. Use ISO 3166-1 alpha-2 codes, comma-separated (e.g., de,at).
viewboxminLng,minLat,maxLng,maxLatNoPreferred area for results.
languagestringNoLanguage for result names. Default: de.
limitnumberNoMaximum number of results. Default: 10.
polygon0 or 1NoInclude polygon outlines in results. Default: 0.
callbackstringNoWrap the response in a JSONP callback.

Search terms are matched left-to-right first, then right-to-left if that fails. Commas are optional but improve performance: pilkington avenue, birmingham works better than birmingham pilkington avenue.

Example:

GET https://geocoder.maptoolkit.net/search?q=Kirchengasse%2C%20Wien&language=en&api_key=YOUR_API_KEY

Response:

[
  {
    "display_name": "Kirchengasse, Neubau, Wien, 1070, Österreich",
    "lat": "48.2006928",
    "lon": "16.3522368",
    "boundingbox": ["48.1994", "48.2020", "16.3510", "16.3535"],
    "place_id": "23708113",
    "osm_type": "way",
    "osm_id": "12345678"
  }
]

Reverse Geocoding

Get an address from a latitude and longitude.

Endpoint:

GET https://geocoder.maptoolkit.net/reverse

Parameters:

ParameterTypeRequiredDescription
latnumberYesLatitude of the location.
lonnumberYesLongitude of the location.
languagestringNoLanguage for the result. Default: de.
polygon0 or 1NoInclude polygon outline in result. Default: 0.
callbackstringNoWrap the response in a JSONP callback.

Example:

GET https://geocoder.maptoolkit.net/reverse?lat=48.2007&lon=16.3522&language=en&api_key=YOUR_API_KEY

Response:

{
  "display_name": "Kirchengasse 9, Neubau, Wien, 1070, Österreich",
  "lat": "48.2006928",
  "lon": "16.3522368",
  "place_id": "23708113",
  "osm_type": "node",
  "osm_id": "3016786133",
  "address": {
    "road": "Kirchengasse",
    "house_number": "9",
    "suburb": "Neubau",
    "city": "Wien",
    "state": "Wien",
    "postcode": "1070",
    "country": "Österreich",
    "country_code": "at"
  }
}

Examples

Working examples for this API, each with copyable source:

Errors

Errors return the HTTP status code with a plain-text message in the body.

StatusMeaning
403The API key is missing (Access denied!) or not recognized (Api-key not found!). See First Steps.
400The request is malformed, or the upstream geocoder rejected it.

The Geocoding API forwards upstream Nominatim errors and connection errors as-is, so a 400 body is often the upstream message rather than one Maptoolkit generates. Check the body text before assuming the fault is in your parameters.

Rate limits

Limits are monthly request quotas tied to your plan rather than a per-second rate: the service returns no RateLimit-* or Retry-After headers. Current allowances are on the pricing page.

The free Basic plan has a hard limit, so requests are refused once it is reached. On Pro and Ultra, requests past the allowance are billed rather than refused. Enterprise plans use a flexible limit.

Calls to this API count toward your plan’s API request allowance, which is the smaller of the two allowances.

Pricing

Self-service plans (Basic, Pro, and Ultra) are billed through RapidAPI; see RapidAPI for how to subscribe and authenticate. Plan limits and prices are listed on the Maptoolkit pricing page. Enterprise customers call the native hosts directly with a Maptoolkit API key.