Search for Places Node
Overview
The Search for Places node allows users to search for locations based on a text query. The query can include place names, categories, or addresses. The search results can be filtered, biased, or restricted based on specific conditions.
Configuration Fields
Query
- Type:
- Handlebars Template
- JavaScript Statement
- JavaScript Function(Defines the type of query that will be executed.)
- Expression:
- Required field where the query expression must be defined.
Filter by Type
- Options:
- All Types (Default)
- Specific Type(Determines whether to search all places or restrict the search to a specific type.)
Location Mode
- Options:
- Bias (Prioritizes results closer to the reference location.)
- Restrict (Limits results strictly within the defined location.)
Location Type
- Options:
- Static (Uses a fixed location.)
- Dynamic (Uses dynamically generated latitude/longitude coordinates.) (Determines whether the search uses a predefined static location or a dynamic range of coordinates.)
Location (for Static Location Type)
- Required if "Static" is selected for Location Type.
- Accepts latitude/longitude values or a specific location identifier.
Bounding Box (for Dynamic Location Type)
- North (Latitude) - Defines the northern boundary of the search area.
- East (Longitude) - Defines the eastern boundary.
- South (Latitude) - Defines the southern boundary.
- West (Longitude) - Defines the western boundary.
- (Defines a search area using geographical coordinates.)
Result Type
- Options:
- Single Place (Returns a single best match.)
- Multiple Places (Array) (Returns an array of matching places.)
Validation & Errors
- The Query Expression is a required field and must contain a valid query string.
- When using Static Location, a valid location must be provided.
- When using Dynamic Location, valid latitude/longitude values must be set for the bounding box.
Use Cases
- Finding businesses, landmarks, or addresses based on a search term.
- Filtering places by type (e.g., restaurants, hotels, gas stations).
- Prioritizing search results based on proximity to a predefined location.
- Restricting searches to a specific geographic area.
Example Usage
- Searching for "Coffee Shops near New York" using a static location.
- Looking up "Gas Stations" within a dynamic bounding box.
- Prioritizing restaurants based on proximity but allowing global matches.
This node is essential for place-based automation workflows, integrating location search functionality efficiently into processes.