Google Maps Directions & Distance Matrix Scraper avatar

Google Maps Directions & Distance Matrix Scraper

Pricing

from $2.00 / 1,000 routes

Go to Apify Store
Google Maps Directions & Distance Matrix Scraper

Google Maps Directions & Distance Matrix Scraper

Scrape Google Maps directions and a distance matrix: driving, transit, walking and bicycling routes between addresses, places or coordinates, with distance, travel time in traffic, typical range, via roads, alternatives, steps, transit times and fares. Export to JSON, CSV or Excel, or via API.

Pricing

from $2.00 / 1,000 routes

Rating

0.0

(0)

Developer

Steady Scrape

Steady Scrape

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

3 days ago

Last modified

Security

Limited permissions

Share

Google Maps Directions & Distance Matrix Scraper (driving, transit, walking, bicycling)

Scrape Google Maps directions between any places: the distance, the travel time, the time in traffic and the range Google expects at that hour, the roads the route goes via, the alternatives Google offers, and for public transit the departure and arrival times, the lines, the agencies and the fare. Ask one trip, a multi-stop trip (up to 10 stops), or a whole distance matrix (every origin × every destination), by car, transit, on foot or by bike, now or at a time you choose. Turn-by-turn steps on request.

Stops are typed as you would in Google Maps: an address, a business or landmark name, a city, or coordinates. No login, no browser, no Google API key. Export the routes to JSON, CSV or Excel, or read them through the API.

What you can do with Google Maps directions data

  • A distance matrix for logistics and field teams: drive time and distance from every warehouse, store or technician to every customer, in one run, with traffic at the hour they leave.
  • Commute and real-estate analysis: travel time from a list of homes to an office or a school, by car and by transit at 8 AM (departAt), with the typical range Google expects.
  • Delivery and service-area planning: which ZIP codes or towns are within 30 minutes of a site.
  • Route research: the roads each alternative takes, whether it has tolls, Google's note ("Fastest route now due to traffic conditions"), and the toll-free option (avoidTolls).
  • Transit research: the lines, agencies, departure times and fares of the itineraries Google offers between two places, with each ride's stops when steps are on.
  • Travel-time monitoring: schedule the Actor with departInHours and record how drive times change over days.

Input

fieldwhat it does
tripsOne trip per line, stops separated by ->: Austin, TX -> Dallas, TX, or Austin, TX -> Waco, TX -> Dallas, TX for a multi-stop trip. → and | work too. Up to 500.
origins, destinationsA distance matrix: every origin is paired with every destination (up to 50 × 50). An origin equal to a destination is a free same_place row.
travelModesdriving (default), transit, walking, bicycling. Each trip is asked once per mode, one row each.
routesPerTripGoogle's best route plus its alternatives, 1–6 (default 3). Alternatives cost nothing extra.
includeStepsTurn-by-turn instructions for every route and leg, and each transit ride's line, stops and times.
departInHoursLeave N hours after the run starts (0 = now). Traffic and timetables at that hour. Good for schedules.
departAtLeave at a local date and time at the first stop: 2026-11-20 08:00. Replaces departInHours.
avoidTolls, avoidHighways, avoidFerriesRoute options, as in Google Maps.
language, countryLanguage of Google's texts (en, es, de…) and the country it answers for (us, gb…).

A stop that reads as coordinates (30.2672,-97.7431) is asked as a point on the map; anything else as typed text.

Input example: a distance matrix by car at 8 AM

{
"origins": ["Austin, TX", "Round Rock, TX"],
"destinations": ["Georgetown, TX", "San Marcos, TX"],
"travelModes": ["driving"],
"routesPerTrip": 1,
"departAt": "2026-11-20 08:00"
}

Input example: trips by transit and on foot, with steps

{
"trips": ["Times Square, New York -> Brooklyn Bridge Park"],
"travelModes": ["transit", "walking"],
"includeSteps": true
}

Output: one row per trip and travel mode

Each row carries the best route's fields at the top, so a matrix exports straight to a spreadsheet, and every route Google offered (best first) in routes, each with its legs (and steps when asked).

{
"rowType": "route",
"source": "trip",
"inputIndex": 1,
"trip": "Austin, TX -> Dallas, TX",
"origin": "Austin, TX",
"destination": "Dallas, TX",
"originIndex": null,
"destinationIndex": null,
"travelMode": "driving",
"departure": null,
"via": "I-35 N and I-35E N",
"distanceMeters": 315398,
"distanceKm": 315.4,
"distanceMiles": 195.98,
"distanceText": "196 miles",
"durationSeconds": 10685,
"durationText": "2 hr 58 min",
"durationInTrafficSeconds": 10689,
"durationInTrafficText": "2 hr 58 min",
"typicalDurationMinSeconds": 10364,
"typicalDurationMaxSeconds": 11994,
"typicalDurationText": "2 hr 53 min to 3 hr 20 min",
"summary": "Fastest route now, avoids road closure on Cadiz St",
"notices": [],
"hasTolls": false,
"originResolved": "Austin, Texas",
"destinationResolved": "Dallas, Texas",
"originLat": 30.267153,
"originLng": -97.7430608,
"destinationLat": 32.7766642,
"destinationLng": -96.7969879,
"stops": [
{ "input": "Austin, TX", "name": "Austin", "label": "Austin, Texas", "lat": 30.267153, "lng": -97.7430608, "placeId": "ChIJLwPMoJm1RIYRetVp1EtGm10" },
{ "input": "Dallas, TX", "name": "Dallas", "label": "Dallas, Texas", "lat": 32.7766642, "lng": -96.7969879, "placeId": "ChIJS5dFe_cZTIYRj2dH9qSb7Lk" }
],
"routes": [
{ "via": "I-35 N and I-35E N", "distanceMeters": 315398, "durationSeconds": 10685, "legs": [{ "toStop": "Dallas", "distanceMeters": 315398, "durationSeconds": 10685, "steps": null }] },
{ "via": "I-35 N", "distanceMeters": 325712, "durationSeconds": 11405, "legs": ["…"] },
{ "via": "I-35 N and I-45 N", "distanceMeters": 346782, "durationSeconds": 11995, "legs": ["…"] }
],
"mapsUrl": "https://www.google.com/maps/dir/Austin,+TX/Dallas,+TX/data=!4m2!4m1!3e0",
"scrapedAt": "2026-11-03T06:41:24.939Z"
}

A transit row also fills departureTime / arrivalTime (UTC), departureTimeText / arrivalTimeText ("8:20 AM", local), timeZone, fareAmount, fareCurrency, fareText, transitLines (["2"]) and transitAgencies (null or empty on other modes; the example above leaves them out). With steps, a ride reads:

{
"travelMode": "transit",
"durationSeconds": 1110,
"durationText": "18 min",
"transit": { "line": "2", "vehicle": "subway", "headsign": "New Lots Av", "agency": "MTA New York City Transit", "departureStop": "Times Sq-42 St", "arrivalStop": "Clark St", "departureTime": "2026-11-04T13:23:00.000Z", "stopCount": 7 }
}

Row fields

fieldmeaning
rowTyperoute for a trip Google planned (charged), trip for a free row that says why there is no route.
source, inputIndextrip (a line of trips, its position) or matrix (an origin × destination pair, its number).
trip, origin, destinationThe stops as you typed them, joined with ->; the first and the last.
originIndex, destinationIndexA matrix pair's positions in origins and destinations; null for a trip line.
travelMode, departureThe mode asked, and the departure asked (null for now).
originResolved, destinationResolved, originLat, originLng, destinationLat, destinationLngWhere Google placed the first and the last stop.
stopsEvery stop as Google resolved it: name, full label, coordinates, place id.
routesEvery route Google offered, best first (the row's own route fields repeat the first), each with its legs.
mapsUrlThe same trip on Google Maps, to open in a browser.
scrapedAtWhen the run read it (UTC).

Route fields

The best route's fields sit at the top of the row; every route in routes carries the same ones.

fieldmeaning
distanceMeters, distanceKm, distanceMiles, distanceTextThe route's length, and Google's own text for it.
durationSeconds, durationTextGoogle's travel time for the route.
durationInTrafficSeconds, durationInTrafficTextDriving: the time with traffic at the departure asked (now by default).
typicalDurationMinSeconds, typicalDurationMaxSeconds, typicalDurationTextDriving: the range Google expects at that time of day ("21–27 min").
viaThe roads the route takes, as Google summarizes them.
summary, notices, hasTollsGoogle's note on why it ranks the route, its notices ("This route has tolls.", "This route includes a ferry.").
departureTime, arrivalTime, timeZone, fare…, transitLines, transitAgenciesTransit only.
legsOne per stretch between consecutive stops: toStop, distance, duration, and steps when asked.

Free rows

A trip that gives no route is a row with rowType: "trip", a status and a reason, and is never charged: place_not_found (Google cannot find a stop, named in stopNotFound), no_route (no route in that mode, e.g. driving across an ocean or transit where there is none), same_place, invalid (one stop, more than ten), blocked, and spending_limit.

Pricing

  • US$0.002 per route: one trip in one travel mode, with Google's alternatives included (US$2 per 1,000; a 30 × 30 distance matrix is 900 routes, US$1.80).
  • US$0.003 per route with steps, when includeSteps is on.

Free rows are never charged, and the run stops at your spending limit. Google's own Distance Matrix API bills US$0.005 an element.

How it reads Google Maps, and when Google asks for verification

It asks Google Maps the same question its own directions page asks when you open a /maps/dir/ link, over HTTP, at a person's pace: one request per trip and mode, two in flight. If Google asks an IP for verification — its "unusual traffic" page, a CAPTCHA, a JavaScript check, or any answer that is not Google Maps' normal data — that IP is done for the run: nothing more is sent from it, and the run goes on from another IP of Apify's datacenter proxy. It never solves, bypasses or replays a challenge. Plain overloads (HTTP 429 or 5xx without a challenge) take the same way. When every IP the run can use has been refused, the trips left are free blocked rows that say so, and the run ends normally with a message to try again later.

Limits

  • Up to 500 trips and a 50 × 50 matrix per run; up to 10 stops per trip; up to 6 routes per trip.
  • A stop typed as text is resolved the way Google Maps resolves it; set country to the trips' country so a bare "Springfield" means the right one, or type the state or postcode.
  • "Arrive by" is not offered: Google Maps answers driving trips with no clock times, so only departures are asked.
  • Transit needs a departure from today on: Google has no timetables for a past date, so a past departAt gives transit trips a free no_route row (driving, walking and bicycling still answer).
  • Route shapes (polylines) are not delivered.

It reads directions Google Maps shows to anyone, without logging in, at a pace a person planning trips could produce. Routes are not personal data. Use the data in line with Google's terms and the laws that apply to you.

This Actor is not affiliated with, endorsed by or sponsored by Google. Google and Google Maps are trademarks of Google LLC.