SerpApi Official icon

SerpApi Official

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

Overview

This node enables users to perform live Google Maps searches through SerpApi's official API. It allows querying places, locations, and map-related data by specifying search terms, geographic coordinates, and other parameters. This node is useful for applications that require up-to-date location-based information such as finding nearby businesses, landmarks, or points of interest.

Practical examples include:

  • Searching for coffee shops near a specific GPS coordinate.
  • Retrieving detailed place information by place ID.
  • Filtering search results by language or country.
  • Customizing the output format between JSON and raw HTML.

Properties

Name Meaning
Search Query (q) The query string defining what you want to search for on Google Maps (e.g., "coffee").
Type of search (type) The type of search to perform: either "Search" for general queries or "Place" for specific place lookups.
GPS Coordinates (ll) The latitude and longitude coordinates from which the search should originate, influencing local results.
Domain (google_domain) The Google domain to use for the search, e.g., google.com, google.co.uk, google.fr, etc. This affects regional search behavior.
Language (hl) The language code to use for the search results, such as "en" for English, "fr" for French, or many others.
Country (gl) The country code to use for the search, affecting regional search results, e.g., "us" for United States, "fr" for France.
Data (data) Advanced parameter to filter search results with custom data options as per SerpApi documentation.
Place ID (place_id) Unique identifier for a specific place on Google Maps, used to retrieve detailed information about that place.
Result Offset (start) Number of results to skip; useful for pagination.
Disable Caching (no_cache) Boolean flag to force fetching fresh results instead of using cached ones. Cached results are free and expire after 1 hour. Cannot be used together with async.
Async (async) Boolean flag to perform the search asynchronously. When true, the search is submitted and results must be retrieved later via a separate API call. Cannot be used with no_cache or on accounts with Ludicrous Speed enabled.
ZeroTrace Mode (zero_trace) Enterprise-only boolean flag to disable storing search parameters and metadata on SerpApi servers for privacy.
Output (output) Defines the output format: "json" for structured JSON (default) or "html" for raw HTML response.
JSON Restrictor (json_restrictor) Allows restricting the JSON response fields to specific parts, e.g., limiting organic results to certain fields.

Output

The node outputs a JSON object containing the search results returned by SerpApi's Google Maps API. The structure includes various details about places, such as names, addresses, ratings, reviews, coordinates, and more depending on the query and parameters used.

If the output format is set to "html", the node returns the raw HTML content retrieved from the search instead of structured JSON.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active SerpApi account with a valid API key credential configured in n8n.
  • Internet access to reach SerpApi's endpoint at https://serpapi.com/search.json.
  • Proper configuration of the API key credential in n8n to authenticate requests.

Troubleshooting

  • Common issues:

    • Invalid or missing API key will cause authentication errors.
    • Using incompatible combinations of parameters, such as setting both no_cache and async to true, will result in errors.
    • Incorrect GPS coordinate format in ll may lead to unexpected or empty results.
    • Exceeding SerpApi usage limits can cause request failures.
  • Error messages:

    • Authentication errors typically indicate invalid or missing API credentials.
    • Parameter validation errors occur if required fields like type or q are missing or malformed.
    • Rate limit exceeded errors suggest the user has hit their monthly or daily quota.
  • Resolutions:

    • Verify and configure the API key credential correctly.
    • Ensure parameters comply with SerpApi's documented requirements.
    • Avoid using mutually exclusive parameters together.
    • Monitor usage and upgrade plan if necessary.

Links and References

Discussion