Actions37
- Search Actions
- Amazon Search
- Baidu Search
- Bing Images
- Bing Search
- DuckDuckGo Search
- eBay Search
- Facebook Profile
- Google AI Mode
- Google AI Overview
- Google Autocomplete
- Google Finance
- Google Flights
- Google Hotels
- Google Images
- Google Images Light
- Google Immersive Product
- Google Jobs
- Google Lens
- Google Light
- Google Local
- Google Maps
- Google Maps Directions
- Google Maps Reviews
- Google News
- Google News Light
- Google Play Games
- Google Play Product
- Google Play Store
- Google Product
- Google Scholar
- Google Search
- Google Shopping
- Google Travel Explore
- Google Trends
- Google Trends Trending Now
- Google Videos
- YouTube Search
Search → Google Maps Directions
AI-generatedOverview
This node performs a Google Maps Directions search using the SerpApi service. It allows users to obtain directions between a starting point and an ending point with various customizable parameters such as travel mode, language, country, and route preferences. This node is useful for applications that require route planning, travel time estimation, or navigation assistance, such as logistics, travel planning, or delivery services.
Use Case Examples
- A logistics company uses this node to calculate driving directions between warehouses and delivery locations.
- A travel app integrates this node to provide walking or cycling routes for tourists.
- A transit app uses this node to find public transportation routes with preferred transit options.
Properties
| Name | Meaning |
|---|---|
| Starting Point Address (start_addr) | Defines the address of the starting point for the direction search. Alternative inputs include start_data_id or start_coords. |
| Ending Point Address (end_addr) | Defines the address of the ending point for the direction search. Alternative inputs include end_data_id or end_coords. |
| Country (gl) | Defines the country to use for the Google Maps Directions search. |
| Language (hl) | Defines the language to use for the search results. |
| Travel Mode (travel_mode) | Defines the travel mode for directions. |
| Starting Point Data ID (start_data_id) | Data ID of the starting point, as found using the Google Maps API. Alternative inputs include start_addr or start_coords. |
| Ending Point Data ID (end_data_id) | Data ID of the ending point, as found using the Google Maps API. Alternative inputs include end_addr or end_coords. |
| Starting Point GPS Coordinates (start_coords) | GPS coordinates (latitude,longitude) of the starting point. Alternative inputs include start_addr or start_data_id. |
| Ending Point GPS Coordinates (end_coords) | GPS coordinates (latitude,longitude) of the ending point. Alternative inputs include end_addr or end_data_id. |
| Distance Unit (distance_unit) | Defines the displayed distance unit for the directions. |
| Avoid Options (avoid) | Options to avoid certain route features such as highways, tolls, or ferries. Multiple options can be combined with commas. |
| Preferred Transit Options (prefer) | Preferred transit options such as bus, subway, train, or tram_light_rail. Only applicable if travel_mode is set to Transit. |
| Route Options (route) | Defines route preferences such as fewer transfers, less walking, or wheelchair accessible routes. |
| Travel Time (time) | Defines the time to travel, supporting advanced options as per SerpApi documentation. |
| Disable Caching (no_cache) | Forces SerpApi to fetch new results instead of using cached results. Cache expires after 1 hour. |
| Async (async) | Performs the search asynchronously, submitting the search and retrieving results later. Cannot be used with no_cache or on accounts with Ludicrous Speed enabled. |
| ZeroTrace Mode (zero_trace) | Enterprise-only option to skip storing search parameters and metadata on SerpApi servers for privacy. |
| Output (output) | Defines the output format, either JSON (structured results) or HTML (raw HTML). |
| JSON Restrictor (json_restrictor) | Restricts fields in the response to specified fields only. |
Output
JSON
directions- The directions data returned from the Google Maps Directions search, including routes, steps, travel times, and other relevant information.
Dependencies
- SerpApi API key credential
Troubleshooting
- Ensure that either starting and ending addresses, data IDs, or coordinates are provided; missing these will cause errors.
- If the API key is invalid or missing, the node will fail to authenticate with SerpApi.
- Using incompatible parameters together, such as async and no_cache, will cause errors; avoid combining these.
- Timeouts may occur if the server does not respond in time; adjust the timeout setting if needed.
Links
- SerpApi Google Maps Directions API - Official documentation for the Google Maps Directions API on SerpApi.