Google Search connector

SERP API for Rank Tracking and Competitor SERP Intelligence

The SurfSense SERP API scrapes Google Search results as structured JSON: organic rankings, paid ads, AI Overviews, and People Also Ask. Point your AI agents at the queries that matter to your market and know the moment a rank moves, an ad appears, or an AI answer starts citing a competitor.

agent · surfsense

$

google_search.scrape({ queries: ["competitor pricing"], country_code: "us",
  max_pages_per_query: 2 })
  • competitor.com — #3 organic, up from #7google.com/search · desktop · US+4 spots
  • AI Overview cites competitor.com and 2 othersAI Overview · 3 sourcesGEO risk
  • rival.com is running a paid ad at position 1paid result · sitelinks · USnew ad

20 organic · 3 ads · 1 AI Overview · surfaced in 2.4s

What you can extract from Google Search

Give the API a list of search terms or full Google URLs and a country. It returns one structured item per SERP page, with every block Google renders parsed into its own array.

Organic results

Title, URL, displayed URL, description, date, and rank position for every listing.

Paid ads

Sponsored results and shopping ads with title, URL, sitelinks, prices, and ad position.

AI Overviews

The AI Overview answer text and the exact pages Google cites, for GEO and AI-visibility tracking.

People Also Ask

The related questions and answers Google expands beneath the results.

Related searches

Suggested and related queries, to map how your market actually phrases its search.

SERP metadata

Total result count, device, page number, and the country and language of each result.

What teams do with the SERP API

Rank tracking at agent speed

Track your rankings and your competitors' across the queries and countries you care about. Feed the positions to an agent that diffs each run and pings you the moment something moves.

Competitor ad monitoring

See who is bidding on your keywords, what their ad copy and sitelinks say, and where they sit on the page. Watch a rival's paid strategy without a single manual search.

AI Overview and GEO monitoring

Capture whether an AI Overview appears for a query and exactly which sources it cites. It is the cleanest way to measure your visibility in AI search, a signal almost nobody is tracking yet.

SERP and keyword research

Pull People Also Ask and related queries at scale to see the questions and phrasings behind a topic, then brief an agent to turn them into a content plan.

Call it from your code or your agent

One typed endpoint, one API key. Or add the SurfSense MCP server and let your agent call google_search.scrape as a native tool.

curl -X POST "$SURFSENSE_API_URL/workspaces/$WORKSPACE_ID/scrapers/google_search/scrape" \
  -H "Authorization: Bearer $SURFSENSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "queries": [
      "competitor pricing"
    ],
    "country_code": "us",
    "max_pages_per_query": 2
  }'

Google Search API request and response schema

The exact contract behind POST /workspaces/{workspace_id}/scrapers/google_search/scrape. The same fields power the google_search.scrape MCP tool.

Request parameters

Only queries is required. Up to 20 queries per call.

Request parameters
FieldTypeDescription
queriesstring[]requiredSearch terms (e.g. 'wedding photographers denver') or full Google Search URLs. Each term is searched; each URL is scraped as-is. 1 to 20.
max_pages_per_queryinteger
default 1
Result pages to fetch per query, 1 to 10. 1 fetches the first page only.
country_codestringTwo-letter country to search from, e.g. 'us', 'fr'.
language_codestring
default ""
Result language code, e.g. 'en', 'fr'. Blank uses Google's default.
sitestringRestrict results to a single domain, e.g. 'example.com'.

Response fields

The response is { items: [...] } with one item per fetched SERP page. One fetched page is one billable unit.

Response fields
FieldTypeDescription
searchQueryobjectProvenance for this page: the term or URL searched, page number, device, country, and language.
resultsTotalintegerGoogle's estimated total result count for the query.
organicResultsobject[]The organic listings: title, url, displayedUrl, description, date, emphasizedKeywords, siteLinks, and position.
paidResults / paidProductsobject[]Ads and shopping placements on the page, with titles, URLs, and prices.
relatedQueriesobject[]The 'related searches' block: title and search URL for each suggestion.
peopleAlsoAskobject[]People Also Ask entries with the question, answer text, and source page URL.
aiOverviewobjectThe AI Overview block when Google shows one: full answer content plus the sources it cites.

A SERP API alternative built for agents

Most SERP APIs bill per search, gate AI Overviews behind add-ons, and leave the rank-tracking logic to you. Here is how SurfSense compares.

FeatureTypical SERP APISurfSense
PricingPer-search pricing that climbs fast at scalePay per SERP page returned, with a free tier to start
AI OverviewsOften a paid add-on, or not supported at allParsed inline with the answer text and the sources it cites
Rank trackingYou build the diffing and alerting yourselfStructured positions your agent can diff and alert on
SetupA new vendor account and key managementOne API key, or add the MCP server to your agent
Agent-readyNo; you wire the harness yourselfMCP server exposes google_search.scrape as a native tool

SERP API: frequently asked questions

Point your agents at Google Search

The Google Search connector is one of many in the SurfSense competitive intelligence platform. Start free, no credit card required.

SurfSense