Actions7
- Image Actions
- News Actions
- Scholar Actions
- Search Actions
- Shopping Actions
- Video Actions
Overview
This node integrates with the Google Search API (via Serper.dev) to perform web search queries and retrieve search results programmatically. It supports multiple types of searches including web, images, videos, news, shopping, and scholarly articles. The "Web Search" operation under the "Search" resource allows users to query Google and obtain paginated search results with options for language, country, number of results, and autocorrect.
Common scenarios where this node is beneficial include:
- Automating data collection from Google search results.
- Integrating search capabilities into workflows without manual browsing.
- Extracting search result metadata for analysis or reporting.
- Localizing search results by country and language preferences.
Practical example:
- A marketing team could use this node to automatically gather the top 40 search results for a product keyword in the United States, English language, to monitor competitor presence.
- Researchers can automate retrieval of scholarly article links using the scholar resource.
- News aggregators can fetch recent news articles matching specific queries.
Properties
| Name | Meaning |
|---|---|
| Page | Page number for paginated results; controls which page of results to retrieve (default: 1). |
| Query | The search query string to be sent to Google Search API (required). |
| Results | Number of results to return; options are 10, 20, 40, 60, 80, 100 (default: 40). |
| Country | Country code to localize search results; many country options available (default: "us"). |
| Language | Language code to specify the language of search results; many language options available (default: "en"). |
| Autocorrect | Boolean flag to enable or disable autocorrect on the search query (default: true). |
Output
The node outputs an array of JSON objects representing the search results returned by the Google Search API. Each item corresponds to one search result entry and contains all relevant metadata as provided by the API response.
The output does not include binary data; it is purely JSON structured data containing search result details such as titles, snippets, URLs, and other metadata depending on the search type.
Dependencies
- Requires an API key credential for the Serper.dev Google Search API.
- The node uses HTTP POST requests authenticated via this API key.
- No additional environment variables are required beyond the API credential setup in n8n.
Troubleshooting
Common issues:
- Invalid or missing API key credential will cause authentication errors.
- Exceeding API rate limits may result in request failures.
- Incorrect parameter values (e.g., unsupported country or language codes) might lead to empty or error responses.
- Network connectivity problems can cause HTTP request failures.
Error messages:
- Errors thrown by the node typically contain the message from the underlying API or HTTP client.
- If
continueOnFailis enabled, errors for individual items are returned as JSON objects with anerrorfield describing the issue.
Resolutions:
- Verify that the API key credential is correctly configured and active.
- Check the quota and usage limits of the Serper.dev API.
- Ensure input parameters conform to allowed values.
- Use the node's built-in error handling features to manage partial failures gracefully.
Links and References
- Serper.dev Google Search API Documentation
- n8n HTTP Request Node Documentation
- Google Search Localization Codes (for reference on country/language codes)