Routing service
The routing service allows you to perform several types of spatial analysis on transportation networks, such as finding the best route across a city, finding the closest emergency vehicle or hospital, identifying a service area around a location, or servicing a set of orders with a fleet of vehicles.
Key features
- High quality street data with global coverage to perform analyses in 247 countries.
- Find routes that account for predictive, live, or historical traffic patterns.
- 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.
How the routing service works
The routing service performs a number of operations. To learn more about the service URL, parameters, and responses for each operation, visit the links below.
- Routing: get a simple route and turn-by-turn directions between two or more locations.
- Optimized Routing: get a route with the most efficient sequence of stops and turn-by-turn directions between two or more locations.
- Fleet routing: get optimal routes for a number of vehicles between a number of locations.
- Closest facility routing: find one or more nearby facilities from incidents based on travel time or distance.
- Service areas: get the area that can be reached by driving or walking from a location in a given time. You can also calculate the area based on travel to a location, and can consider distance traveled rather than time taken.
- Travel cost matrix: get a matrix of travel times or distances between multiple origins and destinations.
- Location-allocation: find a set of facilities that will best serve demand from surrounding areas.
Direct vs job requests
You can use the routing service by either making a Direct request or a Job request to the service endpoint. Both Direct and Job request types support all of the capabilities of the service, however, Direct is better suited for shorter requests, and Job is better suited for longer, more complex requests. The request type you choose depends on the complexity of the problem you are trying solve and limits of the request.
Simple routing
You can find a route and directions by making an HTTPS request to the routing service solve
operation or by using client APIs. Specify the origin, destination, and optionally, additional parameters to refine the results with directions. Some of the most common parameters are described provided below.
Request limits
Limit | Direct | Job |
---|---|---|
Maximum number of stops | 150 | 10,000 |
Maximum transaction time: | 5 minutes | 60 minutes |
Maximum number of point barriers: | 250 | 250 |
Maximum number of street features intersected by polyline barriers: | 500 | 500 |
Maximum number of street features intersected by polygon barriers: | 2,000 | 2,000 |
Maximum straight-line distance for the walking travel mode: (If the straight-line distance between any stops is greater than this limit, the analysis will fail when the walking restriction is used.) | 27 miles (43.45 kilometers) | 27 miles (43.45 kilometers) |
Force hierarchy beyond a straight-line distance of: (If the straight-line distance between any stops is greater than the limit shown here, the analysis uses hierarchy, even if the travel_ defines not to use hierarchy.) | 50 miles (80.46 kilometers) | 50 miles (80.46 kilometers) |
Maximum snap tolerance: (If the distance between an input point and its nearest traversable street is greater than the distance specified here, the point is excluded from the analysis.) | 12.42 miles (20 kilometers) | 12.42 miles (20 kilometers) |
Maximum number of directions features that can be returned: | No limit | 1,000,000 |
Maximum number of route edges that can be returned: | Not available | 1,000,000 |
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson f=geojson f=html |
token | An API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< token=< |
stops | The two or more locations that need to be visited in the route. | stops=-117,34; -117.5,34.5 |
find | Specify whether the service should find the best sequence when visiting multiple destinations. Note: Set this parameter to true to generate an optimized route. | find |
Direct
Use for shorter transactions with less than 150 stops that will complete in less than 5 minutes.
Key parameters
Name (Direct) | Description | Examples |
---|---|---|
travel | The mode of transportation such as driving a car or a truck or walking. | travel JSON Object |
start | The time at which travel begins from the input stops. You can also specify a value of now , to set the depart time to the current time. | start |
return | Generate driving directions for each route. | return |
directions | The language to be used when generating driving directions. | directions |
Additional parameters: Set additional constraints for a route such as temporary slowdowns, using polygon
, or set output
to specify the type of route feature created by the service.
Job
Use for longer transactions with up to 10,000 stops that will complete in less than 60 minutes.
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson f=geojson f=html |
token | An API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< token=< |
stops | The two or more locations that need to be visited in the route. | stops=-117,34; -117.5,34.5 |
reorder_ | Specify whether the service should find the best sequence when visiting multiple destinations. Note:Set this parameter to true to return an optimized route. | reorder_ |
Key parameters
Name (Job) | Description | Examples |
---|---|---|
travel_ | The mode of transportation such as driving a car or a truck or walking. | travel_ JSON Object |
time_ | The time at which travel begins from the input stops. | time_ |
populate_ | Generate driving directions for each route. | populate_ |
directions_ | The language to be used when generating driving directions. | directions_ |
Additional parameters: Set additional constraints such as temporary slowdowns, using polygon_
, route_
to specify the type of route feature created by the service, or set return_
if the start and end location for your route is same.
Optimized routing
Optimized routing, also known as the traveling salesperson problem (TRP), is the process of finding the best route between an origin and multiple destinations for an individual or single vehicle. Optimized routing differs from simple routing because it can reorder the sequence of stops to create the most efficent route possible, while minimizing the travel distance or travel time.
You can find a route and directions by making an HTTPS request to the routing service solve
operation or by using client APIs. Specify the origin, destination, and optionally, additional parameters to refine the results with directions. Some of the most common parameters are described provided below.
Request limits
Limit | Direct | Job |
---|---|---|
Maximum number of stops | 150 | 10,000 |
Maximum transaction time: | 5 minutes | 60 minutes |
Maximum number of point barriers: | 250 | 250 |
Maximum number of street features intersected by polyline barriers: | 500 | 500 |
Maximum number of street features intersected by polygon barriers: | 2,000 | 2,000 |
Maximum straight-line distance for the walking travel mode: (If the straight-line distance between any stops is greater than this limit, the analysis will fail when the walking restriction is used.) | 27 miles (43.45 kilometers) | 27 miles (43.45 kilometers) |
Force hierarchy beyond a straight-line distance of: (If the straight-line distance between any stops is greater than the limit shown here, the analysis uses hierarchy, even if the travel_ defines not to use hierarchy.) | 50 miles (80.46 kilometers) | 50 miles (80.46 kilometers) |
Maximum snap tolerance: (If the distance between an input point and its nearest traversable street is greater than the distance specified here, the point is excluded from the analysis.) | 12.42 miles (20 kilometers) | 12.42 miles (20 kilometers) |
Maximum number of directions features that can be returned: | No limit | 1,000,000 |
Maximum number of route edges that can be returned: | Not available | 1,000,000 |
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson f=geojson f=html |
token | An API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< token=< |
stops | The two or more locations that need to be visited in the route. | stops=-117,34; -117.5,34.5 |
find | Specify whether the service should find the best sequence when visiting multiple destinations. Note: Set this parameter to true to generate an optimized route. | find |
Direct
Use for shorter transactions with less than 150 stops that will complete in less than 5 minutes.
Key parameters
Name (Direct) | Description | Examples |
---|---|---|
travel | The mode of transportation such as driving a car or a truck or walking. | travel JSON Object |
start | The time at which travel begins from the input stops. You can also specify a value of now , to set the depart time to the current time. | start |
return | Generate driving directions for each route. | return |
directions | The language to be used when generating driving directions. | directions |
Additional parameters: Set additional constraints for a route such as temporary slowdowns, using polygon
, or set output
to specify the type of route feature created by the service.
Job
Use for longer transactions with up to 10,000 stops that will complete in less than 60 minutes.
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson f=geojson f=html |
token | An API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< token=< |
stops | The two or more locations that need to be visited in the route. | stops=-117,34; -117.5,34.5 |
reorder_ | Specify whether the service should find the best sequence when visiting multiple destinations. Note:Set this parameter to true to return an optimized route. | reorder_ |
Key parameters
Name (Job) | Description | Examples |
---|---|---|
travel_ | The mode of transportation such as driving a car or a truck or walking. | travel_ JSON Object |
time_ | The time at which travel begins from the input stops. | time_ |
populate_ | Generate driving directions for each route. | populate_ |
directions_ | The language to be used when generating driving directions. | directions_ |
Additional parameters: Set additional constraints such as temporary slowdowns, using polygon_
, route_
to specify the type of route feature created by the service, or set return_
if the start and end location for your route is same.
Fleet routing
You can perform fleet routing by making an HTTPS request to the Fleet Routing service execute
operation or by using client APIs. Specify the orders, depots, routes, and optionally, additional parameters such as the travel mode used when finding routes or if you need to generate driving directions.
Request limits
Limit | Direct | Job |
---|---|---|
Maximum number of orders: | 100 | 2,000 |
Maximum number of routes: | 2 | 100 |
Maximum number of orders per route: | 100 | 200 |
Maximum transaction time: | 5 minutes | 4 hours |
Maximum number of point barriers: | 250 | 250 |
Maximum number of street features intersected by polyline barriers: | 500 | 500 |
Maximum number of street features intersected by polygon barriers: | 2,000 | 2,000 |
Maximum straight-line distance for the walking travel mode: (If the straight-line distance between any orders or depots is greater than this limit, the analysis will fail when the walking restriction is used.) | 27 miles (43.45 kilometers) | 27 miles (43.45 kilometers) |
Force hierarchy beyond a straight-line distance of: (If the straight-line distance between any orders or depots is greater than the limit shown here, the analysis uses hierarchy, even if the travel_ defines not to use hierarchy.) | 50 miles (80.46 kilometers) | 50 miles (80.46 kilometers) |
Maximum snap tolerance: (If the distance between an input point and its nearest traversable street is greater than the distance specified here, the point is excluded from the analysis.) | 12.42 miles (20 kilometers) | 12.42 miles (20 kilometers) |
Maximum number of directions features that can be returned: | 10,000 | 200,000 |
Required parameters
Direct
Use for shorter transactions that complete in less than 5 minutes and optimize up to 2 routes and 100 orders.
Key parameters
Name (Direct) | Description |
---|---|
orders | A list of locations to visit with attributes such as the order name or the time required to complete the delivery at each order. |
depots | The start and the return location for the vehicles. |
routes | The characteristics and constraints for each vehicle. For example, the start and the return depot name, the maximum number of orders a vehicle is allowed to visit, and the total time the vehicle is allowed to operate. |
travel_ | The mode of transportation such as driving a car or a truck. |
default_ | The date on which all of your routes start. |
populate_ | Generate driving directions for the routes. |
Additional parameters: Solve complex fleet routing scenarios by specifying additional inputs such as route_
, order_
, breaks
, route_
or setting additional constraints when finding routes using time_
, excess_
, spatially_
.
Job
Use for longer transactions that can take up to 4 hours and optimize up to 100 routes and 2,000 orders.
Key parameters
Name (Job) | Description |
---|---|
orders | A list of locations to visit with attributes such as the order name or the time required to complete the delivery at each order. |
depots | The start and the return location for the vehicles. |
routes | The characteristics and constraints for each vehicle. For example, the start and the return depot name, the maximum number of orders a vehicle is allowed to visit, and the total time the vehicle is allowed to operate. |
travel_ | The mode of transportation such as driving a car or a truck. |
default_ | The date on which all of your routes start. |
populate_ | Generate driving directions for the routes. |
Additional parameters: Solve complex fleet routing scenarios by specifying additional inputs such as route_
, order_
, breaks
, route_
or setting additional constraints when finding routes using time_
, excess_
, spatially_
.
Closest facility routing
You can perform closest facility routing by making an HTTPS request to the closest facility service solve
operation or by using client APIs. Specify the facilities to search for, one or more incidents, and optionally, additional parameters to refine the operation. Some of most common parameters are described below.
Request limits
Limit | Direct | Job |
---|---|---|
Maximum number of incidents: | 100 | 5,000 |
Maximum number of facilities: | 100 | 5,000 |
Maximum number of facilities to find (per incident): | 10 | 100 |
Maximum transaction time: | 5 minutes | 60 minutes |
Maximum number of point barriers: | 250 | 250 |
Maximum number of street features intersected by polyline barriers: | 500 | 500 |
Maximum number of street features intersected by polygon barriers: | 2,000 | 2,000 |
Maximum straight-line distance for the walking travel mode: (If the straight-line distance between any incidents or facilities is greater than this limit, the analysis will fail when the walking restriction is used.) | 27 miles (43.45 kilometers) | 27 miles (43.45 kilometers) |
Force hierarchy beyond a straight-line distance of: (If the straight-line distance between any incidents or facilities is greater than the limit shown here, the analysis uses hierarchy, even if the travel mode defines not to use hierarchy.) | 50 miles (80.46 kilometers) | 50 miles (80.46 kilometers) |
Maximum snap tolerance: (If the distance between an input point and its nearest traversable street is greater than the distance specified here, the point is excluded from the analysis.) | 12.42 miles (20 kilometers) | 12.42 miles (20 kilometers) |
Maximum number of directions features that can be returned: | No limit | 1,000,000 |
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson |
token | An API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< token=< |
Direct
Use for shorter transactions to find up to 10 facilities from 100 facilities and 100 incidents in less than 5 minutes.
Key parameters
Name (Direct) | Description | Examples |
---|---|---|
facilities | Set of locations from which to choose the nearest locations. | facilities=-117.190774,34.057301;-117.199781,34.06047 |
incidents | One or more locations from which to start searching for the nearby locations. | incidents=-117.195696,34.056503 |
travel | The mode of transportation such as driving a car or a truck or walking. | travel JSON Object |
default | The number of closest facilities to find per incident. | default |
default | The travel time or travel distance value at which to stop searching for facilities for a given incident. | default |
travel | Whether you want to search for the closest facility as measured from the incident to the facility or from the facility to the incident. | travel |
Additional parameters: Set additional constraints when finding closest facilities such as time
to use live traffic conditions or return
and directions
to generate driving directions to each nearby facility.
Job
Use for longer transactions to find up to 100 facilities from 5,000 facilities and 5,000 incidents in less than 60 minutes.
Key parameters
Name (Direct) | Description | Examples |
---|---|---|
facilities | Set of locations from which to choose the nearest locations. | facilities={"features":[{"geometry":{"x":-117.190774,"y":34.057301}},{"geometry":{"x":-117.199781,"y":34.06047}}]} |
incidents | One or more locations from which to start searching for the nearby locations. | incidents={"features":[{"geometry":{"x":-117.195696,"y":34.056503}}]} |
travel_ | The mode of transportation such as driving a car or a truck or walking. | travel JSON Object |
number_ | The number of closest facilities to find per incident. | number_ |
cutoff | The travel time or travel distance value at which to stop searching for facilities for a given incident. | cutoff=5 |
travel_ | Whether you want to search for the closest facility as measured from the incident to the facility or from the facility to the incident. | travel_ |
Additional parameters: Set additional constraints when finding closest facilities such as time_
to use live traffic conditions or populate_
and directions_
to generate driving directions to each nearby facility.
Service areas
You can generate service areas by making an HTTPS request to the Service Area service solve
operation or by using client APIs. Specify the one or more input facilities, and optionally, additional parameters to refine the operation. Some of the most common parameters are described provided below.
Request limits
Limit | Direct | Job |
---|---|---|
Maximum number of facilities: | 100 | 1,000 |
Maximum transaction time: | 5 minutes | 2 hours |
Maximum number of breaks: | No limit | No limit |
Maximum travel time: | 9 hours when walking 5 hours for all other travel modes | 9 hours when walking 5 hours for all other travel modes |
Maximum travel distance: | 27 miles (43.45 kilometers) when walking 300 miles (482.80 kilometers) for all other travel modes | 27 miles (43.45 kilometers) when walking 300 miles (482.80 kilometers) for all other travel modes |
Maximum travel time when generating detailed polygons: | 5 hours when walking 15 minutes for all other travel modes | 5 hours when walking 15 minutes for all other travel modes |
Maximum travel distance when generating detailed polygons: | 15 miles (24.14 kilometers) for all travel modes | 15 miles (24.14 kilometers) for all travel modes |
Maximum travel time when generating service area lines: | 5 hours when walking 15 minutes for all other travel modes | 5 hours when walking 15 minutes for all other travel modes |
Maximum travel distance when generating service area lines: | 15 miles (24.14 kilometers) for all travel modes | 15 miles (24.14 kilometers) for all travel modes |
Maximum number of point barriers: | 250 | 250 |
Maximum number of street features intersected by polyline barriers: | 500 | 500 |
Maximum number of street features intersected by polygon barriers: | 2,000 | 2,000 |
Force hierarchy beyond a travel time of: (If you specify a drive time that exceeds the limit shown here, the analysis uses the hierarchy even if the travel mode defines not to use hierarchy) | 60 minutes The 60-minute limit applies when generating polygons with standard level of detail. ( output ). When walking, the analysis does not force hierarchy even when this limit is exceeded and always returns polygons with standard level of detail. | 4 hours The 4-hour limit applies when generating polygons with standard level of detail. ( polygon_ ). When walking, the analysis does not force hierarchy even when this limit is exceeded and always returns polygons with standard level of detail. |
Force hierarchy beyond a travel distance of: (If you specify a drive distance that exceeds the limit shown here, the analysis uses the hierarchy even if the travel mode defines not to use hierarchy) | 60 miles (96.56 kilometers) The 60-mile limit applies when generating polygons with standard level of detail. ( output ). When walking, the analysis does not force hierarchy even when this limit is exceeded and always returns polygons with standard level of detail. | 240 miles (386.24 kilometers) The 240-mile limit applies when generating polygons with standard level of detail. ( polygon_ ). When walking, the analysis does not force hierarchy even when this limit is exceeded and always returns polygons with standard level of detail. |
Maximum polygon trim distance: | 500 meters | 500 meters |
Maximum snap tolerance: (If the distance between an input point and its nearest traversable street is greater than the distance specified here, the point is excluded from the analysis.) | 12.42 miles (20 kilometers) | 12.42 miles (20 kilometers) |
Maximum number of polygon features that can be returned by the service: | No limit | 10,000 |
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson |
token | An API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< token=< |
Direct
Use for shorter transactions with less than 100 facilities that will complete in less than 5 minutes.
Key parameters
Name (Direct) | Description | Examples |
---|---|---|
facilities | One or more locations around which service areas are generated. | facilities=-117,34 |
default | The size and number of service areas to generate for each facility. | default |
travel | The mode of transportation such as driving a car or a truck or walking. | travel JSON Object |
travel | The direction of travel (away from facility or towards facility) that should be used when generating service areas. | travel |
time | The time to depart from or arrive at facilities. You can also specify a value of now , to set the depart or arrive time to current time. | time |
Additional parameters: Exercise fine-grained control on how the service area polygons are generated by specifying output
, split
, overlap
, and merge
parameters.
Job
Use for longer transactions with up to 1,000 facilities that will complete in less than 2 hours.
Key parameters
Name (Job) | Description | Examples |
---|---|---|
facilities | One or more locations around which service areas are generated. | facilities={"features":[{"geometry":{"x":-117,"y":34.5}}]} |
break_ | The size and number of service areas to generate for each facility. | break_ |
travel_ | The mode of transportation such as driving a car or a truck or walking. | travel_ JSON Object |
travel_ | The direction of travel (away from facility or towards facility) that should be used when generating service areas. | travel_ |
time_ | The time to depart from or arrive at facilities. | time_ |
Additional parameters: Exercise fine-grained control on how the service area polygons are generated by specifying polygon_
, polygon_
, and polygons_
parameters.
Travel cost matrix
You can create travel cost matrix by making an HTTPS request to the origin-destination cost matrix service solve
operation or by using client APIs. Specify one or more origins and destinations, and optionally, additional parameters to refine the operation. Some of the most common parameters are described below.
Request limits
Limit | Direct | Job |
---|---|---|
Maximum number of origins: | 10 | 1,000 |
Maximum number of destinations: | 10 | 1,000 |
Maximum transaction time: | 5 minutes | 60 minutes |
Maximum number of point barriers: | 250 | 250 |
Maximum number of street features intersected by polyline barriers: | 500 | 500 |
Maximum number of street features intersected by polygon barriers: | 2,000 | 2,000 |
Maximum straight-line distance for the walking travel mode: (If the straight-line distance between any incidents or facilities is greater than this limit, the analysis will fail when the walking restriction is used.) | 27 miles (43.45 kilometers) | 27 miles (43.45 kilometers) |
Force hierarchy beyond a straight-line distance of: (If the straight-line distance between any origin or destination is greater than the limit shown here, the analysis uses hierarchy, even if the travel mode defines not to use hierarchy.) | 50 miles (80.46 kilometers) | 50 miles (80.46 kilometers) |
Maximum snap tolerance: (If the distance between an input point and its nearest traversable street is greater than the distance specified here, the point is excluded from the analysis.) | 12.42 miles (20 kilometers) | 12.42 miles (20 kilometers) |
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson |
token | An API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< token=< |
Direct
Use for shorter transactions with up to 10 origins and 10 destinations that will complete in less than 5 minutes.
Key parameters
Name (Direct) | Description | Examples |
---|---|---|
origins | Starting locations from which to travel to the destinations. | origins=-118.245843,34.057794;-117.16274,32.719178 |
destinations | Ending locations to travel to from the origins. | destinations=-117.182676,34.055909;-118.144184,34.147832 |
travel | The mode of transportation such as driving a car or a truck or walking. | travel JSON Object |
default | The number of destinations to find per origin. A null value or no value for this parameter results in a search for all destinations from every origin. | default default |
default | The travel time or travel distance value at which to stop searching for destinations from a given origin. The default value is null which means to search until all destinations are found for every origin. The units are time or distance based depending on your travel mode. | default |
Additional parameters: Set additional constraints when creating the travel cost matrix such as time
to use live traffic conditions or output
to specify if the output is a table or a matrix representing travel costs.
Job
Use for longer transactions with up to 1,000 origins and 1,000 destinations that will complete in less than 60 minutes.
Key parameters
Name (Direct) | Description | Examples |
---|---|---|
origins | Starting locations from which to travel to the destinations. | origins={"features":[{"geometry":{"x":-118.245843,"y":34.057794}},{"geometry":{"x":-117.16274,"y":32.719178}}]} |
destinations | Ending locations to travel to from the origins. | destinations={"features":[{"geometry":{"x":-117.182676,"y":34.055909}},{"geometry":{"x":-118.144184,"y":34.147832}}]} |
travel_ | The mode of transportation such as driving a car or a truck or walking. | travel_ JSON Object |
number_ | The number of destinations to find per origin. A null value or no value for this parameter results in a search for all destinations from every origin. | number_ number_ |
cutoff | The travel time or travel distance value at which to stop searching for destinations from a given origin. The default value is null which means to search until all destinations are found for every origin. The units are time or distance based depending on your travel mode. | cutoff=5 |
Additional parameters: Set additional constraints when creating the travel cost matrix such as time_
to use live traffic conditions or output_
to specify if the output is a table or a file in CSV or GeoJSON format.
Location-allocation
You can perform location allocation by making an HTTPS request to the location-allocation service submit
operation or by using client APIs. Specify one or more facilities, demand points, the location-allocation problem type, and additional parameters to refine the operation. Some of the most common parameters are described below.
Location-allocation only supports job requests.
Request limits
Limit | Job |
---|---|
Maximum number of facilities: | 1,000 |
Maximum number of facilities to find: | 100 |
Maximum number of demand points: | 10,000 |
Maximum transaction time: | 60 minutes |
Maximum number of point barriers: | 250 |
Maximum number of street features intersected by polyline barriers: | 500 |
Maximum number of street features intersected by polygon barriers: | 2,000 |
Maximum straight-line distance for the walking travel mode: (If the straight-line distance between any incidents or facilities is greater than this limit, the analysis will fail when the walking restriction is used.) | 27 miles (43.45 kilometers) |
Force hierarchy beyond a straight-line distance of: (If the straight-line distance between any origin or destination is greater than the limit shown here, the analysis uses hierarchy, even if the travel mode defines not to use hierarchy.) | 50 miles (80.46 kilometers) |
Maximum snap tolerance: (If the distance between an input point and its nearest traversable street is greater than the distance specified here, the point is excluded from the analysis.) | 12.42 miles (20 kilometers) |
URL
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson |
token | An API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< token=< |
Key parameters
Name | Description | Examples |
---|---|---|
facilities | One or more locations that serve as facilities. | facilities={"features":[{"geometry":{"x":-117.195696,"y":34.056503}}]} |
demand_ | One or more locations that represent demand for the services offered at the facilities. | demand_ |
travel_ | The mode of transportation such as driving a car or a truck or walking. | travel JSON Object |
problem_ | The objective of the location-allocation analysis | problem_ |
number_ | Number of facilities the service should choose | number_ |
Additional parameters: Set additional constraints when performing location-allocation such as default_
to limit the travel time or travel distance between a facility and a demand point, ortravel_
to indicate if travel occurs from facility to demand points or vice versa.
Authentication
To make authenticated requests you need to use one of the following:
- API key: A permanent token that grants your application access to ready-to-use services and, with an ArcGIS Developer account, private content (currently in beta).
- User authentication (formerly _ArcGIS identity): Grants a short-lived token, generated via OAuth 2.0, giving your application permission to access the content and services authorized to an existing ArcGIS user's account.
- App credential authentication: Grants a short-lived token, generated via OAuth 2.0, authorizing your application access to ready-to-use services. See usage restrictions.
Learn more about getting access tokens in Security and authentication.
API support
Routing | Optimized Routing | Fleet routing | Closest facility routing | Service areas | Location-allocation | Travel cost matrix | |
---|---|---|---|---|---|---|---|
ArcGIS Maps SDK for JavaScript | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for .NET | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for Kotlin | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for Swift | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for Java | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for Qt | 1 | 1 | 1 | ||||
ArcGIS API for Python | |||||||
ArcGIS REST JS | |||||||
Esri Leaflet | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
MapLibre GL JS | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
OpenLayers | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
- 1. Access with geoprocessing task.
- 2. Access via ArcGIS REST JS.
Pricing
To determine how much it costs to access the service:
- If you have an ArcGIS Developer account, go to Pricing. Transactions are billed in US dollars. A free tier of transactions may be available.
- If you have an ArcGIS Online account, go to Understand credits. Transactions are billed in credits.
Service data
The routing service uses industry-leading reference street data that is frequently updated. The main sources for data is HERE. Additional sources may be used for different countries.
The accuracy and quality of routing will vary by geographic region. Street data may include not only major interstates, highways, and roads, but also local and rural roads. This map shows the street data coverage for the world. Click on a country to determine the quality of data available in a geographic region.
Coverage type | Color | Description | Service functionality |
---|---|---|---|
Predictive Traffic | Historical, live, and predictive traffic information | Can take into account changing traffic conditions based on current, future, and past observations | |
Live Traffic | Historical and live traffic information | Can take into account changing traffic conditions based on current and past observations | |
Historical Traffic | Historical traffic information | Can take into account changing traffic conditions, but travel speeds are only based on past observations | |
Posted Speed Limits | Static travel times derived from historical average speeds for automobiles | Can not take into accout the time of day | |
Limited | Major roads, but no secondary or local roads | Travel times are static and derived from speed limits | |
Minimal | Some major roads, but no secondary or local roads | Not recommended for critical operations |
See the complete list of street data coverage by country or visit the Streets data coverage web map.
Tutorials

Find a route and directions
Find a route and directions with the routing service.

Find service areas
Create an isochrone with driving distance with the routing service.