Google Maps Directions Scraper: Distance Matrix, Traffic & ETA
Pricing
$0.002 / route request
Google Maps Directions Scraper: Distance Matrix, Traffic & ETA
Distance and travel time between address pairs or a whole origins x destinations matrix, as Google Maps shows them: drive time in traffic for a set departure or arrival, route alternatives with tolls flagged, transit legs, and the resolved place for every stop. No API key.
Pricing
$0.002 / route request
Rating
0.0
(0)
Developer
ScrapeBench
Maintained by CommunityActor stats
0
Bookmarked
4
Total users
3
Monthly active users
3 days ago
Last modified
Categories
Features
Share
Pain points
- Google's Directions and Distance Matrix APIs need a Google Cloud project, billing and an API key before the first request.
- Free-text stops resolve to whatever Google picks: on 2026-11-08 a bare '90210' resolved to a salon in Louisiana on one connection and to Beverly Hills, Colorado on another, and nothing in a plain distance figure shows it.
- Copying drive times for a list of addresses out of the Google Maps page one route at a time takes hours for a few hundred rows.
What we solve
- Pairs or a full origins x destinations matrix in one run, in up to four travel modes.
- Predicted traffic for a departure or arrival time you choose, or live traffic now, with Google's typical range beside it.
- The place Google resolved every stop to (name, address, latitude, longitude, place ID) on every row, so a wrong match is visible; a stop that resolves to nothing is a free row, never a billed route.
- Avoid tolls, highways or ferries, alternatives on or off, and optional turn-by-turn steps.
Summary
Give it origin and destination pairs, or a list of origins and a list of destinations to route every origin to every destination, and pick driving, transit, walking or cycling. Each route comes back as one row with its distance in metres, kilometres and miles, the travel time, and for driving the time in traffic and Google's typical range, now or for a departure or arrival time you set. Alternatives come back as their own rows, with the roads each one takes and a toll flag. Transit rows carry the departure and arrival times and every leg: line, vehicle, headsign, agency, boarding and alighting stop and the number of stops. Turn-by-turn steps are one switch away. Every stop is free text that Google resolves inside the request, so every row also carries the name, address, coordinates and place ID Google resolved each stop to, beside what you typed. No Google Cloud account or API key.
Who it's for
- Delivery and logistics teams sizing routes from a depot to customer addresses
- Field-service dispatch: drive time between jobs and territory balancing
- Real-estate teams putting commute times on listings
- Sales ops assigning accounts to the nearest rep
- Site-selection and market analysts building drive-time catchments
- Transport and urban researchers logging rush-hour durations
- AI agents answering 'how long from A to B' without a Google Cloud key
How to use
Set the input, run the actor, and collect results from the run's dataset (export to JSON/CSV/Excel, or pull via the Apify API). Example input:
{"routes": [{"origin": "San Jose, CA","destination": "San Francisco, CA"}],"travelMode": ["driving","transit"],"alternatives": true}
See Inputs below for every available field.
What you get
One row per record:
| Field | Description |
|---|---|
origin | The origin as you sent it |
destination | The destination as you sent it |
travel_mode | driving, transit, walking or cycling |
route_index | 1 = Google's first route; 2 and up = alternatives |
origin_name | The place Google resolved the origin to |
origin_address | Google's full label for the resolved origin |
origin_latitude | Latitude of the resolved origin |
origin_longitude | Longitude of the resolved origin |
origin_place_id | Google place ID of the resolved origin |
destination_name | The place Google resolved the destination to |
destination_address | Google's full label for the resolved destination |
destination_latitude | Latitude of the resolved destination |
destination_longitude | Longitude of the resolved destination |
destination_place_id | Google place ID of the resolved destination |
via | The roads Google names the route by (driving, walking, cycling) |
distance_m | Route length in metres (also distance_km and distance_miles) |
distance_text | Distance label in the unit you chose |
duration_s | Travel time in seconds (driving: without traffic; also duration_min) |
duration_text | Google's travel-time label |
duration_in_traffic_s | Driving: time in traffic, live or predicted for departAt / arriveBy (and its label) |
typical_min_s | Driving: low end of Google's typical range (typical_max_s, typical_range_text) |
has_tolls | True when Google flags tolls on the route |
advisories | Google's notes on the route |
frequency | Transit: how often the service runs |
departure_time | Transit: local departure time (arrival_time, timezone beside it) |
agencies | Transit: the agencies running the trip |
transit_legs | Transit: each walk and ride; a ride has line, vehicle, headsign, agency, from and to stop, times, number of stops, service alerts |
steps | Turn-by-turn instructions with maneuver, distance and duration (with Include steps on) |
google_maps_url | Opens these directions on Google Maps |
source_url | Where the row came from (its Google Maps link) |
Sample:
{"origin": "San Jose, CA","destination": "San Francisco, CA","travel_mode": "driving","route_index": 1,"origin_name": "San Jose","origin_address": "San Jose, California","origin_latitude": 37.33874,"origin_longitude": -121.88525249999999,"origin_place_id": "ChIJ9T_5iuTKj4ARe3GfygqMnbk","destination_name": "San Francisco","destination_address": "San Francisco, California","destination_latitude": 37.7749295,"destination_longitude": -122.4194155,"destination_place_id": "ChIJIQBpAG2ahYAR_6128GcTUEo","via": "US-101 N","distance_m": 77963,"distance_km": 77.96,"distance_miles": 48.44,"distance_text": "48.4 miles","duration_s": 3508,"duration_min": 58.5,"duration_text": "58 min","duration_in_traffic_s": 6000,"duration_in_traffic_text": "1 hr 40 min","typical_min_s": 4500,"typical_max_s": 7800,"typical_range_text": "1 hr 15 min to 2 hr 10 min","has_tolls": false,"advisories": [],"frequency": null,"departure_time": null,"arrival_time": null,"timezone": null,"agencies": [],"transit_legs": [],"steps": null,"google_maps_url": "https://www.google.com/maps/dir/?api=1&origin=San+Jose%2C+CA&destination=San+Francisco%2C+CA&travelmode=driving","source_url": "https://www.google.com/maps/dir/?api=1&origin=San+Jose%2C+CA&destination=San+Francisco%2C+CA&travelmode=driving"}
Inputs
| Field | Required | Type | Default | Description |
|---|---|---|---|---|
routes | no | array | [{"origin": "San Jose, CA", "destination": "San Francisco, CA"}] | One entry per trip: {"origin": "...", "destination": "..."}, or the text "Origin -> Destination" (also → or |
origin | no | string | — | One starting point. Combined with Destination / Destinations below. |
destination | no | string | — | One end point. Combined with Origin / Origins. |
origins | no | array | [] | Matrix mode: every origin is routed to every destination (10 origins x 20 destinations = 200 routes). One best route per pair unless Alternatives is switched on. |
destinations | no | array | [] | Matrix mode: the destinations every origin is routed to. |
travelMode | no | array | ["driving"] | One or more of: driving, transit, walking, cycling. Each pair is routed once per mode. Anything else is ignored (logged). |
departAt | no | string | — | Local date and time at the origin, e.g. 2026-11-10 08:00, for Google's predicted traffic or the transit timetable at that moment. Empty = now. A past date rolls forward to the same weekday and time in the coming week, so a saved schedule keeps working. Set this or Arrive by, not both. |
arriveBy | no | string | — | Local date and time to arrive, e.g. 2026-11-10 09:00. Set this or Depart at, not both. |
avoid | no | array | [] | Any of: tolls, highways, ferries (driving routes). |
alternatives | no | boolean | — | On: every alternative Google offers, one row each (usually up to three driving routes; transit lists each departure, 6 for San Jose to San Francisco on 2026-11-08), at no extra charge. Off: the best route only. Left unset: alternatives for Routes, the best route only for an Origins x Destinations matrix. |
includeSteps | no | boolean | false | Add the step-by-step instructions (maneuver, distance, duration) to each row. Makes rows larger. |
distanceUnit | no | string | "miles" | Unit of the distance_text label. distance_m, distance_km and distance_miles are on every row either way. |
language | no | string | "en" | Language of Google's labels and instructions, as a code (en, es, fr, de, ...). |
maxResults | no | integer | 1000 | Cap on route rows for the WHOLE run (not per pair). A spend cap: the run stops once it has this many, and a free row lists the pairs not run. |
proxyConfiguration | no | object | {"useApifyProxy": false} | Off by default: Google answered without one when tested. Switch it on only if your runs come back blocked. |
Pricing (Pay Per Event)
You pay per result (route) — no charge for empty runs. Example: 1000 route requests at $0.002/result ≈ $2.00.
$2.00 per 1,000 route requests, alternatives included, no start fee (2026-11-14). A 10 x 20 matrix is 200 requests, $0.40; San Jose to San Francisco by car and transit is 2 requests ($0.004) for 9 rows.
Use cases
- Delivery or service territory: drive time in weekday-morning traffic from one depot to every customer address, one row per address (origins: the depot; destinations: the addresses; departAt; alternatives off).
- Commute times on a property listing: one home to the office, the station and the airport, driving and transit, arriving by 9:00 (origin + destinations, travelMode driving and transit, arriveBy).
- Nearest-rep assignment: a reps x accounts matrix, then keep the shortest duration per account in your sheet (origins: reps; destinations: accounts).
- Toll and highway comparison: the same trip with and without tolls or highways, side by side (San Francisco to Los Angeles: I-5 in 5 h 57 against CA-1 in 10 h 39 avoiding all three, 2026-11-08).
- Transit access check: a list of addresses to one hub, arrive by 8:00, with the lines, boarding and alighting stops and agency per leg (travelMode transit, arriveBy, includeSteps).
- Rush-hour log: schedule the same routes every weekday at 8:00 and record duration_in_traffic over time (San Jose to San Francisco: 1 h 40 for a Tuesday 08:00 departure against 1 h 1 off-peak, 2026-11-08).
- Coordinates in, resolved places out: lat,lng points from a GPS export routed to a destination, with Google's resolved address and place ID on each row.
Why this actor
- One input for pairs or a whole origins x destinations matrix, in several travel modes at once.
- Traffic now or predicted for a departure or arrival time, plus Google's typical range, on every driving row.
- The resolved place of both stops on every row, and free rows (never billed) for a stop Google cannot find.
Limitations & updates
Data is what Google Maps' directions show at the time of the run: traffic is Google's live or predicted figure, and transit times follow the published timetable. Each stop is resolved by Google from free text, so a vague stop can land somewhere unexpected; check the resolved address on each row. One origin and one destination per route (no intermediate stops). Transit fares, route geometry (polylines) and Street View images are not returned. Distance labels follow Google's US settings (miles) unless you choose kilometres; metres, kilometres and miles are on every row.
FAQ
Why did a stop come back as the wrong place?
Each stop is free text that Google Maps resolves inside the request, the same way the directions page does. A full address, a landmark ('JFK Airport'), 'ZIP, state' ('90210, CA') or 'lat,lng' resolves well; a bare ZIP code or a city with no state can resolve to a business or a same-named town elsewhere (on 2026-11-08 '90210' alone resolved to a salon in Louisiana on one connection and to Beverly Hills, Colorado on another). Every row carries the resolved name, address, latitude, longitude and place ID of each stop beside your input, so a wrong resolution is visible, and a stop that resolves to nothing comes back as a free no_match row, never a billed route.
How is traffic handled?
Driving rows carry duration (no traffic), duration_in_traffic and Google's typical range (for example '3 hr 40 min to 5 hr 16 min'). Leave the time empty for live traffic now, or set departAt or arriveBy as a local date and time to get Google's predicted traffic for that moment: San Jose to San Francisco read 1 h 40 for a Tuesday 08:00 departure against 1 h 1 at the time of the check (2026-11-08). Walking and cycling rows have no traffic fields; transit rows carry departure and arrival times instead.
How do I send routes?
Three ways, which combine: Routes, a list of {"origin": "...", "destination": "..."} pairs (or the text "Origin -> Destination"); Origin and Destination for one trip; or Origins and Destinations, which routes every origin to every destination. A single text like "Reno to Sacramento" is never split, because a place name can contain "to".
How am I charged?
$0.002 per route request: one origin-destination pair in one travel mode, whatever number of rows it returns. With alternatives on (the default for route pairs) a driving, walking or cycling pair usually returns up to three rows, one per alternative, and a transit pair one row per departure Google offers (6 for San Jose to San Francisco, 2026-11-08); the alternatives cost nothing extra. Matrix runs return one best route per origin-destination pair unless you switch alternatives on. Rows that explain something (a stop that did not resolve, a refused request, a reached cap, input to fix) are free. A 10 x 20 matrix is 200 requests, $0.40. Set Maximum routes to cap a run's spend.
Guides & use cases
Written up on scrapebench.dev — the bench that runs and verifies this actor against the live source every night:
- How-to: How to run Google Maps Directions Scraper: Distance Matrix, Traffic & ETA
- Use case: Drive time in weekday-morning traffic from one depot to many addresses
More actors, coverage and nightly verification results: scrapebench.dev
Works with AI assistants (MCP)
Callable as an MCP tool, so Claude, Cursor, VS Code Copilot and other MCP clients can run it directly. Grab the config from the MCP tab on this page — Apify hosts the server and keeps that snippet current, and OAuth signs you in on first connect, so no API token goes in your config file.
Then just ask:
"How long is the drive from San Jose, CA to San Francisco, CA leaving Tuesday at 8:00 AM in traffic, and what is the transit option with its legs?"
Two stops, two modes: 9 rows on 2026-11-08 (3 driving alternatives, 6 transit departures). Add the state to a city name and avoid a bare ZIP code, so the stop resolves to the place you mean; every row carries Google's resolved address and place ID. Runs started this way bill exactly like any other run.
Data & lawful use
This actor collects publicly available information that Google (Google Maps) publishes for public lookup — licence records, business listings and the contact details professionals list there. Some of it identifies individuals (sole proprietors, licence holders, agents), so treat any names, phone numbers and emails in your results as personal data.
When you run this actor, you decide what is collected and what it is used for, so you are the controller of that data and we act only as your processor (Apify Standard Actor Contract). You need a lawful basis for your use, must honour opt-out and deletion requests, and must follow the marketing rules that apply to you (CAN-SPAM, TCPA, GDPR, CCPA and similar). Don't use the output for unsolicited bulk messaging, for screening covered by the FCRA, or for anything the source's own terms forbid.
Your results are stored in your own Apify account. We don't keep a copy of your results and don't sell or share them.
Disclaimer
This is an independent tool. It is not affiliated with, endorsed by or sponsored by Google (Google Maps). Names and marks are used only to describe the data source. Records are provided as published by the source and may be out of date or incomplete. For anything consequential (hiring, a permit, a legal decision), confirm the record with the issuing agency. You are responsible for making sure your use complies with applicable law and the source's terms.
Need help?
Open an issue on this actor's Issues tab and we'll respond there. Bug reports, missing fields and feature requests are all welcome. Guides and examples: scrapebench.dev.
If you are a person named in this data and want your record removed from our copy, email apify-help@scrapebench.dev; the source agency remains the official record.
Your run may be used to improve our services. If something looks off, or you want this actor to fit your use better, please share your run data with us: Apify Console → Settings → Security → Share run data with developers. It lets us see exactly what went wrong and keep improving the actor.
If this actor saved you time, a short review on its Store page helps other buyers find it.