Google Maps Directions Scraper avatar

Google Maps Directions Scraper

Pricing

$0.50 / 1,000 route results

Go to Apify Store
Google Maps Directions Scraper

Google Maps Directions Scraper

Compare Google Maps routes by distance, estimated travel time, travel mode and route steps. Enter origin and destination locations, then compare supported travel modes and route alternatives.

Pricing

$0.50 / 1,000 route results

Rating

0.0

(0)

Developer

Scrappa

Scrappa

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

0

Monthly active users

8 days ago

Last modified

Categories

Share

Compare Google Maps routes by distance, estimated travel time, travel mode and route steps. Enter origin and destination locations, then compare supported travel modes and route alternatives.

What data can you extract?

Route distance and travel time reflect the selected origin, destination and travel mode.

FieldTypeDescription
alternative_indexnumberRoute alternative index in the Google Maps route option list, as a whole number; null when the source does not supply one.
request_indexnumberZero-based position of this request in the submitted Google Maps input batch; null for a single-item lookup.
request_origintextRoute origin passed to Google Maps. This input value is copied into the output row; null when it was not supplied.
request_destinationtextRoute destination passed to Google Maps. This input value is copied into the output row; null when it was not supplied.
request_modetextRoute travel mode passed to Google Maps. This input value is copied into the output row; null when it was not supplied.
request_hltextInterface language code passed to Google Maps; Use a language code such as en or de. This input value is copied into the output row; null when it was not supplied.
request_gltextTwo-letter country or region code passed to Google Maps; Use a two-letter country code such as us or de. This input value is copied into the output row; null when it was not supplied.
travel_modetextTravel mode used for the route, such as driving, walking, cycling or transit; null when Google Maps does not provide the value.
viatextRoad or route waypoint shown for the route option by Google Maps, in the format used by the source; null when it is omitted.
distancenumberLength of this Google Maps route, in meters; null if no distance is available.
durationnumberEstimated travel time for this Google Maps route, in seconds; null if Google Maps has no estimate.
formatted_distancetextRoute length in Google Maps display format, such as miles or kilometers; null when no route is available.
formatted_durationtextTravel time as Google Maps displays it, such as minutes or hours; null when no estimate is available.
step_coordinatesarrayRoute step coordinates as decimal latitude and longitude from Google Maps; an empty list when no entries are available.
tripsarrayRoute legs with distance in meters, travel time in seconds and turn-by-turn steps from Google Maps; an empty list when no entries are available.

Use cases

  • Dispatch teams can compare route length and estimated time before assigning a service visit.
  • Field teams can check driving, walking, cycling or transit options for an appointment route.
  • Travel planners can inspect route steps and coordinates while preparing a local itinerary.

How to use

  1. Open the Actor’s Input tab and start with the JSON below.
  2. Put the supported targets in routes and use the identifier or URL format required by Google Maps.
  3. Start the run and open its default dataset to inspect or download the rows.
{
"origin": "Times Square, New York, NY",
"destination": "Central Park, New York, NY",
"routes": [
{
"origin": "Times Square, New York, NY",
"destination": "Central Park, New York, NY",
"mode": "driving",
"hl": "en"
}
]
}

The run dataset can be downloaded as JSON, CSV, Excel or another format offered by Apify.

Input

FieldTypeRequiredDescription
routesarray of objectNoPreferred batch input. One request is created for each route object; duplicate requests are processed once. Maximum 10 route requests per run. Constraints: maximum 10 items.
originstringNoSingular compatibility input. Use routes for batches.
destinationstringNoSingular compatibility input. Use routes for batches.
modestringNoTravel mode: driving, walking, bicycling/cycling, or transit. Constraints: allowed values: driving, walking, bicycling, cycling, transit.
hlstringNoLanguage code for route labels, such as en or de-DE.
glstringNoTwo-letter country or region code for geo-filtering.

Output example

The record below is synthetic. Names and links are examples, and private contact fields are omitted.

{
"travel_mode": "Driving",
"distance": 5200,
"duration": 1260,
"via": "Broadway via West 81st Street",
"formatted_distance": "3.2 mi",
"formatted_duration": "21 min",
"trips": [
{
"distance": 5200,
"duration": 1260,
"steps": [
{
"instruction": "Continue north on Broadway",
"distance": 420,
"duration": 96,
"gps_coordinates": {
"latitude": 40.7580,
"longitude": -73.9855
}
}
]
}
],
"step_coordinates": [
{
"latitude": 40.7580,
"longitude": -73.9855
},
{
"latitude": 40.7812,
"longitude": -73.9665
}
]
}

Pricing

Current live price: $0.50 per 1,000 results.

Each saved dataset record counts as one result.

FAQ

This Actor is for information visible on the public source pages it reads. You are responsible for checking the source terms, privacy and copyright rules, and the laws that apply to your use.

How many records will a run return?

The result count depends on the input limits, pagination settings and what the source makes available. A small query or unavailable page can return fewer records, including none.

Can I call it through the API or connect it to other tools?

Yes. Send the same JSON input to POST https://api.apify.com/v2/acts/thescrappa~google-maps-directions-scraper/runs, then read the run’s default dataset. Make, Zapier and n8n can start runs and pass dataset rows to the next step; Google Sheets can receive rows through those workflows or a dataset export.

What happens when a request fails?

Check the run log for the source or input error, correct the input and retry after a temporary source issue. A run can contain rows saved before a later request failed.

Which travel modes can Google Maps Directions compare?

The mode input accepts driving, walking, bicycling, cycling or transit. The number of route alternatives may differ by mode.