Determine estimated arrival times and distances to one or more destinations
Returns the estimated time of arrival (ETA) and distance between starting and ending locations.
URL
GET https://maps-api.apple.com/v1/etasQuery Parameters
| Name | Type | Description |
|---|---|---|
origin Required | string | The starting point for estimated arrival time requests, specified as a comma-separated string that contains the latitude and longitude. For example, |
destinations Required | [string] | Destination coordinates represented as pairs of latitude and longitude separated by a vertical bar character (”|”). For example, The parameter must specify at least one destination coordinate, but no more than 10 destinations. Specify the location as a comma-separated string that contains the latitude and longitude. |
transportType Optional | string | The mode of transportation to use when estimating arrival times. |
departureDate Optional | string | The time of departure to use in an estimated arrival time request, in ISO 8601 format in UTC time. For example, If you don’t specify a departure date, the server uses the current date and time when you make the request. |
arrivalDate Optional | string | The intended time of arrival in ISO 8601 format in UTC time. |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | EtaResponse | An array of EtaResponse objects that contain distance and time from the origin to each destination. |
| 400 | Bad Request Content-Type: application/json | ErrorResponse | An ErrorResponse object that contains an error message and an array of strings that contain additional details. |
| 401 | Unauthorized Content-Type: application/json | ErrorResponse | An ErrorResponse object that contains an error message that indicates the Maps access token is missing or invalid, and an array of strings that contains additional details about the error. |
| 429 | Content-Type: application/json | ErrorResponse | An ErrorResponse object that indicates the call exceeds the daily service call quota for the authorization token presented. The app should try again later. If your app requires a larger daily quota, submit a quota increase request form. |
| 500 | Internal Server Error Content-Type: application/json | ErrorResponse | An ErrorResponse object that contains a server error message and an array of strings that describe additional details about the error. |