Pricing
from $12.00 / 1,000 origin destination pairs
Go to Apify Store
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
Actor stats
0
Bookmarked
9
Total users
2
Monthly active users
22 days ago
Last modified
Categories
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
statuslikeNOT_FOUNDorZERO_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
- Paste your Origins β addresses or
lat,lngpairs, one per line. - Paste your Destinations β addresses or
lat,lngpairs, one per line. - Pick a Travel mode β Driving, Walking, Bicycling, or Transit.
- (Optional) Toggle Units between Metric (km) and Imperial (mi).
- (Optional) For traffic-aware driving, set Departure time to
nowor a Unix-epoch timestamp. - (Optional) For transit, set Departure time or Arrival time and pick Transit modes (bus, subway, etc.).
- (Optional) Set Avoid to exclude tolls, highways, ferries, or indoor segments.
- 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
pessimisticfor worst-case ETAs
Output schema
| Field | Type | Description |
|---|---|---|
origin | string | Input origin |
destination | string | Input destination |
originResolved | string | null | Google's resolved origin address |
destinationResolved | string | null | Google's resolved destination address |
mode | string | Travel mode used |
status | string | OK, NOT_FOUND, ZERO_RESULTS, MAX_ROUTE_LENGTH_EXCEEDED, ERROR, etc. |
distanceMeters | number | null | Distance in meters |
distanceText | string | null | Human-readable distance ("3.2 mi", "5.1 km") |
durationSeconds | number | null | Duration in seconds |
durationText | string | null | Human-readable duration ("12 mins", "1 hour 5 mins") |
durationInTrafficSeconds | number | null | Duration with traffic (driving + departureTime only) |
durationInTrafficText | string | null | Human-readable traffic duration |
fareValue | number | null | Transit fare value |
fareCurrency | string | null | Transit fare currency code |
fareText | string | null | Transit fare display text |
error | string | null | Error 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_trafficonly appears for driving mode with departureTime set.lat,lnginputs 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.
