n8n-nodes-serper
A custom n8n node for Serper web search API that can be used as a tool in AI agent nodes.
Features
- Web Search: Perform web searches using Serper's Google Search API
- AI Agent Compatible: Designed to work seamlessly with n8n's AI agent nodes
- Configurable Parameters: Customize search results, country, language, and safe search settings
- Structured Output: Returns formatted search results optimized for AI processing
Installation
From npm
npm install n8n-nodes-serper
From source
- Clone this repository
- Install dependencies:
npm install
- Build the package:
npm run build
- Copy the
dist
folder to your n8n custom nodes directory
Setup
- Get your Serper API key from serper.dev
- In n8n, add the Serper node to your workflow
- Configure the Serper API credentials with your API key
- Set your search parameters and query
Usage
Basic Search
- Add the Serper node to your workflow
- Configure the credentials with your Serper API key
- Set the search query
- Configure additional parameters as needed:
- Number of Results: 1-100 (default: 10)
- Country: Country code for localized results (default: us)
- Language: Language code for results (default: en)
- Safe Search: Enable/disable safe search filtering
As an AI Agent Tool
The Serper node is designed to work as a tool in n8n's AI agent nodes. Simply add it to your agent workflow and the AI will be able to perform web searches as part of its toolset.
Output Format
The node returns structured data including:
- organic: Array of organic search results
- peopleAlsoAsk: Related questions
- relatedSearches: Related search suggestions
- searchInformation: Metadata about the search
API Reference
Serper API
This node uses the Serper API for web search functionality.
Parameters
query
(required): The search query
num
(optional): Number of results (1-100, default: 10)
gl
(optional): Country code (default: us)
hl
(optional): Language code (default: en)
safe
(optional): Safe search setting (off/active, default: off)
Development
Prerequisites
Setup
git clone https://github.com/your-username/n8n-nodes-serper.git
cd n8n-nodes-serper
npm install
Build
npm run build
Lint
npm run lint
Format
npm run format
License
MIT
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add some amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
Support
For issues and questions: