Routing

The routing service can find routes, directions, and perform advanced analyses on street networks. The service can be used to perform analyses in 240 countries using high quality street data with global coverage.

Key features

  • Find a route and turn-by-turn directions for two or more locations.
  • Determine the optimal routes and directions for a fleet of vehicles with deliveries.
  • Find one or more nearby facilities from incidents based on travel time or distance.
  • Find the service area that can be reached by driving or walking from a location in a given time.
  • Generate a matrix of travel times or distances between multiple origins and destinations.
  • Find a set of facilities that will best serve demand from surrounding areas.
  • Access and display live traffic data with traffic speeds and incidents for routes.
  • Use travel modes (driving, walking, and trucks).
  • Define additional restrictions when finding routes such as avoiding toll roads or using preferred truck routes.
  • Add dynamic barriers that can either restrict or slow down travel.
  • Generate driving or walking directions in many languages.

Access the service

To access the routing service you need the following:

  1. An ArcGIS Developer account or ArcGIS Online account.
  2. An access token (API key or OAuth 2.0).

Example

This example shows how to find a route and directions between a set of stops. It accounts for the current time and returns the route geometry as multi-part line, and the directions in Spanish.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
POST https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve HTTP/1.1
content-type: application/x-www-form-urlencoded

f=json
&token=<ACCESS_TOKEN>
&stops=-122.68782,45.51238;-122.690176,45.522054;-122.614995,45.526201
&startTime=now
&returnDirections=true
&directionsLanguage=es
Find the best route and directions for three stops

To see the live example go to the Mapping and location services guide.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.