SerpApi Official icon

SerpApi Official

Get live Google Search data and more from SerpApi's official node

Overview

This node integrates with SerpApi's official service to perform live Google AI Mode searches. It allows users to send search queries to Google's AI-powered search engine and retrieve structured results in real-time. This is particularly useful for automating data retrieval from Google AI Mode without manual browsing, enabling workflows such as content research, market analysis, or AI-driven information gathering.

Practical examples include:

  • Automatically querying Google AI Mode for answers to specific questions.
  • Gathering AI-generated summaries or insights on a topic.
  • Integrating AI search results into reports or dashboards.

Properties

Name Meaning
Search Query (q) The main query string you want to search using Google AI Mode. You can input any question or keyword phrase supported by the AI search.
Additional Fields A collection of optional parameters to customize the search behavior:
- Location (location) Defines the geographic location from which the search should originate. Must be a supported location code as per SerpApi documentation.
- Encoded Location (uule) Google encoded location parameter. Cannot be used together with location.
- Device (device) Specifies the device type for the search results: desktop (default), tablet, or mobile.
- Disable Caching (no_cache) Boolean flag to force fetching fresh results instead of cached ones. Defaults to false. When true, disables cache usage. Cannot be used together with async.
- Async (async) Boolean flag to perform the search asynchronously. Defaults to false. When true, the search is submitted and results must be retrieved later via Search Archive API. Cannot be used with no_cache. Not recommended with Ludicrous Speed accounts.
- ZeroTrace Mode (zero_trace) Enterprise-only boolean flag to disable storing search parameters and metadata on SerpApi servers for privacy. Defaults to false.
- Output (output) Defines the format of the final output: json (default) for structured JSON results, or html for raw HTML content.
- JSON Restrictor (json_restrictor) Allows restricting the response fields to specific parts of the JSON result, e.g., limiting organic results to certain fields.

Output

The node outputs a JSON object containing the search results returned by SerpApi for the Google AI Mode query. The structure depends on the chosen output format:

  • If output is set to json (default), the output contains a structured JSON representation of the search results, including AI-generated answers, snippets, and related metadata.
  • If output is set to html, the output contains the raw HTML content retrieved from the search.

No binary data output is produced by this node.

Dependencies

  • Requires an active SerpApi account with a valid API key credential configured in n8n.
  • Internet access to call SerpApi endpoints.
  • Optional: For asynchronous searches (async=true), additional handling to retrieve results later via SerpApi's Search Archive API may be necessary outside this node.

Troubleshooting

  • Common issues:

    • Using both location and uule parameters simultaneously will cause errors; only one should be set.
    • Setting both no_cache and async to true is invalid and will result in request failure.
    • Asynchronous mode (async=true) requires additional steps to fetch results later; forgetting this may lead to empty or incomplete outputs.
    • Exceeding API quota or missing/invalid API key will cause authentication errors.
  • Error messages:

    • "Invalid parameter combination" — Check that mutually exclusive parameters like location and uule or no_cache and async are not used together.
    • "Authentication failed" — Verify your API key credential is correctly set up.
    • "Quota exceeded" — Review your SerpApi plan limits and usage.

Links and References

Discussion