This actor automates extracting route directions from Google Maps. Using Node.js and Puppeteer, it retrieves travel routes, distances, and estimated times for various transport modes, offering structured data for navigation, logistics, or travel planning applications.
This Apify actor scrapes detailed directions from Google Maps, providing route information such as distance, travel time, and step-by-step instructions for various modes of transportation (driving, walking, cycling, public transport, etc.). This is useful for generating route data for apps, transportation analysis, or travel planning.
Input: Provide starting and destination locations (either as addresses or coordinates).
Modes of Transport: Supports multiple modes of transportation: Driving, Walking, Cycling, Flight, Transit, Two Wheeler,
Detailed Route Information: Retrieves essential route details: Total distance, Estimated travel time, Step-by-step directions (turn-by-turn), Transportation mode (e.g., driving, walking, cycling), Estimated arrival time for public transportation, Directions with Google Maps link,
Output Formats: Results are available in JSON format for easy integration and further use.
This actor queries Google Maps for directions between the specified origin and destination locations and parses the results to extract key details about the route, travel time, distance, and steps.
The input is a JSON object that includes the following fields:
1{ 2 "source": "New York", 3 "destination": "Washington" 4}
The output is a JSON object containing detailed route information for the trip. Here’s an example of what the output might look like:
1[{ 2 "source": "New York", 3 "destination": "Washington", 4 "mode": { 5 "best": [ 6 { 7 "mode": "Driving", 8 "duration": "43 hr", 9 "metre": "2,919 miles", 10 "direction": "via I-80 W", 11 "means": null, 12 "info": "43 hr without traffic\n This route has tolls.\n Your destination is in a different time zone." 13 }, 14 { 15 "mode": "Driving", 16 "duration": "43 hr", 17 "metre": "2,923 miles", 18 "direction": "via I-40 W", 19 "means": null, 20 "info": "43 hr without traffic" 21 }, 22 { 23 "mode": "Flights", 24 "duration": "7 hr 35 min", 25 "metre": null, 26 "direction": "New York, NY—Fresno, CA", 27 "means": null, 28 "info": null 29 } 30 ], 31 "walk": [ 32 { 33 "mode": "Walking", 34 "duration": "1,033 hr", 35 "metre": "2,830 miles", 36 "direction": "via IA-2 E", 37 "means": null, 38 "info": " This route includes a ferry.\n This route has restricted usage or private roads.\n Your destination is in a different time zone." 39 } 40 ], 41 "driving": [ 42 { 43 "mode": "Driving", 44 "duration": "43 hr", 45 "metre": "2,919 miles", 46 "direction": "via I-80 W", 47 "means": null, 48 "info": "43 hr without traffic\n This route has tolls.\n Your destination is in a different time zone." 49 }, 50 { 51 "mode": "Driving", 52 "duration": "43 hr", 53 "metre": "2,923 miles", 54 "direction": "via I-40 W", 55 "means": null, 56 "info": "43 hr without traffic" 57 }, 58 { 59 "mode": "Driving", 60 "duration": "43 hr", 61 "metre": "2,954 miles", 62 "direction": "via I-70 W", 63 "means": null, 64 "info": "43 hr without traffic" 65 } 66 ], 67 "two-wheeler": null, 68 "transit": null, 69 "flight": [ 70 { 71 "mode": "Flights", 72 "duration": "7 hr 35 min+ - from $481", 73 "metre": null, 74 "direction": "New York, NY—Fresno, CA", 75 "means": null, 76 "info": null 77 } 78 ], 79 "cycling": [ 80 { 81 "mode": "Cycling", 82 "duration": "296 hr", 83 "metre": "3,533 miles", 84 "direction": "via Empire State Trl", 85 "means": null, 86 "info": " This route includes a ferry.\n This route crosses through Canada.\n This route has restricted usage or private roads.\n Your destination is in a different time zone." 87 } 88 ] 89 } 90}]
JSON
#On the Apify Platform
apify run your-username/google-direction-scraper --input='{"source": "New York", "destination": "Washington"}'
1{ 2 "source": "New York", 3 "destination": "Washington" 4}
This input will fetch the directions from New York to Washington.
Yes, if you're scraping publicly available data for personal or internal use. Always review Websute's Terms of Service before large-scale use or redistribution.
No. This is a no-code tool — just enter a job title, location, and run the scraper directly from your dashboard or Apify actor page.
It extracts job titles, companies, salaries (if available), descriptions, locations, and post dates. You can export all of it to Excel or JSON.
Yes, you can scrape multiple pages and refine by job title, location, keyword, or more depending on the input settings you use.
You can use the Try Now button on this page to go to the scraper. You’ll be guided to input a search term and get structured results. No setup needed!