n8n-nodes-gplaces
v1.0.94
Published
Google Places API node for n8n - Text Search, Nearby Search, Place Details
Maintainers
Readme
n8n-nodes-gplaces
Google Places API v1 node for n8n - Text Search, Nearby Search, Place Details
Overview
This is an n8n community node package that provides integration with Google Places API v1 (the new Places API). It allows you to search for places using natural language queries directly from your n8n workflows.
Features
- Text Search: Search places using natural language queries (e.g., "pizza in New York")
- Field Selection: Choose which fields to return to control costs
- Location Bias: Bias results to a specific location (circular or rectangular)
- Pagination: Return all results with automatic pagination
- Multiple Languages: Support for various language codes
Prerequisites
- n8n instance (version 1.0.0 or higher)
- Google Cloud Platform account with Places API (New) enabled
- Google API key
Installation
From npm (recommended)
npm install n8n-nodes-gplacesManual Installation
Navigate to your n8n custom nodes folder:
~/.n8n/custom/Clone this repository:
git clone https://github.com/Danielnke/n8n-nodes-gplaces.gitInstall dependencies:
cd n8n-nodes-gplaces npm installBuild the project:
npm run buildRestart your n8n instance
Configuration
Creating Credentials
- Click on "Credentials" in n8n
- Create a new credential of type "Google Places API"
- Enter your Google API key
- Save the credential
Enabling Google Places API
- Go to Google Cloud Console
- Create or select a project
- Enable the Places API (New)
- Create an API key in Credentials
Operations
Search Places
Search for places using a text query.
Parameters:
- Query: The search query (e.g., "pizza in New York", "coffee shop near Central Park")
- Location Bias: Optional JSON to bias results to a location
- Rank Preference: How to rank results (Distance or Relevance)
- Page Size: Number of results per page (1-20)
- Return All: Fetch all pages of results
- Language Code: Language for results (e.g., en, es, fr)
- Fields: Select which fields to return (controls cost)
Example Location Bias (Circular):
{
"circle": {
"center": {
"latitude": 37.7749,
"longitude": -122.4194
},
"radius": 5000
}
}Example Location Bias (Rectangular):
{
"rectangle": {
"low": {
"latitude": 40.477398,
"longitude": -74.259087
},
"high": {
"latitude": 40.91618,
"longitude": -73.70018
}
}
}Place Details
Get detailed information about a specific place using its Place ID.
Field Selection
The Fields parameter lets you select which data to return. This directly affects pricing:
| Field | Pricing Tier | |-------|-------------| | displayName, id, formattedAddress, location, types | Basic | | rating, photos, priceLevel | Pro | | reviews, openingHours | Enterprise |
Development
Building
npm run buildDevelopment mode (watch)
npm run devTesting
npm testLicense
MIT - see LICENSE file for details
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
- n8n - Workflow automation platform
- Google Places API - Places API documentation
