18

I'm looking for a free web service that gets an input of two addresses and returns an output of driving distance between the two points. In addition I'm looking for a web service that doesn't require submitting a domain in order to use it (like Google's distance matrix web service).

Vince
  • 20,017
  • 15
  • 45
  • 64
Sagi
  • 181
  • 1
  • 1
  • 4

7 Answers7

12

Depending on your purpose and the number of requests you need to put through the service, the Bing Maps REST APIs are generally free to use - they just require you to sign up for a key first from https://www.bingmapsportal.com/.

The API for the Route service is at: http://msdn.microsoft.com/en-us/library/ff701717.aspx, which can return driving distances and routes plotted between up to 25 waypoints.

Conditions for use are at http://www.microsoft.com/maps/product/terms.html, but it's basically free for educational/non-profit use, and free for commercial use so long as it's a publicly available app and you don't exceed 500,000 transactions in a 12 month period. Otherwise you need to get a commercial licence.

5

A slight update a few years down the line, since I'm looking for the same thing:

  1. The ESRI link above no longer works, but gives the option of proceeding to http://route.arcgis.com. Under the API documentation there is a price list, where a "simple route" currently costs $0.004 per route. Could not locate a free option.
  2. HERE maps would appear to have 250K free transactions per month. The examples are mostly on getting the whole route geometry etc., but based on the documentation the basic route data should also be available. Going to test this one.
  3. Using the Google Maps Platform Pricing Calculator today suggests $900 for 250K distance matrix fetches (or directions - same price). Up to 40k would be free.
MiRin
  • 51
  • 1
  • 1
3

There is also the ESRI network service

http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis

and the google maps api

http://code.google.com/apis/maps/documentation/directions/

Dowlers
  • 2,334
  • 19
  • 28
2

There is an alternative that is much cheaper than the Google API. Try Distancematrix.ai. This API accounts for traffic conditions, computes the distance and travel time between points on a map in less than 1 second.

Contact the creators and they’ll send you a trial version for free.

Disclaimer: I work at the company that creates this API.

  • 1
    There is a requirement on SE to clearly disclose affiliation if you work for the company who's products you recommend. See for example: https://opendata.stackexchange.com/help/behavior https://opendata.meta.stackexchange.com/questions/59/how-should-we-handle-affiliation-disclosure – humperderp Nov 21 '19 at 14:14
1

Take a look at the time filter function using the TravelTime API http://docs.traveltimeplatform.com/reference/time-filter/ testing is free and pricing is much lower than google distance matrix API as it's charged per search (e.g. travel time from origin to 1000s of points vs. origin-destination pair like Google Distance matrix).

It handles driving distances and driving times.

Disclaimer: I work at the company that creates the API.

  • I have checked it out, I couldn't find pricing information on the website. It would be great if you can give some information or page URL. Thanks! – Mehul Joisar Dec 20 '18 at 10:04
  • The pricing depends on the use case of the API. If you're looking to use for back end analytics pricing is here https://www.traveltimeplatform.com/analytics/api-pricing or if you're putting on a customer facing website take a look at https://www.traveltimeplatform.com/search/pricing – Louisa Bainbridge Jan 04 '19 at 15:40
1

I also just had to use a free service to calculate directions between two (or more) locations and I found openrouteservice.org's API quite helpful and it's limits for free use seem quite reasonable.

Kadir Şahbaz
  • 76,800
  • 56
  • 247
  • 389
burnedikt
  • 111
  • 1
0

You can use Open Source Routing Machine, https://github.com/Project-OSRM/osrm-backend?tab=readme-ov-file , it's opensource and you can use data from OpenStreetMaps using which distances will be calculated.

Vince
  • 20,017
  • 15
  • 45
  • 64