Actions3
- Place Actions
Overview
This node integrates with the Google Places API to perform a Nearby Search for places around a specified geographic location. It allows users to find places such as restaurants, gas stations, hospitals, and other types of establishments within a defined radius from given latitude and longitude coordinates.
Common scenarios where this node is beneficial include:
- Finding nearby amenities or points of interest for a travel app.
- Locating service providers or stores close to a userβs current location.
- Enriching datasets with local business information based on geographic coordinates.
For example, you could use this node to search for restaurants within 1.5 km of Paris city center (latitude 48.8566, longitude 2.3522), filtering results to only show restaurants, and optionally receive a summary optimized for AI agents.
Properties
| Name | Meaning |
|---|---|
| Location | The latitude and longitude around which to search for places, formatted as lat,lng (e.g., "48.8566,2.3522"). |
| Radius | The search radius in meters defining how far from the location to look for places (e.g., 1500). |
| Additional Fields | A collection of optional parameters: |
| - Language | The language code for the returned results. Options: English, French, German, Italian, Spanish. |
| - Region | A region code to bias the search results geographically (e.g., "fr" for France). |
| - Type | Restricts results to a specific place type. Options include ATM, Bank, Gas Station, Hospital, Pharmacy, Restaurant, Store, Tourist Attraction. Default is "restaurant". |
| - Max Results | Maximum number of place results to return (between 1 and 20). Default is 10. |
| - AI Agent Mode | Whether to format output optimized for AI agents (simplified and structured). Boolean, default false. |
| - Include Summary | When AI Agent Mode is enabled, whether to include a human-readable summary of the results. Boolean, default true. |
Output
The node outputs an array of JSON objects, each representing a place found by the Nearby Search. Each place object includes:
place_id: Unique identifier of the place.name: Name of the place.address: Formatted address.rating: Average user rating (if available).price_level: Price level indicator (if available).types: Array of place types/categories.latitudeandlongitude: Geographic coordinates of the place.google_maps_link: A URL linking to the place on Google Maps (extracted from photo attributions if available).
If AI Agent Mode is enabled, the output is simplified and may include:
ai_summary: A human-readable summary listing the found places with key details.total_results: Number of places found.places: The list of place objects.operation: The operation performed ("nearbySearch").timestamp: ISO timestamp of the response generation.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for the Google Places API.
- The node makes HTTP requests to the Google Places API endpoints under
https://maps.googleapis.com/maps/api/place. - No additional external dependencies beyond the standard HTTP client bundled with n8n.
Troubleshooting
- No places found: If the node returns no results, verify that the
locationandradiusare correctly set and that thetypefilter matches existing places in the area. - Invalid API key or quota exceeded: Errors related to authentication or usage limits will be returned by the Google API. Ensure the API key is valid, has Places API enabled, and quota limits are not exceeded.
- Malformed location string: The
locationmust be in the format"lat,lng"(e.g.,"48.8566,2.3522"). Incorrect formatting will cause errors. - Max Results out of range: The
maxResultsproperty must be between 1 and 20; values outside this range may cause unexpected behavior. - Network issues: Connectivity problems can cause request failures; check network access and proxy settings if applicable.