API reference
Base URL: https://api.maprouter.dev. JSON in and out, GeoJSON for places (longitude first).
Send the key as Authorization: Bearer mr_…, or as ?key= on URLs a browser fetches directly
(tiles, styles, TileJSON, autocomplete, time zones). The OpenAPI file describes
the same endpoints.
Every metered response carries X-MR-Credits-Used, X-MR-Balance and RateLimit-Policy.
JSON bodies from geocoding include an attribution field.
Maps
GET /v1/styles/{name}.json
A complete MapLibre style with your key baked into every URL. Names: survey, survey-dark,
light, dark, white, grayscale, black. Optional lang (default en). Publishable or
secret key. Free.
GET /v1/tiles/{z}/{x}/{y}.mvt
Vector tiles from the OpenStreetMap planet, zoom 0 to 15. Publishable or secret key. 1 credit.
A tile with no data returns 204.
GET /v1/tiles.json
TileJSON for the tileset. Free.
Search
GET /v1/geocode
Address or place to coordinates. Secret key. 10 credits.
| Parameter | |
|---|---|
q |
Required. Up to 300 characters, e.g. 221B Baker Street, London |
limit |
1 to 20, default 5 |
countries |
Comma-separated ISO codes, e.g. GB,IE |
bbox |
minLon,minLat,maxLon,maxLat |
lang |
en, de, fr, it, or default for local names |
Search tolerates misspelt words (“Baker Stret”) but ranks worse when letters are missing from
a short word (“Bakr Street”), so pass countries or bbox when you can.
GET /v1/autocomplete
Suggestions while someone types. Same parameters as geocode, plus focus=lat,lon to prefer
nearby results. Publishable or secret key. 2 credits per request; debounce keystrokes.
GET /v1/reverse?lat=&lon=
The nearest address or place. Optional lang. Secret key. 10 credits.
POST /v1/geocode/batch
Up to 1,000 queries in one request. Secret key. 8 credits per query; failed items are free.
{ "queries": ["10 Downing Street, London", { "q": "Cambridge", "countries": "GB" }] }
Returns { "results": [{ "q", "features" }, …], "failed": 0 } in the same order.
Time zones
GET /v1/timezone?lat=&lon=
{ "timezone": "Europe/London", "utc_offset": "+01:00", "utc_offset_seconds": 3600, "dst": true, "local_time": "2026-07-01T13:00:00+01:00" }
Publishable or secret key. 1 credit.
Account
All secret key only, and free.
GET /v1/account/usage
Balance (free today and paid), the free tier, and this key’s caps.
POST /v1/projects
Creates a project with a publishable key locked to origins and a secret key, and returns env
lines. Body: { "name": "store locator", "origins": ["https://shop.example"] }.
GET /v1/keys
Active keys on the account, without secrets.
POST /v1/keys/{id}/budget
Lowers daily_cap and/or monthly_cap. Raising returns 403 raise_not_allowed: only a person
can raise a cap, in the dashboard.
Limits
| API rate, free | 50 requests per 10 seconds per key |
| API rate, paid | 250 requests per 10 seconds per key |
| Tiles | 1,000 per 10 seconds per key |
| Batch | 1,000 queries per request |
Bulk tile downloads are slowed down; for those, use the free Protomaps planet file instead.