Skip to main content
Skip to main content
Maps
Bing Maps for Enterprise is deprecated and will be retired.
  • Enterprise account customers can continue to use Bing Maps for Enterprise services until June 30th, 2028.
  • Free (Basic) account customers can continue to use Bing Maps for Enterprise services until June 30th, 2025.
  • To avoid service disruptions, all implementations using Bing Maps for Enterprise REST APIs and SDKs will need to be updated to use Azure Maps by the retirement date.
  • For migration documentation, see Bing Maps Migration Overview.
  • For more details on the retirement, see the Bing Maps Blog.

Bing Maps Distance Matrix API

The Bing Maps Distance Matrix API calculates distances and travel times between origins and destinations with an optional travel-time histogram. Using predicted traffic and support for various modes of transportation, the Distance Matrix API can optimize map routing performance in many-to-many scenarios, which can save time, increase ROI, and improve CRM.

DOWNLOAD DATASHEET >


Distance matrices are used in several different types of applications. The most common is to power algorithms which solve a single-user scenario known as the Traveling Salesman Problem (TSP) or a multiple-user scenario, known as the Vehicle Routing Problem (VRP).

The Distance Matrix API deftly handles both TSP and VRP scenarios. Users can view the recommended route between specified start and end points for different types of routing and fleet management use cases.


One API, multiple applications

Go beyond simple distance calculations with a mapping solution designed around real-world scenarios.

Delivery optimization:

  • Trucking logistics with single or multiple start points and numerous end-points – Time Windows, Vehicle Capacity, Multiple Depots, Split Deliveries, Backhauls, etc.
  • Taxi/car service application – see the driver’s location and estimated time of arrival
a map showing distance calculations for three locations
Figure 1

 

Data Analysis:

  • Determine a new location or add locations to optimize deliveries with intelligent mapping (retail, manufacturing, etc.)
  • Moving to a new office – determine the impact on commute times for the staff

Location Grouping – Grouping locations based on their travel time or distance (closeness to each other):

  • Bus stop / transportation planning
  • Real estate – find homes within x distance from a hospital, school, etc.
  • Store locator – calculate the relative distance from a store on the map

Whether it’s planning the route from one location to another or in a many-to many VRP scenarios, the API can power a direction-enabled solution to minimize time and maximize efficiency.


Who benefits?

Any business in need of optimized mapping and fleet management, such as: Retail, Logistics Manufacturing, Finance, Education, Government, Healthcare, Real Estate, and more

For example, an electrician has three job sites to visit on the same day. Calculating the distances from the 3 points on the map in Figure 1, the purple location is the closest from the starting location (designated by the star) at 2.9 miles away. Using the Bing Maps Distance Matrix API, the electrician can view all the locations using the optional histogram to access travel times based on a time-window and predicted traffic to each location, which reveals that the red location is actually closer to the office in terms of travel time.

a map displaying multiple routes and travel times
Figure 2

 

Another common API use-case involves the many-to-many VRP calculation of matrix locations, such as a local baker distributing goods from two locations. In this case, the baker needs to determine how to optimize deliveries to 11 nearby supermarkets.

To do so, they will need to factor which bakery should deliver to each supermarket, and consider the number of trucks, the capacity of those trucks, each bakery’s inventory, distance, and so forth (see Figure 2). The baker can use the Distance Matrix API to quickly generate a map with optimized routes, eliminating the tedious task of calculating distances for hundreds of locations.

There are many opportunities where the Distance Matrix API can help businesses gain deeper insights, maximize opportunities, and improve business performance. Whether it’s a real estate application that helps clients locate a property near a desired school location, a complex VRP for an insurance agency, or a company that needs to optimize its tracked assets, the Bing Maps Distance Matrix API can help businesses of all sizes make smarter day-to-day routing decisions to boost efficiency, improve customer satisfaction, and increase profitability.


Features and Capabilities

  • Based on mapping information, the API calculates the linear distance in miles from a matrix of locations using road information vs. straight lines (from point A to point B).
  • Calculates one day’s worth of travel times in 15-minute intervals using historic traffic information to predict travel time for the time-of-day and day-of-week as specified in the call.
  • Supports multiple transport modes: Driving, Public transit, Walking
  • Create a matrix up to 625 origin/destination pairs (Ex. 25 x 25, 1 x 625, 5 x 125, etc.). When requesting a histogram, the limit is 100 pairs (Ex. 1 x 10, 10 x 0, etc.).
  • Get and Post requests are supported for large requests with numerous pairs.
  • Asynchronous requests are supported, which is ideal for large computationally intensive requests.
  • Must pass in coordinates; addresses should be geocoded with the REST API first.
  • Response format is JSON and XML.
  • Caching of result is permitted for up to 72-hours.

Personalize and Optimize With Bing Maps API

Improve CRM and everyday efficiency with an API that understands your unique day-to- requirements. Check out our other mapping API services and solutions for enhanced fleet management, routing, distance calculations and more.

  • Truck Routing API – Determine travel routes that take into consideration a truck or commercial vehicle’s attributes.
  • Snap to Road API – Snap the path to the most logical path, using the vehicles GPS trace, as well as returns road attributes, such as speed limit and elevation.

Bing Maps Distance Matrix API helps customers optimize performance and assess business opportunities:

 

Business Intelligence (BI) and CRM:

Optimize performance with intelligent apps that plan your route more effectively, saving time, money, and resources.

 

Business Opportunities

Identify underserved markets and new locations:

  • Delivery optimization
  • Data Analysis
  • Location Grouping
Fleet and Asset Management:

Effectively plan, monitor, and utilize assets to save time and reduce transportation costs.


Get Started

The Distance Matrix API uses billable transactions. If you have a Bing Maps key, review the Distance Matrix API documentation to learn more and start developing your solution. If you don’t have a Bing Maps key, create a Bing Maps account and create a key to authenticate your application. Then follow the documentation to start developing your solution. For Licensing questions, contact a Bing Maps Sales Specialist.


Learn More

Explore the following resources to learn more about the Bing Maps Distance Matrix API:

Contact your Microsoft Reseller or visit our website for licensing advice.