Google Maps Route Matrix Scraper avatar

Google Maps Route Matrix Scraper

Pricing

from $3.99 / 1,000 results

Go to Apify Store
Google Maps Route Matrix Scraper

Google Maps Route Matrix Scraper

Extract source-visible route choices, distance, duration, traffic advisories, tolls, transit options, and optional step directions from rendered public Google Maps pages.

Pricing

from $3.99 / 1,000 results

Rating

0.0

(0)

Developer

Google API

Google API

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Compare route options for origin and destination pairs using public Google Maps directions pages. The Actor creates one dataset record per visible route option and supports driving, walking, cycling, transit, and other modes that Google Maps offers for the selected trip.

How to use

Provide both origins and destinations, or supply public directions URLs in startUrls. Each origin is paired with each destination, within the configured limits.

{
"origins": ["New York, NY"],
"destinations": ["White Plains, NY"],
"travelMode": "driving",
"units": "imperial",
"includeAlternatives": true,
"includeRouteText": true,
"includeRouteSteps": false,
"maxPairs": 25,
"maxItems": 25
}

You can also start from a directions URL:

{
"startUrls": [
{ "url": "https://www.google.com/maps/dir/New+York,+NY/White+Plains,+NY" }
],
"travelMode": "transit",
"maxPairs": 5
}

Input

InputDescriptionDefault
origins / destinationsLists of start and end locations. Each origin is paired with each destination.—
startUrlsPublic Google Maps directions pages. urls is an alias.—
travelModeRequested travel mode. mode is an alias.driving
unitsPreferred distance units. The output preserves the units shown by Maps.metric
languageLanguage for the directions page.en
includeAlternativesInclude all visible route options for the requested mode.true
includeRouteTextInclude the route card text and displayed advisories.true
includeRouteStepsCollect optional step-by-step details for selected routes.false
maxDetailRoutesMaximum route options to enrich with steps.3
maxPairsMaximum origin-destination pairs to inspect.25
maxItemsMaximum route records across the run.25
page / maxPagesStarting point and number of pairs to inspect from the ordered pair list.1 / 10
proxyConfigurationOptional Apify Proxy settings. Direct connections are the default.—

Output

Each dataset item represents a route option and includes route rank, origin, destination, travel mode, and the public Google Maps directions URL. When available, a record may also contain:

  • Route name and visible route text.
  • Distance and duration, with normalized numeric values.
  • Google's displayed recommendation, traffic notes, warnings, avoided roads, and toll, closure, fastest-route, and traffic-recommendation details when available.
  • Requested and observed travel modes, plus the other modes available for the trip.
  • Transit details and the departure and arrival information shown by Maps.
  • Step-by-step directions when includeRouteSteps is enabled and details are available.

The Actor reports only details shown for the selected route. It does not estimate traffic, infer tolls, or fill in missing steps. Optional step collection is limited by maxDetailRoutes and can increase run time.

Example dataset item:

{
"routeId": "route_123",
"routeRank": 1,
"routeOptionCount": 2,
"isAlternative": false,
"routeName": "Via I-87 N",
"routeSummary": "31.2 mi · 45 min",
"distance": { "text": "31.2 mi", "value": 31.2, "unit": "mi", "meters": 50211 },
"duration": { "text": "45 min", "seconds": 2700 },
"origin": { "input": "New York, NY" },
"destination": { "input": "White Plains, NY" },
"travelMode": "driving",
"googleMapsUrl": "https://www.google.com/maps/dir/New+York,+NY/White+Plains,+NY"
}

Run summary information is available with the run output in Apify.

Limits and responsible use

Available routes depend on Google Maps and the selected travel mode, time, and locale. The Actor does not sign in or bypass access checks. Use locations you are permitted to process and follow Google Maps terms and applicable laws. This Actor is not affiliated with Google.