Map Matching API Reference
Base URL
https://routing.maptoolkit.net
Endpoints
GET /match
Match a track to the road network
Returns the recorded track snapped to the ways it was most likely recorded on.
Use GET for short tracks only. A recording of any length will not fit in a query
string; use POST for those.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
point | query | array | No | A recorded coordinate in Note the order: this is the opposite of the Required unless |
gpx | query | string | No | URL of a GPX file to fetch and match. The service fetches it, not the browser, so a URL behind a login, on localhost or on a private network will fail. Required unless |
routeType | query | string | No | Network to match against. Defaults to Accepted values:
foot. One of: car, bike, foot, hike, roads. |
language | query | string | No | Language for the returned instructions as an ISO 639-1 code. Default: en. |
points_encoded | query | string | No | Set to false or 0 to return the matched geometry as a GeoJSON LineString instead of an encoded polyline. Default: true. One of: true, false, 0, 1. |
| Status | Description |
|---|---|
200 | The matched track. The schema is identical to the Routing API response, so a client that already renders a route needs no changes to render a match. The geometry is at |
400 | Plain-text body, not JSON. One of:
|
403 | Plain-text body, not JSON. One of:
|
500 | Internal server error. |
POST /match
Match a track to the road network (POST)
Identical to the GET form, with the track sent as
application/x-www-form-urlencoded fields rather than query parameters. This is the
form to use for a real recording, which will typically hold hundreds or thousands of
points.
The api_key stays in the query string even here. In the body it is ignored.
Request body. The same fields as the GET parameters, form-encoded. Repeat point once per
coordinate, or send a single gpx field holding a publicly reachable URL.
| Status | Description |
|---|---|
200 | The matched track. The schema is identical to the Routing API response, so a client that already renders a route needs no changes to render a match. The geometry is at |
400 | Plain-text body, not JSON. One of:
|
403 | Plain-text body, not JSON. One of:
|
500 | Internal server error. |
Try it
The console below sends live requests against the endpoints above. You can browse it
without an API key; Execute needs one, because every endpoint requires the api_key
query parameter and returns 403 without it. Use Authorize to add your key. See
First Steps if you do not have one yet.