Routes, places and road data over plain HTTPS.
Routes with guidance and speed limits, travel-time matrices, place search, traffic, road data and safety cameras. JSON in, JSON out, one key header, and errors that tell you exactly what to fix.
curl -X POST https://api.meridianatlas.dev/v1/routes \ -H "X-Atlas-Key: $ATLAS_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"origin":[-2.2511,53.4747],"destination":[-2.246,53.4837],"profile":"quickest"}'
HTTP/1.1 200 OK Atlas-Request-Id: 4f1c8a2e-… Atlas-Usage-Operation: route.single Atlas-Usage-Units: 1 { "routeId": "route_01J…", "distanceMetres": 1480.6, "durationSeconds": 342.5, "polyline": [[-2.2511, 53.4747], …], "speedSections": [{ "speedLimitMph": 30, … }], "speedLimitCoverage": { "complete": true, … }, "guidance": [ { "kind": "bear_left", "atMetres": 920, "instruction": "Bear left onto A34 John Dalton Street", … } ], "guidanceAvailable": true } // abridged example
Everything a driving app asks a server
Each API is a feature you switch on per key, with its own free monthly allowance. Use one, or all of them.
Routes
Single and multi-stopA route with its guidance steps, lanes and the speed limit on every known section. Plan for a departure time, and pass the car's heading so a reroute starts the way it is facing. Traffic-aware routes use a recorded traffic feed in the beta; live traffic is planned.
- quickest or shortest
- departureTime
- traffic: "aware"
- heading
- POST
/v1/routesOne route - POST
/v1/routes/ordered-multi-stop2 to 64 stops, in order
Route Matrix
Times and distancesDriving times and distances from up to 25 origins to up to 25 destinations in one call: which van is nearest the job, which job suits each driver. Charged per resolved cell: a pair with no route is free.
- 25 × 25
- 625 cells
- quickest or shortest
- POST
/v1/route-matrixOrigins × destinations
Places
Search and detailsAutocomplete as the user types, text and nearby search, place details and photos. One session token from first keystroke to pick, and field masks so you only pay for and receive what the screen shows.
- POST
/v1/places:autocompleteAs you type - POST
/v1/places:searchTextText search - POST
/v1/places:searchNearbyNearby - GET
/v1/places/{placeId}Details - GET
/v1/places/{placeId}/photos/{photoId}/mediaPhoto
Traffic
Advisories on a routeThe delay on a route you already have, and how fast each stretch is moving: normal, slow, a traffic jam, or unknown when there is no evidence either way. It comes later, once Atlas has live traffic data, and isn't on sale in the beta. Tell us if you need it.
- delaySeconds
- speed intervals
- Coming later
- POST
/v1/traffic/route-advisoryDelay along a route
Road data and speed limits
For free driveThe roads within 50 to 2,000 m of a point, with their names, numbers, classes, one-way flags and speed limits, including UK national limits. It answers the SDK's free-drive request for nearby roads.
- POST
/v1/roads/nearbycentre, radiusM
Safety cameras
Speed and red-lightFixed speed and red-light camera locations in a map window, up to 5,000 at a time, for roadside pins and approach alerts. In beta: the locations are mapped, and a camera's activity isn't yet verified.
- GET
/v1/cameras?west=…&south=…&east=…&north=…A map window
Stop-order optimisation
Delivery roundsThe best order to visit up to 25 stops. Send the stops' locations and Atlas works out the travel times between them, included in the price: no route matrix to buy first. Jobs run in the background and can be resumed, so a long optimisation never ties up a request. Server keys only.
- POST
/v1/stop-optimizationsSubmit a job - GET
/v1/stop-optimizations/{jobId}Progress - GET
/v1/stop-optimizations/{jobId}/resultThe order
HGV routing
Optional moduleRoutes for goods vehicles that respect height, weight and width limits and other restrictions. Planned as an optional module with its own key feature, hgv_routing; it isn't in the first release. Tell us if you need it.
- height
- weight
- width
- restrictions
From SDK 0.1.0-rc.2, the SDKs call POST /v1/navigation/legs when guidance to a destination starts (one leg). After launch they will also call GET /v1/offline/freshness to keep offline maps current. You don't call these yourself.
Every key says what it can do
Every API needs an API key with that feature switched on. Turn features on and off for each key in Atlas Studio. A call for a feature the key doesn't have is refused, and the error names the missing feature and says where to add it.
- Server keys for your backend: any feature, including stop-order optimisation
- App keys for iOS and Android apps, limited to your bundle IDs and package names, and on Android to your signing certificate. Restricted app keys need SDK 0.1.0-rc.2 or later, which sends your app's bundle ID or package name and signing certificate automatically.
- Rotate a key and the old one keeps working for 7 days while you ship the new one
HTTP/1.1 403 Forbidden Atlas-Request-Id: 8c2e41d0-… { "error": "capability_required", "message": "This API key doesn't include Route Matrix. Add it to the key in Atlas Studio.", "requestId": "8c2e41d0-…", "capability": "route_matrix" }
Predictable by design
The same rules on every endpoint, and the same error codes in every SDK.
HTTPS and JSON
Every call is HTTPS with a JSON body. Plain HTTP is accepted only from localhost during development.
One key header
Send your key as X-Atlas-Key. Keys never travel in the URL, and the SDKs refuse redirects so a key can't follow one.
Retries count once
Billed calls take an Idempotency-Key. Retry with the same one and you are charged once.
See what you were billed
Atlas-Usage-Units and Atlas-Usage-Operation on every billed response. A reroute inside a leg shows 0 units.
A request ID for support
Atlas-Request-Id on every response, and requestId in every error. Quote it and we can find the call.
Back off politely
Too many requests returns rate_limit with Retry-After, so you know exactly when to try again.
One set of error codes
The REST API and all four SDKs share the same codes, so your error handling reads the same everywhere.
| Code | What it means |
|---|---|
invalid_request | The request was malformed |
invalid_api_key | The key is missing, wrong or revoked |
capability_required | The key doesn't have this feature; capability names it |
app_not_allowed | The key is limited to other apps |
billing_inactive, usage_allowance_exhausted | The account can't be charged for this call, or a cap was reached |
rate_limit | Too many requests; Retry-After says when to try again |
route_unresolved | There is no route between those points |
Typed, from your backend
@meridianatlas/api is a TypeScript client for Node 20 and later, in preview: routes, multi-stop, matrices, traffic advisories and stop-order optimisation, with typed results and errors.
- Keep server keys in your secret store, never in an app or browser bundle
- Every result carries the usage it was billed
import { AtlasClient } from "@meridianatlas/api"; const atlas = new AtlasClient({ baseUrl: process.env.ATLAS_BASE_URL!, apiKey: process.env.ATLAS_API_KEY!, }); const result = await atlas.route({ origin: [-2.2426, 53.4808], destination: [-2.1165, 53.5444], profile: "quickest", traffic: "aware", }); for (const step of result.data.guidance) console.log(step.atMetres, step.instruction); console.log(result.usage.units); // 1
Your first route in one request
Create a key with Routes switched on and run the request above. The first 30,000 routes each month are free; after that, £0.50 per 1,000. Proposed prices, in GBP, before VAT.