Apple Maps API endpoint
Returns Apple Maps routes between an origin and a destination, with optional intermediate stops, for driving, walking, or cycling. Each route carries its name, whether it is Apple's main or an alternate route, distance, live/historic/free-flow durations, toll and highway flags, Apple's route description and traffic note, and per-leg turn-by-turn steps (maneuver, road, shield, instruction text, distance, duration); detail=full adds each leg's path as coordinates. Departure time and avoid-tolls/highways/stairs preferences are supported. Transit routing is not available.
/apple-maps/directionsQuery parameters:
origin_latitude, origin_longitude (required) — start point, e.g. 37.7749, -122.4194.destination_latitude, destination_longitude (required) — end point, e.g. 37.8199, -122.4783.via (optional) — intermediate stops as lat,lng pairs separated by |, e.g. 37.7955,-122.3937|37.8080,-122.4177. At most 8. With stops Apple returns a single route with one leg per segment instead of alternatives.mode (optional) — driving (default), walking, or cycling. Transit routing is not available.avoid_tolls, avoid_highways (optional, driving only) — prefer routes without tolls or highways.avoid_stairs (optional, walking only) — prefer routes without stairs.depart_at (optional) — departure time as RFC 3339, e.g. 2026-09-07T08:30:00Z; Apple then estimates with expected traffic for that time. Defaults to now.detail (optional) — summary (routes and legs only), steps (default; adds turn-by-turn steps), or full (adds each leg's path).lang (optional) — language for road names and instructions as a BCP 47 tag. Defaults to en-US.country (optional) — two-letter ISO 3166-1 code. Defaults to US.No routable path between the points returns a 404.
routes[] lists Apple's proposals, the first being Apple's preferred route; type is main or alternate. transport is driving, walking, or cycling. description is Apple's route label (e.g. Fastest, or a climb summary for walking and cycling) and traffic its traffic note for driving. duration_seconds is the live estimate; duration_historic_seconds and duration_freeflow_seconds the typical and no-traffic durations. Each legs[] entry covers one segment between stops with name, distance_meters, duration_seconds, steps[] (index, maneuver such as start_route, right_turn, keep_left, arrive_at_destination_right; road, shield, instruction, distance_meters, duration_seconds), and with detail=full a path[] of [latitude, longitude] pairs.
Response includes mode, origin, destination, via[], depart_at, and routes[].
| Field | Filled in, of 3 checked | Values in the sample |
|---|---|---|
| name | 3 | “Franklin St” and 2 other values |
| type | 3 | “main” and 1 other value |
| transport | 3 | “driving” |
| description | 2 | “Fastest” and 1 other value |
| traffic | 3 | “Traffic is moderate.” |
| distance_meters | 3 | 9,992 to 11,354, median 10,050 |
| duration_seconds | 3 | 1,388 to 1,461, median 1,432 |
| duration_historic_seconds | 3 | 1,281 to 1,403, median 1,364 |
| duration_freeflow_seconds | 3 | 799 to 1,019, median 878 |
| avoids_tolls | 3 | true in 3 of 3 |
| avoids_highways | 3 | true in 0 of 3 |
| legs | 3 | median 1 entry |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| origin_latitude | number | Yes | Origin latitude | 37.7749 | |
| origin_longitude | number | Yes | Origin longitude | -122.4194 | |
| destination_latitude | number | Yes | Destination latitude | 37.8199 | |
| destination_longitude | number | Yes | Destination longitude | -122.4783 | |
| via | string | No | Intermediate stops as lat,lng pairs separated by |, at most 8 | 37.7955,-122.3937 | |
| mode | string | No | driving | Travel mode. Defaults to driving. Allowed values: driving, walking, cycling. | driving |
| avoid_tolls | boolean | No | Driving only: prefer routes without tolls | false | |
| avoid_highways | boolean | No | Driving only: prefer routes without highways | false | |
| avoid_stairs | boolean | No | Walking only: prefer routes without stairs | false | |
| depart_at | string | No | now | Departure time as RFC 3339 for traffic-aware estimates. Defaults to now. | 2026-09-07T08:30:00Z |
| detail | string | No | steps | How much of each route to return. Defaults to steps. Allowed values: summary, steps, full. | steps |
| lang | string | No | en-US | Language for road names and instructions as a BCP 47 tag. Defaults to en-US. | en-US |
| country | string | No | US | Two-letter ISO 3166-1 country code. Defaults to US. | US |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/apple-maps/directions?origin_latitude=37.7749&origin_longitude=-122.4194&destination_latitude=37.8199&destination_longitude=-122.4783&mode=driving&avoid_tolls=true&avoid_highways=true&avoid_stairs=true&detail=summary&lang=en&country=us" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"mode": "driving",
"origin": {
"latitude": 37.7749,
"longitude": -122.4194
},
"destination": {
"latitude": 37.8199,
"longitude": -122.4783
},
"routes": [
{
"name": "Franklin St",
"type": "main",
"transport": "driving",
"description": "Fastest",
"traffic": "Traffic is moderate.",
"distance_meters": 10050,
"duration_seconds": 1206,
"duration_historic_seconds": 1150,
"duration_freeflow_seconds": 811,
"avoids_tolls": true,
"avoids_highways": false,
"legs": [
{
"name": "Franklin St",
"distance_meters": 10050,
"duration_seconds": 1206,
"steps": [
{
"index": 0,
"maneuver": "start_route",
"road": "S Van Ness Ave",
"shield": "101",
"distance_meters": 0,
"duration_seconds": 0
},
{
"index": 1,
"maneuver": "right_turn",
"road": "Otis St",
"instruction": "Turn right onto Otis St",
"distance_meters": 214,
"duration_seconds": 136
},
{
"index": 7,
"maneuver": "arrive_at_destination_right",
"road": "Golden Gate Bridge",
"shield": "101",
"instruction": "The destination is on your right",
"distance_meters": 4569,
"duration_seconds": 251
}
]
}
]
},
{
"name": "Van Ness Ave",
"type": "alternate",
"transport": "driving",
"description": "Fastest",
"distance_meters": 9992,
"duration_seconds": 1334,
"avoids_tolls": true,
"avoids_highways": false,
"legs": [
{
"name": "Van Ness Ave",
"distance_meters": 9992,
"duration_seconds": 1334
}
]
}
]
}
}Request schema
No body schema
Response schema
#/definitions/applemaps.directionsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | Code is the HTTP status code or a custom code used to indicate the result of the request @example 200 | |||
| data | applemaps.DirectionsResponse | No | ||||
| data.depart_at | string | No | ||||
| data.destination | applemaps.LatLng | No | ||||
| data.destination.latitude | number | No | ||||
| data.destination.longitude | number | No | ||||
| data.mode | string | No | ||||
| data.origin | applemaps.LatLng | No | ||||
| data.origin.latitude | number | No | ||||
| data.origin.longitude | number | No | ||||
| data.routes | array | No | ||||
| data.routes[].avoids_highways | boolean | No | ||||
| data.routes[].avoids_tolls | boolean | No | ||||
| data.routes[].description | string | No | ||||
| data.routes[].distance_meters | integer | No | ||||
| data.routes[].duration_freeflow_seconds | integer | No | ||||
| data.routes[].duration_historic_seconds | integer | No | ||||
| data.routes[].duration_seconds | integer | No | ||||
| data.routes[].legs | array | No | ||||
| data.routes[].legs[].distance_meters | integer | No | ||||
| data.routes[].legs[].duration_seconds | integer | No | ||||
| data.routes[].legs[].name | string | No | ||||
| data.routes[].legs[].path | array | No | ||||
| data.routes[].legs[].steps | array | No | ||||
| data.routes[].legs[].steps[].distance_meters | integer | No | ||||
| data.routes[].legs[].steps[].duration_seconds | integer | No | ||||
| data.routes[].legs[].steps[].index | integer | No | ||||
| data.routes[].legs[].steps[].instruction | string | No | ||||
| data.routes[].legs[].steps[].maneuver | string | No | ||||
| data.routes[].legs[].steps[].road | string | No | ||||
| data.routes[].legs[].steps[].shield | string | No | ||||
| data.routes[].name | string | No | ||||
| data.routes[].traffic | string | No | ||||
| data.routes[].transport | string | No | ||||
| data.routes[].type | string | No | ||||
| data.via | array | No | ||||
| data.via[].latitude | number | No | ||||
| data.via[].longitude | number | No | ||||
| msg | unknown | No | Msg is the message that describes the result of the request @example "Request successful" |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/apple-maps/directions?origin_latitude=37.7749&origin_longitude=-122.4194&destination_latitude=37.8199&destination_longitude=-122.4783&mode=driving&avoid_tolls=true&avoid_highways=true&avoid_stairs=true&detail=summary&lang=en&country=us" \
-H "x-api-key: $CRAWLORA_API_KEY"