Google Maps Directions Scraper
Pricing
from $3.00 / 1,000 results
Google Maps Directions Scraper
Extract driving, walking, bicycling, and transit directions between any two locations from Google Maps - distance, duration, traffic, route alternatives, and turn-by-turn steps.
Pricing
from $3.00 / 1,000 results
Rating
0.0
(0)
Developer
Crawler Bros
Maintained by CommunityActor stats
0
Bookmarked
161
Total users
8
Monthly active users
2 days ago
Last modified
Categories
Share
Extract driving, walking, bicycling, and transit directions between any two locations from Google Maps — including distance, duration, traffic conditions, route alternatives, and turn-by-turn steps. Or switch to matrix mode and get a travel-time matrix across many origins and destinations in one run.
What this actor does
Provide an origin and a destination (as addresses, place names, or lat,lng coordinates), and this actor returns:
- All route alternatives Google Maps offers (up to 5)
- Distance in both human-readable form (
"1.2 mi") and integer meters - Duration in human-readable form (
"8 min") and integer seconds - "via" road for each route (e.g.
"via Broadway") - Traffic condition notes when available (e.g.
"Moderate traffic") - Turn-by-turn step instructions for the primary route when Google exposes the rendered route-details surface
- Resolved origin and destination strings (what Google actually matched)
- The final Google Maps directions URL you can share or open in a browser
Set mode to matrix and provide many origins and many destinations, and the actor instead returns one row per origin/destination pair — a distance/duration matrix you can drop straight into a spreadsheet or analytics job.
Use cases
- ETA calculators, courier and logistics planning, dispatch dashboards
- Travel-time monitoring between business locations
- Field-service routing and territory planning
- Sales and customer-visit scheduling
- Real-estate commute analyses
- Tourism / transit research
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
mode | Enum | no | route | route (single origin → destination) or matrix (every origin × every destination) |
origin | String | yes | — | Starting location (address, place name, or lat,lng). Used in route mode |
destination | String | yes | — | Ending location (address, place name, or lat,lng). Used in route mode |
origins | String list | no | — | Starting locations for matrix mode (address, place name, or lat,lng) |
destinations | String list | no | — | Ending locations for matrix mode (address, place name, or lat,lng) |
maxPairs | Integer | no | 100 | Upper bound on the number of origin × destination pairs in matrix mode (1–1000) |
travelMode | Enum | no | driving | One of driving, walking, bicycling, transit |
language | Enum | no | en | UI language (affects instruction text) |
units | Enum | no | metric | metric or imperial distance preference |
avoidTolls | Boolean | no | false | Driving mode — avoid toll roads |
avoidHighways | Boolean | no | false | Driving mode — avoid highways/motorways |
avoidFerries | Boolean | no | false | Driving mode — avoid ferry routes |
departureTime | String | no | — | Optional ISO 8601 datetime for transit routing |
proxyConfiguration | Object | no | — | Optional Apify proxy (used only as a fallback) |
Examples
Example: driving directions
{"origin": "Times Square, New York, NY","destination": "Central Park, New York, NY","travelMode": "driving"}
Example: walking directions
{"origin": "Eiffel Tower, Paris","destination": "Louvre Museum, Paris","travelMode": "walking","language": "en"}
Example: coordinate-based transit route
{"origin": "40.7580,-73.9855","destination": "40.7484,-73.9857","travelMode": "transit","language": "en"}
Example: distance matrix (3 warehouses × 5 customer addresses)
{"mode": "matrix","origins": ["Warehouse A, 1 Main St, Newark, NJ","Warehouse B, 55 Broad St, Newark, NJ","Warehouse C, 400 Market St, Newark, NJ"],"destinations": ["10 Wall St, New York, NY","20 Hudson Yards, New York, NY","30 Atlantic Ave, Brooklyn, NY","40 Steinway St, Queens, NY","50 Fordham Rd, Bronx, NY"],"travelMode": "driving","maxPairs": 100}
This run produces up to 15 rows — one for every warehouse × customer pair — so you can rank which warehouse is closest to each customer in a single run.
Output per route
Each route alternative produces one dataset record:
{"origin": "Times Square, New York, NY","destination": "Central Park, New York, NY","originResolved": "Times Square","destinationResolved": "Central Park","travelMode": "driving","language": "en","units": "metric","routeIndex": 0,"distance": "1.2 mi","distanceMeters": 1931,"duration": "8 min","durationSeconds": 480,"durationInTraffic": "8 min","via": "via Broadway","trafficCondition": "Moderate traffic","steps": [{ "instruction": "Head north on Broadway", "distance": "0.3 mi" }],"googleMapsUrl": "https://www.google.com/maps/dir/Times+Square/Central+Park/?hl=en&travelmode=driving","scrapedAt": "2026-06-16T10:30:00+00:00"}
Empty fields are omitted from the record.
The actor opens Google's visible route-card Details control and, for
transit routes, the localized step-list controls before reading instructions.
This is a bounded cookieless interaction: if Google does not render the
details or steps for that route, steps is omitted rather than inferred.
Transit-only values such as fare, transitWindow, departureTime, and
arrivalTime are likewise emitted only when directly rendered by Google.
Google mounts the route toolbar lazily. The actor waits for the requested travel-mode control and verifies the target-owned active state with a bounded retry before extracting routes. If the control never appears, it does not guess a mode or manufacture a route; the public URL and rendered route must still provide a positive source signal.
midpointLocation is the geometric midpoint of the route's own endpoints and
is present only when both origin and destination are lat,lng coordinates —
for example "40.0,-74.0" → "41.0,-73.0" yields { "lat": 40.5, "lng": -73.5 }.
It is omitted for address/place-name endpoints rather than filled with the map's
viewport centre, which is the fetch environment's geolocation and not a property
of the route.
Distance and duration are also returned in machine-readable integer form — distanceMeters (meters) and durationSeconds (seconds) — so you can plug them straight into analytics and calculations.
durationInTraffic is emitted only when Google renders traffic language for a
driving route. In the common public layout, Google presents the traffic-aware
ETA as the route card's duration and exposes the traffic qualification beside
it; the actor preserves that observed duration without estimating a separate
ETA. It is omitted when the source does not expose traffic context.
Output in matrix mode
In matrix mode each pair contributes its own row(s), and every row carries the origin and destination it belongs to so you can rebuild the full grid. originIndex/destinationIndex give each row its position in the origins/destinations lists. The other fields (distance, duration, and so on) are exactly the same as a route row.
{"recordType": "matrix","origin": "Warehouse A, 1 Main St, Newark, NJ","destination": "10 Wall St, New York, NY","originIndex": 0,"destinationIndex": 0,"travelMode": "driving","routeIndex": 0,"distance": "14.3 km","distanceMeters": 14300,"duration": "28 min","durationSeconds": 1680,"via": "via NJ-139 E","sourceUrl": "https://www.google.com/maps/dir/?api=1&origin=...&destination=...","scrapedAt": "2026-06-16T10:30:00+00:00"}
Rows are written to the dataset as each pair finishes, so you can watch the matrix grow while the run is still going. If Google cannot find a route for a pair, that pair is skipped — no placeholder row is written — and the run's status message reports how many pairs were unresolved.
Pair cap (maxPairs)
With many origins and destinations the number of pairs grows fast: 10 origins × 20 destinations is 200 requests. To keep a run bounded, matrix mode stops after maxPairs pairs (default 100, adjustable between 1 and 1000). Pairs are taken in order — every destination for the first origin, then every destination for the second origin, and so on — and anything past the cap is silently left out. Set maxPairs high enough for your grid (or split a large job into several runs).
Duplicate origins/destinations are removed automatically, so listing the same address twice will not waste a pair.
FAQ
How many routes are returned per run?
Up to 5 alternatives, in the order Google Maps shows them. routeIndex: 0 is Google's recommended route.
Why does Google sometimes resolve my origin/destination differently?
Google Maps performs its own geocoding and may match the closest known place. The originResolved and destinationResolved fields show what it actually matched.
Can I use coordinates instead of addresses?
Yes — pass "40.7580,-73.9855" (or similar) as origin/destination and the actor will route between the exact points. The same works for entries in origins and destinations.
How do I get a travel-time matrix across many locations?
Set mode to matrix and fill in origins and destinations. The actor returns one row per origin/destination pair with the usual distance/duration fields, so you can assemble the full N×M grid from the dataset. Use maxPairs to cap how many pairs a single run requests.
Does this actor use cookies or login? No. Google Maps directions are public and require no authentication.
Is a proxy needed?
No login or cookies are required. The actor tries two fresh direct public contexts and then uses a bounded hardcoded Apify US RESIDENTIAL recovery path when no route is observed. Explicit proxy settings are respected; {"useApifyProxy": false} is direct-only.
What if Google Maps cannot find a route (e.g. between two continents for driving)? The actor will report no routes found and fail the run gracefully so you can see the issue in the status message.
You are responsible for using the returned route information lawfully and in line with Google's terms.
🗺️ Complete Google Maps Scraper Suite
This actor is part of a comprehensive Google Maps data extraction toolkit by crawlerbros. All actors run cookielessly on the free Apify plan with bounded direct, retry, and residential recovery paths, and return clean, structured data.
| Actor | What it does |
|---|---|
| 🏢 Google Maps Business Scraper | Extract business data — name, address, phone, website, rating, reviews, hours, amenities |
| ⭐ Google Maps Reviews Scraper | Scrape reviews with reviewer Local Guide level, photos, mentioned items, owner replies |
| 📸 Google Maps Photos Scraper | Extract all photos from any place — max-resolution URLs, contributor info, categories |
| 🕐 Google Maps Business Hours Scraper | Full 7-day hours, timezone, current local time, next open/close, holiday hours |
| 📊 Google Maps Popular Times Scraper | Busy hours histogram for all 7 days + current busyness + typical visit time |
| 📧 Google Maps Email Extractor | Find business emails + social media links by crawling websites |
| 🗺️ Google Maps Area Scanner | Geographic grid scanning — bypass the 120-place limit with bounding box / circle / polygon |
| 💼 Google Maps Leads Scraper | B2B lead generation with email + phone enrichment, US states + global countries |
| 🤖 Google Maps MCP Server | Unified MCP server combining search + reviews for AI assistants |
| 📍 Google Maps Geocoding Scraper | Bidirectional geocoding — address ↔ coordinates, with address components |
| 🔗 Google Maps Similar Places Scraper | "People also search for" / related place discovery — competitor & alternative finder |
| 🍽️ Google Maps Menu Scraper | Restaurant menu items, prices, descriptions, photos |
| 📌 Google Maps Nearby Scraper | Find places near a coordinate point — lightweight POI search by category |
| 📋 Google Maps Place List Scraper | Extract Google's curated "Top X in Y" lists — best hotels/restaurants/things to do |
| 🌍 Google Maps Timezone Scraper | IANA timezone + current local time from coordinates |