SerpAPI icon

SerpAPI

Search Google using SerpAPI

Search

AI-generated

Summary

Run a Google search via SerpAPI and return the results.

Inputs

  • q (required) — Search query string. Supports Google search operators (e.g., inurl:, site:, intitle:) and SerpAPI‑specific parameters such as as_dt and as_eq.
  • tbm — Search type: Images (isch), Local (lcl), News (nws), Patents (pts), Regular Search (empty), Shopping (shop), Videos (vid).
  • location — Geographic origin of the search (city‑level recommended).
  • googleDomain — Google domain to query (e.g., google.com, google.co.uk). Defaults to google.com.
  • gl — Two‑letter country code (e.g., us, uk, fr).
  • hl — Two‑letter language code (e.g., en, es, fr).
  • device — Device used to render results: Desktop (default), Tablet, Mobile.
  • start — Result offset for pagination (0 = first page, 10 = second page, …). Defaults to 0.
  • noCache — Bypass SerpAPI cache and force a fresh request. Defaults to false.
  • output — Format of the returned data: JSON (default) or HTML.
  • advancedOptions — Collection of additional SerpAPI parameters (async, cr, engine, filter, ibp, jsonRestrictor, kgmid, lr, lsig, ludocid, nfpr, safe, si, tbs, uds, uule, zeroTrace). Each follows the SerpAPI API specification.

Output shape

If output=json (default): the parsed JSON object returned by the SerpAPI /search endpoint (contains search_metadata and the relevant results blocks). If output=html: the raw HTML string of the search results page.

The node sends a GET request to https://serpapi.com/search with the above parameters encoded in the query string. It requires the SerpAPI API credential.

Examples

Example 1: Simple web search

Set q to the desired search terms; leave other fields at defaults.

Example 2: Image search with country restriction

Set q, tbm=isch, gl=us, hl=en, and optionally add advancedOptions.cr=countryUS.

Links

Discussion