Actions3
- Place Actions
Overview
This node integrates with the Google Places API to perform text-based searches for places. It allows users to find locations such as restaurants, stores, or other points of interest by providing a search query string. This is useful in scenarios where you want to discover places based on descriptive text rather than geographic coordinates.
Practical examples include:
- Searching for "restaurants in Paris" to get a list of dining options.
- Finding "tourist attractions near New York" using a textual description.
- Retrieving places matching a specific keyword or phrase without needing exact location data.
The node supports additional options like language preference, region biasing, limiting the number of results, and an AI agent mode that formats output for easier consumption by AI systems.
Properties
| Name | Meaning |
|---|---|
| Query | The text string on which to search (e.g., "restaurants in Paris"). Required for text search. |
| Additional Fields | A collection of optional parameters: |
| - Language | Language to return results in. Options: English, French, German, Italian, Spanish. |
| - Region | Region code to bias search results (e.g., "fr" for France). |
| - Max Results | Maximum number of results to return (1-20). Default is 10. |
| - AI Agent Mode | Whether to optimize output format for AI agents (simplified and structured). Boolean. |
| - Include Summary | When AI Agent Mode is enabled, whether to include a human-readable summary. Boolean. |
Note: Other fields related to different operations (like Nearby Search or Place Details) are not applicable here.
Output
The node outputs an array of JSON objects, each representing a place found by the text search. Each object contains:
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: Categories/types of the place.latitudeandlongitude: Geographic coordinates if available.google_maps_link: A URL linking to the place on Google Maps (extracted from photo attributions if present).
If no places are found, the output includes a message indicating no results along with the status and original query.
When AI Agent Mode is enabled, the output is simplified and may include:
- A human-readable summary listing found places with key details.
- A structured list of places.
- Metadata such as total results, operation type, and timestamp.
The node does not output binary data.
Dependencies
- Requires an API key credential for the Google Places API.
- Makes HTTP requests to
https://maps.googleapis.com/maps/api/place/textsearch/json. - No additional environment variables or configurations beyond the API key are needed.
Troubleshooting
Common Issues:
- Invalid or missing API key will cause authentication errors.
- Exceeding Google Places API quota limits may result in rate limit errors.
- Providing an empty or invalid query string will yield no results or errors.
- Network connectivity issues can cause request failures.
Error Messages:
- Errors returned from the Google API are passed through, e.g.,
"error": "Invalid request". - If no places are found, the node returns a message like
"No places found"with status info. - Node operation errors include the error message and the item index for easier debugging.
- Errors returned from the Google API are passed through, e.g.,
Resolutions:
- Ensure the API key is valid and has access to the Google Places API.
- Verify the query string is meaningful and correctly formatted.
- Monitor usage quotas and upgrade your Google Cloud plan if necessary.
- Check network connectivity and proxy settings if applicable.