Commercial APIs are excellent — they're the gold standard for live
traffic, rendered maps, and the long tail of edge cases.
open-distance doesn't try to compete on quality. It's just free.
Use it as your first layer: try our distance matrix first, cache the result.
If the per-endpoint confidence (rooftop /
interpolated) is good enough for your use case, you're done.
If you need traffic-aware routing or the geocode came back low-confidence,
fall back to a paid API for those queries only. Most applications need the
premium answer for less than 100% of their requests.
Raw JSON response
(submit to see)
How to call from your code
GET https://open-distance.com/maps/api/distancematrix/json
?origins=A|B
&destinations=C|D
&units=imperial
Response is byte-compatible with Google's legacy Distance Matrix JSON,
plus origin_matches and destination_matches
arrays that surface the confidence per endpoint.
Why this exists
Distance and duration are useful in lots of applications that don't
strictly need a commercial mapping API: commute comparison, route
screening, simple "how far is X from Y" heuristics, batch ETAs from a
warehouse to a list of stops. Commercial APIs make these queries
straightforward but pricing per-call adds up fast, especially at volume.
open-distance gives you the same wire format from open data, free, with
no key — so you can cache the result and use a premium API only for the
subset of queries that actually need traffic-aware or premium answers.
Honest accuracy
We're built on OpenStreetMap road geometry, NAD + OpenAddresses for
addresses, TIGER for street-range interpolation. Free-flow durations only
(no live traffic). For typical metro and inter-city routes:
Distance: typically within a few percent of a
commercial reference for the same origin/destination pair
Time: a single-digit percent off in off-peak hours
(no live traffic); larger gap in rush-hour scenarios where a
traffic-aware API sees congestion and we don't
Geocode confidence: rooftop (NAD / OpenAddresses) is
comparable to a commercial geocoder; interpolated (OSM / TIGER) is
typically within ~30–100 m of the actual building
What this is, and what it isn't
Goals
Free. No API key, no registration, no payment, no
contact required. Hosted free at open-distance.com; self-host for ~$5/mo
on Cloudflare.
Good enough for many use cases, honest about what it isn't.
We don't claim parity with a commercial Distance Matrix API. We aim for
good-enough-when-traffic-doesn't-matter: comparable distance
numbers, free-flow durations only. The confidence indicator on each
response lets you gate any query to a paid fallback when you need the
premium answer.
Open. Apache 2.0 source, ODbL/public-domain data, the
whole stack is auditable. You can run it yourself; the canonical hosted
deployment is just one of many possible.
Non-goals
Not a mapping product. No tiles, no rendered maps, no
slippy-map widget. There are excellent free OSM-based tile servers; this
isn't one of them.
Not a POI / places API. No business listings, no
reviews, no "restaurants near me". If you need POIs, use Nominatim,
Overpass, or a commercial places API.
Not turn-by-turn directions or route geometry. We
return the scalar distance and duration — not the polyline of
the route. Use OSRM or Valhalla if you need the actual driving path
drawn on a map.
Not live traffic. Times are free-flow estimates. If
your application is sensitive to rush-hour congestion, fall back to a
traffic-aware API for those queries.
Not international. Continental US (lower 48 + DC)
only. Same architecture would work elsewhere with state/country PBFs;
not a goal for this project.