NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Dears, could you please inform me if there are an Api that can give us the distance between A and B using API? Like Google Distance Matrix API.


asked 22 Oct '14, 12:27

Danil%20Rudakov's gravatar image

Danil Rudakov
accept rate: 0%

Hi guys,

I would like to do the same as the question ask, but is it free ?

(21 Aug '21, 09:56) hunae

Yes, OSRM (Open Source Routing Machine) provides this feature - both for point-to-point queries and for matrices.

See There is a public instance at which is available for light usage within the terms of use (see the OSRM wiki). An example matrix call would be:,-90.11&loc=30.44,-91.18&loc=30.45,-91.22&loc=30.42,-91.15

If you have more significant needs, you can set up your own instance of OSRM.

permanent link

answered 22 Oct '14, 12:48

Richard's gravatar image

Richard ♦
accept rate: 18%

edited 22 Oct '14, 12:49

This sounds interesting, is this p2p only? How about for matrices, i.e. m2m? Also, is this using geo coords only? Is there support for addresses? Or a way to identify the geo coords for an address? Thank you...

(31 Aug '20, 15:27) mwpowelllde

There is also the GraphHopper Directions API based on OSM data with a Matrix API providing times and distances. (Note: I'm the author of GraphHopper)

permanent link

answered 26 Mar '15, 21:50

peatar's gravatar image

accept rate: 8%

edited 29 Jun '16, 09:15

Dislaimer: I work for iGeolise

The TravelTime API can be used to calculate the true distance from A to B (rather than as the crow flies) as well as calculating the travel time between the two points (plus lots more). Sign up for an API key here.

permanent link

answered 16 Jun '16, 10:37

Louisa-maps's gravatar image

accept rate: 0%

Is the map data based on OSM?

(16 Jun '16, 11:37) scai ♦

as far as i found OSRM only provides a travel-time-matrix (although they call it distance matrix). if i am wrong, please post, because i am looking for distance matrices

permanent link

answered 29 Jun '16, 08:30

gemerden's gravatar image

accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 22 Oct '14, 12:27

question was seen: 95,448 times

last updated: 21 Aug '21, 10:42

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum