Google Distance Matrix Scraper avatar

Google Distance Matrix Scraper

Pricing

from $12.00 / 1,000 origin destination pairs

Go to Apify Store
Google Distance Matrix Scraper

Google Distance Matrix Scraper

Calculate travel time, distance, and traffic-aware ETAs between any list of origins and destinations using the official Google Distance Matrix API.

Pricing

from $12.00 / 1,000 origin destination pairs

Rating

0.0

(0)

Developer

Andrew

Andrew

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Bulk-calculate travel time and distance between any list of origins and destinations using the official Google Distance Matrix API. Get traffic-aware driving ETAs, transit fares, walking and cycling times — one dataset row per origin×destination pair.

What you get

  • One dataset row per origin×destination pair — every origin paired with every destination
  • Travel distance in meters and human-readable text
  • Travel duration in seconds and human-readable text
  • Traffic-aware ETAs when you set a departure time — duration in traffic for driving mode
  • Transit fares with value and currency when mode is Transit
  • All four travel modes — driving, walking, bicycling, transit
  • Auto-chunking — large matrices are automatically split into 10×10 batches to respect Google's 100-element-per-request limit, then merged back into one dataset
  • Per-pair error handling — bad inputs or unreachable pairs get a row with status like NOT_FOUND or ZERO_RESULTS; the run continues

Use cases

  • Delivery & logistics routing — pre-calculate drive times from warehouses to every customer, traffic included
  • Site selection — find the candidate location with the shortest average drive time to a list of points of interest
  • Field service dispatch — match technicians to jobs by drive time
  • Real estate commute analysis — calculate transit/drive time from listings to a list of workplaces, gyms, schools
  • Bulk ETA APIs — feed your CRM with up-to-date drive times to every account
  • Travel research — compare driving vs transit vs cycling time for a list of trips

How to use

  1. Paste your Origins — addresses or lat,lng pairs, one per line.
  2. Paste your Destinations — addresses or lat,lng pairs, one per line.
  3. Pick a Travel mode — Driving, Walking, Bicycling, or Transit.
  4. (Optional) Toggle Units between Metric (km) and Imperial (mi).
  5. (Optional) For traffic-aware driving, set Departure time to now or a Unix-epoch timestamp.
  6. (Optional) For transit, set Departure time or Arrival time and pick Transit modes (bus, subway, etc.).
  7. (Optional) Set Avoid to exclude tolls, highways, ferries, or indoor segments.
  8. Run — every origin×destination pair appears as its own row, ready to export as CSV or JSON.

Examples

Drive-time matrix for a small fleet:

  • Origins: 3 warehouse addresses
  • Destinations: 50 customer addresses
  • Result: 150 rows, each with driving distance and ETA

Transit fare comparison for one trip across cities:

  • Origins: Penn Station, NYC
  • Destinations: Times Square, NYC, JFK Airport, NYC, Brooklyn Museum, NYC
  • Mode: Transit · Departure time: now
  • Result: 3 rows with transit duration and fare per destination

Traffic-aware drive time at rush hour:

  • Set Departure time to a future epoch timestamp (e.g. tomorrow 8 AM)
  • Set Traffic model to pessimistic for worst-case ETAs

Output schema

FieldTypeDescription
originstringInput origin
destinationstringInput destination
originResolvedstring | nullGoogle's resolved origin address
destinationResolvedstring | nullGoogle's resolved destination address
modestringTravel mode used
statusstringOK, NOT_FOUND, ZERO_RESULTS, MAX_ROUTE_LENGTH_EXCEEDED, ERROR, etc.
distanceMetersnumber | nullDistance in meters
distanceTextstring | nullHuman-readable distance ("3.2 mi", "5.1 km")
durationSecondsnumber | nullDuration in seconds
durationTextstring | nullHuman-readable duration ("12 mins", "1 hour 5 mins")
durationInTrafficSecondsnumber | nullDuration with traffic (driving + departureTime only)
durationInTrafficTextstring | nullHuman-readable traffic duration
fareValuenumber | nullTransit fare value
fareCurrencystring | nullTransit fare currency code
fareTextstring | nullTransit fare display text
errorstring | nullError message if status is not OK

Tips

  • Cost scales with elements, not requests — 25 origins × 25 destinations is 625 elements regardless of how many calls the actor makes under the hood.
  • For traffic-aware ETAs you must set departureTime — without it, Google returns "typical" duration only.
  • duration_in_traffic only appears for driving mode with departureTime set.
  • lat,lng inputs skip address resolution and are slightly faster + more reliable than free-text addresses.
  • For very large matrices (1000+ pairs), run multiple jobs in parallel — each Apify run handles its own chunking.