Schemas
GatewayError
errorcodeAn additional numeric code identifying the rejection, in a range the engine does not
use. Additive: clients that read error as a string are unaffected.
Retry on the status; read the code to explain. More than one rejection shares a
status, in both directions — a 429 may be a per-minute rate limit or a concurrency
refusal, and a 403 may be an invalid key, an exhausted monthly quota, or a request
from a web origin the key is not permitted to use. So the status is the reliable
signal for whether to retry, and the code is the reliable signal for what to tell
someone. New codes may be added within the range; a client that branches on the
status keeps working when they are.
Coordinate
A [longitude, latitude] pair, in that order.
MatrixRequest
locationsThe points the matrix is computed over. At least two.
sourcesIndices into locations to use as sources. Omit, or send ["all"], for every
location. This field is half of what the request costs.
destinationsIndices into locations to use as destinations. Omit, or send ["all"], for every
location. This field is the other half of what the request costs.
metricsWhich matrices to return. Defaults to durations only.
resolve_locationsReturn the name of the nearest road for each snapped point.
unitsUnits for the distance matrix. Durations are always seconds.
idAn arbitrary identifier echoed back in the response metadata.
MatrixResponse
durationsTravel times in seconds, as rows of sources by columns of destinations. A null
entry means no route was found between that pair.
distancesDistances, present only when requested via metrics.
The engine's metadata block, passed through unchanged, plus our added element count.
SnappedPoint
locationA [longitude, latitude] pair, in that order.
snapped_distanceMetres from the requested point to the road it was snapped to.
nameRoad name, present only when resolve_locations was set.
DirectionsRequest
coordinatesThe waypoints, in order, starting at the origin.
preferenceunitslanguageLanguage for turn instructions.
instructionsInclude turn-by-turn instructions. Default true.
instructions_formatgeometryInclude the route geometry. Default true.
geometry_simplifyelevationextra_infoattributescontinue_straightalternative_routesRequest alternative routes.
optionsAdvanced routing options such as avoid_features or avoid_polygons.
Note: requests carrying options are computed in the engine's flexible mode,
which bypasses its speed-up structures and is roughly ten times more expensive. The
engine applies a much smaller size limit to them.
radiusesbearingsmaximum_speedsuppress_warningsidDirectionsJsonResponse
bboxThe engine's metadata block, passed through unchanged, plus our added element count.
IsochronesRequest
locationsThe centres of the isochrones.
rangeThe ranges to compute, in seconds or metres depending on range_type. The engine
enforces a maximum; exceeding it returns error 3004 naming the limit.
range_typeWhether range is seconds or metres. Default time.
intervalProduce intermediate bands at this step within each range.
unitsarea_unitslocation_typeWhether the locations are origins (start, the default) or destinations — the
difference matters on one-way roads.
attributesintersectionssmoothingidIsochronesResponse
typebboxThe engine's metadata block, passed through unchanged, plus our added element count.
Metadata
attributionRequired by licence. The Open Database Licence obliges this credit to travel with the data; it is never removed or altered.
servicetimestampMilliseconds since the Unix epoch.
queryThe request, echoed back.
element_countAdded by this service. How many elements this call was metered for. Zero-cost and failed calls are not metered at all.