<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/DirectionsResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Interface",
  "symbol" : {
    "kind" : "Interface",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "struct/mapkit.DirectionsResponse"
  },
  "title" : "DirectionsResponse"
}
-->

# DirectionsResponse

The directions and estimated travel time for a route.

```
interface DirectionsResponse
```

## Overview

To get directions, create an instance of [`Directions`](/documentation/MapKitJS/Directions) and call the [`route(request)`](/documentation/MapKitJS/Directions/route) method.

The [`route(request)`](/documentation/MapKitJS/Directions/route) method returns a promise that resolves with a `DirectionsResponse` on success.

## Topics

### Directions response

[`routes: Route[];`](/documentation/MapKitJS/DirectionsResponse/routes)

An array of route objects.

[`origin?: Coordinate | Place;`](/documentation/MapKitJS/DirectionsResponse/origin)

An optional starting point for routing directions.

[`destination?: Coordinate | Place;`](/documentation/MapKitJS/DirectionsResponse/destination)

An optional end point for routing directions.

### Deprecated

[`request: object;`](/documentation/MapKitJS/DirectionsResponse/request)

The request object associated with the direction’s response.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)