Road distance and drive time for journeys
get_road_distancesRoad miles, km and drive time for up to 100 journeys per call, on our own routing (Great Britain and US roads, normal traffic, no live traffic). Ends can be addresses, UK postcodes or districts (CO10), US addresses, or lat/lng. Every journey also gets the straight-line miles; a journey with no road route (Northern Ireland, an island without a bridge) is measured in a straight line and says so in note. The summary has the total road miles (for mileage claims) and the total with straight-line journeys included.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | Optional; worked out from the postcodes when left out. | |
| source | No | Instead of typing rows: { sheet: "<Google Sheets link>", tab?: "Sites" } (shared with the InstaMaps service account, or viewable by anyone with the link), { file: "<Drive link to a CSV or Excel file>" }, or { run: "<run_id from an earlier answer>" }. Columns are found by their headers (id, name, address or its parts, lat/lng); name them if they aren't obvious (id_column, address_column, lat_column, lng_column; from_column and to_column for road distances). Rows with coordinates are used as they are. | |
| traffic | No | weekday (default): road times with the area's measured weekday slowdown (DfT delay on local 'A' roads by council and on motorways in Great Britain; the Urban Mobility Report's Travel Time Index by US urban area). free_flow: empty roads. | weekday |
| journeys | No | {id, from, to}; from/to are text (address, postcode) or {lat, lng}. | |
| background | No | With source: run as a background job and answer at once with job_id (automatic past 100 rows). Check with get_job; write_to_sheet with the job_id puts the results in the sheet as they finish. |