Web APIs

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.

30,000 routes a month freeIdempotent billing on retriesServer client for TypeScript
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"}'
The APIs

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-stop
core_routing

A 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 distances
route_matrix

Driving 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 details
placesBeta

Autocomplete 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 route
Planned

The 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 drive
road_attributes

The 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-light
safety_camerasBeta

Fixed 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 rounds
fleet_optimization

The 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 module
Planned

Routes 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.

Keys and features

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
403 · Missing feature
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"
}
Conventions

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.

Errors

One set of error codes

The REST API and all four SDKs share the same codes, so your error handling reads the same everywhere.

CodeWhat it means
invalid_requestThe request was malformed
invalid_api_keyThe key is missing, wrong or revoked
capability_requiredThe key doesn't have this feature; capability names it
app_not_allowedThe key is limited to other apps
billing_inactive, usage_allowance_exhaustedThe account can't be charged for this call, or a cap was reached
rate_limitToo many requests; Retry-After says when to try again
route_unresolvedThere is no route between those points
Server client

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
TypeScript
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
Start building

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.

Proposal · draft