REST API integration
Call MapScale from any server language over HTTPS with JSON and GeoJSON responses.
Use the REST API for search, routing, matrices, static images and server-side workflows.
Base URL and authentication
Send production traffic to https://api.mapscale.io. Protected endpoints accept a key in X-MapScale-Key.
Read responses
Successful JSON responses use standard HTTP status codes. Search endpoints return GeoJSON-like features. Image and tile endpoints return binary content with an appropriate Content-Type.
Handle errors
Treat 400 as an input problem, 401 as missing authentication, 403 as a restriction problem, 429 as a signal to back off, and 5xx as retryable only with bounded exponential backoff.
Example 2 — a retryable upstream failure
When the geocoding backend is unreachable, the API answers with a 503 and the same {error:{code,message}} shape every endpoint uses — never a bare 500 or an HTML error page.