Route Scraper: Driving Distance & Duration avatar

Route Scraper: Driving Distance & Duration

Pricing

Pay per usage

Go to Apify Store
Route Scraper: Driving Distance & Duration

Route Scraper: Driving Distance & Duration

Calculate driving distance and travel time between coordinate pairs using the public OSRM routing engine on OpenStreetMap data. No login, no proxy, no browser.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Naimur Hasan

Naimur Hasan

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

13 days ago

Last modified

Categories

Share

Route Scraper

Calculates driving distance and travel time between coordinate pairs using the public OSRM routing engine on OpenStreetMap data. No login, no proxy, no browser.

Input

FieldTypeNotes
routesarrayRequired. "originLat,originLon;destLat,destLon" per line.
profilestringdriving | bike | foot. Default driving.
includeStepsbooleanAdd turn-by-turn manoeuvres. Default false.

Output

One row per route: origin, destination, distanceMetres, distanceKm, durationSeconds, durationMinutes, originStreet, destinationStreet, originSnapDistanceMetres, destinationSnapDistanceMetres, legCount, and steps when requested.

Notes

  • Input is latitude,longitude; OSRM wants longitude,latitude. The order is swapped on the way out, which is the single easiest way to get a route across the wrong continent.
  • Coordinates are snapped to the nearest road, and the snap distance is reported for both ends. A large snap distance means the point was nowhere near a routable way, so the distance answers a slightly different question than the one asked.
  • An unroutable pair — across an ocean, or onto an island with no ferry — comes back as code: "NoRoute" with HTTP 200. That pair is logged and skipped instead of failing the whole run.
  • The public demo server is rate limited and only has the driving profile fully loaded; bike and foot may answer NoRoute there.