Skip to content
RapidAPI

RapidAPI

Maptoolkit’s self-service plans (Basic, Pro, and Ultra) are available through the RapidAPI marketplace. RapidAPI handles subscription, billing, and key management for you, and proxies your requests to the Maptoolkit APIs through its own gateway.

Functionally the APIs are identical to the rest of this documentation - the same endpoints, the same parameters, the same responses. Only two things change when you go through RapidAPI: the host you call, and how you authenticate. This page documents those differences so you can take any example from the other API sections and adapt it for RapidAPI.

Looking for the native endpoints or Enterprise access instead? See First Steps. RapidAPI is the self-service path; Enterprise customers call the native hosts directly with a Maptoolkit API key.

When to use RapidAPI

Use the RapidAPI endpoints if you subscribed to a Basic, Pro, or Ultra plan through the RapidAPI marketplace. Your requests are authenticated with a RapidAPI key and routed through the RapidAPI gateway.

If you are an Enterprise customer, you do not use RapidAPI. You call the native Maptoolkit hosts directly and authenticate with a Maptoolkit API key — see First Steps.

Base URL

Most RapidAPI requests go to a single gateway host instead of the per-service Maptoolkit hosts:

https://maptoolkit.p.rapidapi.com

The path that follows identifies the service (/staticmap, /route, /geocode/search, …).

See the endpoint mapping below for the full list. Map tiles are the one exception - they are consumed via a style JSON URL, see Map tiles & styles.

Authentication

Native Maptoolkit requests are signed with the MTK-ApiKey header (or an api_key query parameter). On RapidAPI you authenticate with your RapidAPI key instead, using one of two methods.

As an HTTP header (recommended):

X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: maptoolkit.p.rapidapi.com

As a query parameter (simplest for testing):

https://maptoolkit.p.rapidapi.com/route?...&rapidapi-key=YOUR_RAPIDAPI_KEY

Your RapidAPI key is available in your RapidAPI dashboard once you have subscribed to a plan.

Never commit your key to source control or hard-code it in client-side code. Store it in an environment variable and, in browser apps, proxy requests through your backend so the key is never exposed to end users.

Endpoint mapping

The path and parameters are the same as in the native documentation — only the host changes. Take any example from the linked sections and swap in the RapidAPI host.

APINative host (other docs)RapidAPI endpoint
Static Mapsstaticmap.maptoolkit.net/maptoolkit.p.rapidapi.com/staticmap
Routingrouting.maptoolkit.net/routemaptoolkit.p.rapidapi.com/route
Map Matchingrouting.maptoolkit.net/matchmaptoolkit.p.rapidapi.com/match
Isochronerouting.maptoolkit.net/isochronemaptoolkit.p.rapidapi.com/isochrone
Geocoding (forward)geocoder.maptoolkit.net/searchmaptoolkit.p.rapidapi.com/geocode/search
Geocoding (reverse)geocoder.maptoolkit.net/reversemaptoolkit.p.rapidapi.com/geocode/reverse
Elevationelevation.maptoolkit.net/maptoolkit.p.rapidapi.com/elevation
Route Enhancementenhance.maptoolkit.net/routemaptoolkit.p.rapidapi.com/enhance/route
Routing Enhancement (cycleway routing)enhance.maptoolkit.net/routingmaptoolkit.p.rapidapi.com/enhance/routing

Map tiles & styles

Map tiles are not consumed through the gateway path. Instead, point your map library at a ready-made style JSON hosted under the RapidAPI styles path, with your key as a query parameter:

https://static.maptoolkit.net/rapidapi/styles/{style}.json?rapidapi-key=YOUR_RAPIDAPI_KEY

Available default styles include terrain, terrainwinter, light, and green.

MapLibre GL JS example:

let map = new maplibregl.Map({
  container: "map",
  style: "https://static.maptoolkit.net/rapidapi/styles/terrain.json?rapidapi-key=YOUR_RAPIDAPI_KEY",
  center: [11.40037, 47.26816],
  zoom: 12,
});