Actions4
Overview
The Google Search operation in this node allows you to perform real-time web searches using Google's search engine through the SearchApi service. It is designed to fetch up-to-date search results based on a query and various optional parameters that refine the search context, such as location, language, device type, safe search filtering, and time filters.
This node is beneficial when you need to automate gathering current information from the web, monitor trends, or integrate live search data into workflows. For example, you could use it to:
- Retrieve the latest news articles or blog posts about a specific topic.
- Monitor brand mentions or competitor activity by searching for relevant keywords.
- Collect URLs and snippets for SEO analysis or content curation.
- Filter search results by country or language to target specific markets.
Properties
| Name | Meaning |
|---|---|
| Query | The search query string. Supports any valid Google search syntax including operators like inurl:, site:, intitle:, etc. |
| Location Settings | Collection of settings to specify the geographic context of the search: - Country: Select the country code to localize search results (e.g., US, UK, DE). |
| Country Restriction | Restricts results to documents originating from a specified country based on URL domain or server IP. |
| Encoded Location | A Google encoded location parameter (uule) to precisely define the search origin. Cannot be used together with the location parameter. |
| Geographic Location | Defines the general location from which the search should originate. If multiple locations match, the most popular one is chosen. |
| Google Domain | Specifies the Google domain to use for the search (e.g., google.com, google.co.uk, google.fr), affecting regional search behavior. |
| Language Settings | Collection of language-related options: - Interface Language: Sets the language of the search interface. - Language Restriction: Limits results to documents written in selected languages. |
| Search Options | Collection of additional search preferences: - Content Filter: Enable/disable duplicate content and host crowding filters. - Device Type: Desktop, mobile, or tablet search. - No Auto-Correction: Include/exclude auto-corrected queries. - Optimization Strategy: Optimize for performance or ad collection. - SafeSearch: Enable or disable SafeSearch filtering of adult content. |
| Time Filters | Collection of parameters to restrict results by date: - Time Period: Predefined ranges like last hour, day, week, month, year. - Time Period Start/End: Custom date range in MM/DD/YYYY format. |
| Pagination | Controls pagination of results: - Results Per Page: Number of results per page. - Page Number: Which page of results to return. |
| Advanced Options | Additional advanced parameters: - Knowledge Graph ID: Specify a Knowledge Graph entity identifier to focus the search on a particular entity or location. |
Output
The node outputs JSON data containing the search results returned by the SearchApi service. This typically includes an array of search result items with fields such as titles, URLs, snippets, and possibly metadata related to each result.
If the search engine supports images, maps, or shopping results, the output may include corresponding structured data relevant to those types.
The node does not output binary data.
Dependencies
- Requires an API key credential for the SearchApi service to authenticate requests.
- The node sends HTTP GET requests to the SearchApi endpoint at
https://www.searchapi.io/api/v1/search. - No other external dependencies are required.
- Ensure the API key credential is configured properly in n8n before using this node.
Troubleshooting
- Quota Limits: The free tier of SearchApi has a limited number of requests (e.g., 100). Exceeding this will cause errors. Consider upgrading your plan if needed.
- Invalid Query: If the query string is empty or malformed, the API may return an error. Always provide a valid search query.
- Conflicting Parameters: Using both
uule(encoded location) andlocationparameters simultaneously is not allowed and may cause request failures. - Unsupported Country or Language Codes: Providing invalid or unsupported codes for country or language restrictions can lead to no results or errors.
- Pagination Issues: Requesting pages beyond available results may return empty arrays.
- SafeSearch Filtering: Enabling SafeSearch may filter out some results unexpectedly; disable it if you want unfiltered results.