Google SERP API with AI Overview
Who ranks on a Google results page, and what the AI Overview says and cites.
The Google SERP API reads a Google results page for a keyword and returns who ranks and what the AI Overview says and cites. Pass your own domain and the answer also says where it ranks and whether the AI Overview cites it, which is what a rank tracker or AI-visibility check needs.
/v1/serp
Request
import requestsr = requests.post( 'https://api.snoopscan.com/v1/serp', headers={'Authorization': 'Bearer sk_YOUR_KEY'}, json={ 'keyword': 'web scraping api', 'country': 'us', 'domain': 'example.com', 'depth': 10 },)print(r.json())
const r = await fetch('https://api.snoopscan.com/v1/serp', { method: 'POST', headers: { Authorization: 'Bearer sk_YOUR_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "keyword": "web scraping api", "country": "us", "domain": "example.com", "depth": 10 }),});console.log(await r.json());
curl -X POST https://api.snoopscan.com/v1/serp \ -H 'Authorization: Bearer sk_YOUR_KEY' \ -H 'Content-Type: application/json' \ -d '{ "keyword": "web scraping api", "country": "us", "domain": "example.com", "depth": 10}'
Parameters
| Field | Type | Default | What it does |
|---|---|---|---|
keyword
required |
string | — | The search to look up, as it would be typed into Google. |
aiOverview
|
boolean | true | Include Google's AI Overview and the pages it cites. On by default. |
country
|
string | us | Two-letter code of the country whose results you want, e.g. gb. |
depth
|
integer | 10 | How many results to read, 1 to 100. |
device
|
desktop · mobile | desktop | desktop or mobile. |
domain
|
string | — | Your site. When given, the answer says where it ranks and whether the AI Overview cites it. |
language
|
string | en | The language code of the results, e.g. en. |
locationCode
|
integer | — | Google's own geographic target ID, for somewhere finer than a country. Overrides country. |
Response
{ "success": true, "data": { "keyword": "web scraping api", "country": "us", "device": "desktop", "organic": [ { "position": 1, "rank": 1, "url": "https://example.com/web-scraping-api", "domain": "example.com", "title": "Web Scraping API", "description": "A page that ranks first." } ], "aiOverview": { "present": true, "text": "The text of the AI Overview.", "references": [ { "url": "https://example.com/web-scraping-api", "domain": "example.com", "title": "Web Scraping API", "source": "example.com" } ] }, "domain": { "domain": "example.com", "position": 1, "url": "https://example.com/web-scraping-api", "citedInAiOverview": true, "citations": [ { "url": "https://example.com/web-scraping-api" } ] } }}
organiclists the results in order, withposition,url,titleanddescription.aiOverview.presentsays whether Google showed an AI Overview. When it did,textholds it andreferenceslists the pages it cites.domainappears only when you sent one: yourposition(nullwhen you are not in the results) andcitedInAiOverview.
The AI Overview can be read only where the results source supports it. When it cannot be read, the answer is the organic list and a note saying so, and you are not charged for an Overview.
MCP tools
The same lookup is the googleSerp tool on the MCP server. It takes keyword, country, domain, depth (up to 30 there) and aiOverview, and answers in markdown.
Use SnoopScan to check where example.com ranks on Google for web scraping api in the US, and whether the AI Overview cites it.
Billing
A search is billed per call, and nothing is charged when no results come back. A search that reads an AI Overview costs more than one that does not. Every response carries a cost object, and Credits explains how to read it.
q, num, gl and lr become keyword, depth, country and language here.