Apple Maps API endpoint
Returns Apple Maps travel-time estimates between an origin and a destination: for each transport type Apple reports (driving always; walking when requested), the live best estimate, the historic and free-flow durations, and the route distance. Cheaper than the directions endpoint when only the time and distance are needed. Apple has no cycling ETA; use the directions endpoint for cycling.
/apple-maps/etaQuery 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.mode (optional) — driving (default) or walking. Apple always reports the driving estimate and adds walking when requested. Apple has no cycling ETA; use /apple-maps/directions with mode=cycling for that.country (optional) — two-letter ISO 3166-1 code. Defaults to US.No routable path between the points returns a 404.
Each etas[] entry has transport (driving or walking), duration_seconds (Apple's live best estimate), duration_historic_seconds (typical for this time), duration_static_seconds (no traffic), and distance_meters.
Response includes origin, destination, and etas[].
| Field | Filled in, of 1 checked | Values in the sample |
|---|---|---|
| transport | 1 | “driving” |
| duration_seconds | 1 | 1,392 |
| duration_historic_seconds | 1 | 1,281 |
| duration_static_seconds | 1 | 799 |
| distance_meters | 1 | 10,050 |
| 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 | |
| mode | string | No | driving | Travel mode. Defaults to driving. Allowed values: driving, walking. | driving |
| 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/eta?origin_latitude=37.7749&origin_longitude=-122.4194&destination_latitude=37.8199&destination_longitude=-122.4783&mode=driving&country=us" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"origin": {
"latitude": 37.7749,
"longitude": -122.4194
},
"destination": {
"latitude": 37.8199,
"longitude": -122.4783
},
"etas": [
{
"transport": "driving",
"duration_seconds": 1196,
"duration_historic_seconds": 1149,
"duration_static_seconds": 811,
"distance_meters": 10050
},
{
"transport": "walking",
"duration_seconds": 10459,
"duration_historic_seconds": 10459,
"duration_static_seconds": 10459,
"distance_meters": 9784
}
]
}
}Request schema
No body schema
Response schema
#/definitions/applemaps.etaResponseDoc
| 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.ETAResponse | No | ||||
| data.destination | applemaps.LatLng | No | ||||
| data.destination.latitude | number | No | ||||
| data.destination.longitude | number | No | ||||
| data.etas | array | No | ||||
| data.etas[].distance_meters | integer | No | ||||
| data.etas[].duration_historic_seconds | integer | No | ||||
| data.etas[].duration_seconds | integer | No | ||||
| data.etas[].duration_static_seconds | integer | No | ||||
| data.etas[].transport | string | No | ||||
| data.origin | applemaps.LatLng | No | ||||
| data.origin.latitude | number | No | ||||
| data.origin.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/eta?origin_latitude=37.7749&origin_longitude=-122.4194&destination_latitude=37.8199&destination_longitude=-122.4783&mode=driving&country=us" \
-H "x-api-key: $CRAWLORA_API_KEY"