API reference

The API is served from https://api.maprouter.ai. Responses are GeoJSON, so standard clients — QGIS, geopandas, MapLibre — read them without an SDK.

Authentication

Pass your key as a bearer token. Keys look like mr_live_… and are shown once at issue time; we store only a hash, so a lost key is replaced rather than recovered. Email us to get one.

export MAPROUTER_KEY="mr_live_..."

curl https://api.maprouter.ai/v1/me \
  -H "Authorization: Bearer $MAPROUTER_KEY"

Endpoints

MethodPathKeyDescription
GET/v1/healthStatus and the edge location serving you.
GET/v1/meRequiredKey metadata — user, balance snapshot, rate limit.
GET/v1/creditsRequiredRemaining credit.
GET/v1/collectionsRequiredCollections available to your key.
GET/v1/collections/{id}RequiredCollection metadata, OGC API - Features shape.
GET/v1/collections/{id}/items?bbox=RequiredFeatures intersecting a bounding box, as GeoJSON.
POST/v1/spatial/isochroneRequiredTravel-time contours from a point.

Querying features

A bounding box is min_lon,min_lat,max_lon,max_lat.

curl "https://api.maprouter.ai/v1/collections/texas_counties/items\
?bbox=-97.75,30.25,-97.70,30.30" \
  -H "Authorization: Bearer $MAPROUTER_KEY"

Errors

Errors return { "error": { "type", "message" } }. Branch on type, not the message.

StatusTypeCause
401missing_api_keyNo Authorization header, or malformed.
401invalid_api_keyKey not recognised.
402insufficient_creditsBalance has reached zero.
429rate_limitedOver the rate limit for your key.
503auth_unavailableAuthentication temporarily unreachable. Retry.