SerpApi Official icon

SerpApi Official

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

Overview

This node enables users to perform Google Local searches via the SerpApi service. It allows querying local business listings and points of interest based on a search term and location parameters. This is useful for applications such as market research, competitive analysis, local SEO monitoring, or finding nearby services and businesses.

For example, you can use this node to:

  • Search for coffee shops in a specific city.
  • Retrieve local business details like ratings, addresses, and reviews.
  • Monitor competitors’ presence in different geographic areas.
  • Aggregate local search results for display in an app or report.

Properties

Name Meaning
Search Query (q) The main search term or query string to find local results (e.g., "Coffee").
Location (location) The geographic location from which to originate the search. Can be a city name, address, or other supported location identifier.
Additional Fields A collection of optional advanced parameters:
- Encoded Location (uule) Google encoded location string; cannot be used together with location.
- Domain (google_domain) Google domain to use for the search (e.g., google.com, google.co.uk).
- Country (gl) Country code to use for the search (e.g., us, gb, fr).
- Language (hl) Language code for the search results (e.g., en, fr, es).
- Google Place ID (ludocid) Specific Google My Business listing ID to scrape.
- Advanced Search Parameters (tbs) Additional advanced search parameters not possible in the regular query field.
- Result Offset (start) Number of results to skip (for pagination).
- Device (device) Device type to simulate: desktop (default), tablet, or mobile.
- Disable Caching (no_cache) Whether to force fetching fresh results instead of cached ones. Cached results are free and expire after 1 hour.
- Async (async) Whether to perform the search asynchronously. If true, results must be retrieved later via a separate API call. Cannot be used with no_cache or on accounts with special speed enabled.
- ZeroTrace Mode (zero_trace) Enterprise-only mode to avoid storing search data on SerpApi servers, enhancing privacy but making debugging harder.
- Output (output) Format of the output: JSON (default) for structured data or HTML for raw HTML content.
- JSON Restrictor (json_restrictor) Restricts fields returned in the JSON response, e.g., limiting to certain result fields or number of items.

Output

The node outputs a JSON object containing the structured results of the Google Local search as returned by SerpApi. This includes detailed information about local businesses or places matching the query, such as names, addresses, ratings, reviews, phone numbers, and more depending on the query and parameters.

If the output format is set to HTML, the raw HTML content of the search results page is returned instead.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active SerpApi account and an API key credential configured in n8n.
  • The node makes HTTP requests to SerpApi's official endpoint (https://serpapi.com/search.json).
  • Proper configuration of the API key credential in n8n is necessary for authentication.

Troubleshooting

  • Invalid or missing API key: Ensure your SerpApi API key is correctly set up in n8n credentials.
  • Conflicting parameters: Do not use uule (encoded location) and location simultaneously; they are mutually exclusive.
  • Async and no_cache conflict: These two options cannot be enabled at the same time.
  • Rate limits or quota exceeded: SerpApi enforces usage limits; check your account status if requests fail.
  • Unsupported location or language codes: Use only supported values as per SerpApi documentation.
  • Empty or incomplete results: Verify that the search query and location parameters are valid and specific enough.
  • ZeroTrace mode enabled: Debugging may be difficult because no logs or metadata are stored.

Links and References

Discussion