Skip to main content

Overview

Compares the SuperSafe cycling route between two points against the most direct cycling route and returns a short explanation of the difference, for example "Takes the C13 cycleway and avoids moderately busy Goldsmiths' Row. Most of the ride is on cycleways and quiet streets, for about a minute more.". Use it to caption a SuperSafe route in your own UI. Call it alongside POST /multi-modal/v2/ rather than before it: the explanation is a label for a route you are already showing, and it takes 1 to 2 seconds longer to produce than the route itself. Pass the route pair back as context so the explanation can cover everything the response already told you about it: how much of each route is on cycleways, quiet streets and main roads, how well lit each is at night, the climbing, the time difference, and what the SuperSafe route steered around. The explanation is generated text, two or three sentences, capped at 320 characters, in English. It is not deterministic: the same request can produce different wording on different calls. Display it, do not parse it, and do not use it as a cache key. SuperSafe routing is available in supported cities (NYC, LA, SF Bay Area, Chicago, London).

Authentication

This endpoint requires an API key. Include it in the apikey header:
A valid user session is also accepted and grants higher rate limits.

Rate limits

Each call runs two routes and generates text, so this endpoint is limited more tightly than the routing endpoints: 10 requests per minute for API keys, 20 requests per minute for user sessions. On 429, honor the Retry-After header.

What the explanation can say

The first sentence names the single most important difference: a road closure or roadworks the route detours around when one applies at the departure time, otherwise the busiest street it avoids and what it takes instead. It names at most one street per side there, only mentions streets that appear on one of the two routes, and names a signed cycle route reference (C13, CS7) in preference to the underlying street. The later sentences, present only when context gives them something to say, describe the whole route: the share of the ride on cycleways and quiet streets, lighting on nighttime comparisons, a restricted turn or rider-reported street it avoids, and climbing. Time is mentioned only when the SuperSafe route is at least a minute longer, in whole minutes; the explanation never claims the two routes take the same time, and never states percentages or distances.

Request body

array
required
Start point as [longitude, latitude].
array
required
End point as [longitude, latitude].
boolean
default:"false"
Compare the routes on the nighttime cost tier, which prefers lit streets. Pass the metadata.nighttime value from the routes you are showing so the sentence describes the same pair of routes.
string
Planned departure as "YYYY-MM-DDTHH:mm" with no timezone offset, interpreted in the route city’s timezone. Determines which temporary road avoidances apply to the comparison. Pass the same value you routed with. Omit to compare for now. Unparseable values return 400.
object
The pair of routes you are showing, summarised from the POST /multi-modal/v2/ response. Without it the explanation only covers the streets where the two routes differ. A malformed value returns 400 naming the field.
  • safe (object, required) and direct (object or null): one summary per route, direct being null when the response collapsed the two onto one route. Each carries label (the option’s label), meters, seconds, climb_meters and descent_meters (the leg totals), character_meters (metres of the cycling legs on each safety_classification: cycleway, quiet, shared, moderate, busy) and lit_share (the fraction of the cycling distance on lit steps, 0 to 1; null on daytime comparisons).
  • avoided (array, required): the SuperSafe option’s avoidance entries in plain words, up to 12. Each has kind (busy_street, restricted_turn, roadworks, closure_window or rider_report) and name (the street, or null), plus per kind: meters for a busy street; onto for a restricted turn; schedule (the window in words, for example "Saturdays 09:00–17:00"), attribution (who reported it) and severity (closed or avoid) for a window; attribution and severity for a rider report.

Response body

string | null
The explanation, two or three sentences and at most 320 characters. A lone sentence carries no trailing period; a longer explanation keeps its punctuation. When the two routes are the same it is the fixed sentence "The most direct route as well as the quietest". null when no route exists, or when the difference could not be put into words.
boolean
true when the SuperSafe route and the most direct route follow the same roads, or differ only by fragments under 30 m. There is nothing to explain, and summary carries the fixed sentence above.
boolean
Present and true when at least one of the two routes could not be computed, for example when the origin or destination is too far from a road. Absent otherwise.

Variants

Night comparison

Riders choosing a route after dark are comparing different roads, because night routing prefers lit streets. Pass nighttime so the sentence can mention lighting:
JavaScript

With the route pair as context

Pass the routes you are showing so the explanation can describe the whole ride, not only the streets that differ. Build context from the Personal SuperSafe option and its Direct sibling:

Comparison at a future departure

Pass departure_time when the rider has picked a departure other than now, so closures that apply at that time are reflected in the sentence. A street market that closes a road on Saturday mornings is a difference worth naming, and only shows up when the comparison is made for that window:

Error responses

400 Bad request

Out-of-coverage routing carries a machine-readable code:

401 Unauthorized

405 Method not allowed

Method other than POST.

429 Too many requests

Includes a Retry-After header with the seconds until the current window closes:

500 Internal server error