Google SERP
Real-time Google search results — organic rankings, paid ads, featured snippets, People Also Ask, knowledge graphs, local packs, and 30+ rich result types.
Pricing, live playground and use cases: Google SERP API on YepAPI
/v1/serp/googleBilled per page of 10 results: depth 10 (default) = $0.01, depth 30 = $0.03. depth is capped at 100.
Usage
const res = await fetch('https://api.yepapi.com/v1/serp/google', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ query: 'best react frameworks 2026', depth: 10 }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/serp/google \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "best react frameworks 2026", "depth": 10}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
query | string | Yes | Search query to look up on Google | — |
depth | number | No | Number of results to return (max 100) | 10 |
location_code | number | No | Country code (e.g., 2840 for US) or a city/region code (e.g., 1023191 for New York) to fetch results as seen from that place. See Location Codes. | 2840 |
language | string | No | ISO language code (e.g., en, es) | "en" |
device | string | No | desktop or mobile. Mobile results differ from desktop — track both if you report both. | "desktop" |
location_name | string | No | A full location name instead of a code, e.g. "New York,New York,United States". Not combinable with location_code. | — |
coordinates | object | No | Search from a point: { "latitude": 40.7128, "longitude": -74.0060 }. Not combinable with location_code or location_name. | — |
stop_at_domain | string | No | Stop fetching further pages as soon as this domain (or a subdomain of it) appears, and bill only the pages fetched. See Rank tracking. | — |
time | string | No | Only results from the past hour, day, week, month or year (Google's "Any time" filter). | — |
sort_by_date | boolean | No | Newest results first (Google's "Sorted by date"). Combine with time. | false |
search_param | string | No | Other Google search URL parameters, e.g. "safe=active" or "tbs=qdr:d". q, num and start are set by the API; lr, cr and as_* aren't supported (use language, location_code, time and operators instead). | — |
Search operators and freshness
Google search operators work as-is in query: site:, inurl:, intitle:, filetype:, "exact phrase", -exclude, OR, before: / after:. The time filter is not an operator: it is a separate Google setting, so pass it as time.
Reddit posts about "seo blog" from the past 7 days, newest first:
{
"query": "site:reddit.com \"seo blog\"",
"time": "week",
"sort_by_date": true
}This is the same search as google.com/search?q=site:reddit.com+"seo blog"&tbs=qdr:w,sbd:1.
Rank tracking
Four parameters exist for tracking where a site ranks, and are specific to this endpoint — the other SERP engines reject them with a 400:
curl -X POST https://api.yepapi.com/v1/serp/google \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "stripe pricing",
"depth": 50,
"device": "mobile",
"location_code": 1023191,
"stop_at_domain": "stripe.com"
}'- Where: a city or region
location_code(how to find one), alocation_name, orcoordinates. Send only one. - Device:
desktop(default) ormobile. - Stop at your domain: with
stop_at_domain, the search stops at the page where the domain is found instead of always fetching the fulldepth. The response then includespagesFetched, and you are billed$0.01 × pagesFetched— never more than the requested depth would have cost. In the example above the domain is on page 1, so a depth-50 check costs $0.01 instead of $0.05. If the domain is not found, the full depth is fetched and billed.
Response
{
"ok": true,
"data": {
"query": "pizza near me",
"totalResults": 1470000000,
"itemTypes": [
"paid",
"localPack",
"organic",
"peopleAlsoAsk",
"relatedSearches"
],
"results": [
{
"position": 1,
"type": "paid",
"title": "Pizza Delivery - Order Online Now",
"url": "https://www.dominos.com/",
"description": "Get hot, fresh pizza delivered to your door. Order online for exclusive deals.",
"domain": "www.dominos.com",
"data": {
"breadcrumb": "https://www.dominos.com",
"highlighted": ["Pizza Delivery", "Order Online"],
"extra": {
"type": "organic",
"links": [
{
"title": "Order Pizza Online",
"url": "https://www.dominos.com/pages/order/"
}
]
},
"descriptionRows": ["Free delivery on orders over $20"]
}
},
{
"position": 2,
"type": "localPack",
"title": "Joe's Pizza",
"url": "",
"description": "",
"domain": "",
"data": {
"rating": {
"ratingType": "Max5",
"value": 4.7,
"votesCount": 2341
},
"phone": "+1-212-555-0199",
"address": "7 Carmine St, New York, NY 10014",
"cid": "12345678901234567890",
"isMapsItem": true
}
},
{
"position": 5,
"type": "organic",
"title": "Best Pizza Near Me - Find Local Pizza Restaurants",
"url": "https://www.yelp.com/search?find_desc=pizza",
"description": "Find the best pizza near you with Yelp's comprehensive directory of local pizza restaurants, reviews, and ratings.",
"domain": "www.yelp.com",
"data": {
"breadcrumb": "www.yelp.com > search",
"websiteName": "Yelp",
"isFeaturedSnippet": false,
"isImage": false,
"isVideo": false,
"highlighted": ["pizza", "near"],
"links": [
{
"type": "link_element",
"title": "Pizza Delivery",
"url": "https://www.yelp.com/search?find_desc=pizza+delivery"
}
],
"rating": {
"ratingType": "Max5",
"value": 4.2,
"votesCount": 890
}
}
},
{
"position": 8,
"type": "peopleAlsoAsk",
"title": "People also ask",
"url": "",
"description": "",
"domain": "",
"data": {
"items": [
{
"type": "peopleAlsoAskElement",
"title": "What is the best pizza chain?",
"expandedElement": [
{
"type": "peopleAlsoAskExpandedElement",
"title": "Best Pizza Chains Ranked",
"url": "https://www.example.com/best-pizza-chains",
"domain": "www.example.com",
"description": "According to a nationwide survey..."
}
]
}
]
}
},
{
"position": 11,
"type": "relatedSearches",
"title": "",
"url": "",
"description": "",
"domain": "",
"data": {
"items": [
"best pizza delivery near me",
"pizza places open now",
"cheap pizza near me"
]
}
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.query | string | The search query that was executed |
data.totalResults | number | Estimated total number of Google results for the query |
data.itemTypes | string[] | Distinct result types present in this SERP (e.g. ["organic", "paid", "localPack"]) |
data.results | object[] | Array of search result items |
data.results[].position | number | Position in search results (1-indexed) |
data.results[].type | string | Result type — see Supported Result Types below |
data.results[].title | string | Title of the search result |
data.results[].url | string | URL of the search result page |
data.results[].description | string | Snippet or meta description shown in the SERP |
data.results[].domain | string | Domain of the result. Google now serves some result links as google.com/goto?url=… redirects; for those, url is the Google redirect link (it opens the page in a browser) and domain is the real site, taken from the result's breadcrumb. In rare cases (forum results with no site shown) domain stays google.com. |
data.results[].data | object | null | Type-specific extra fields (see below for per-type details) |
Supported Result Types
Every Google SERP can contain a mix of the following result types. Each type includes type-specific fields in the data object.
| Type | Description |
|---|---|
organic | Standard organic search results |
paid | Paid search ads (Google Ads) |
featuredSnippet | Featured snippet / answer box at position zero |
peopleAlsoAsk | "People also ask" expandable questions |
relatedSearches | Related search queries |
peopleAlsoSearch | "People also search for" suggestions |
localPack | Local business results from Google Maps |
knowledgeGraph | Knowledge panel (entity info, Wikipedia, etc.) |
video | Video results (YouTube, etc.) |
topStories | Top stories / news carousel |
images | Image results pack |
shopping | Google Shopping product results |
twitter | Twitter/X results carousel |
answerBox | Direct answer box |
events | Event listings |
jobs | Job listing results |
recipes | Recipe results with ratings |
topSights | Tourist attraction results |
scholarlyArticles | Academic paper results |
popularProducts | Popular product listings |
hotelsPack | Hotel listings with prices |
googleFlights | Flight results |
googleReviews | Google review results |
thirdPartyReviews | Third-party review aggregations |
googlePosts | Google business posts |
carousel | Single carousel of results |
multiCarousel | Multi-row carousel |
mentionCarousel | Mention/brand carousel |
app | App install results |
map | Map embed results |
Type-Specific data Fields
Below are the key fields available in data for common result types. All field names use camelCase.
organic
| Field | Type | Description |
|---|---|---|
breadcrumb | string | URL breadcrumb trail shown in the SERP |
websiteName | string | Display name of the website |
isImage | boolean | Whether an image thumbnail is shown |
isVideo | boolean | Whether a video thumbnail is shown |
isFeaturedSnippet | boolean | Whether this result is also a featured snippet |
isMalicious | boolean | Whether Google flagged this as potentially malicious |
preSnippet | string | Text shown before the main description |
extendedSnippet | string | Additional snippet text |
highlighted | string[] | Search terms highlighted in the snippet |
links | object[] | Sitelinks — each with title, url, description |
faq | object[] | FAQ items — each with question, answer |
rating | object | Star rating — ratingType, value, votesCount, bestRating |
price | object | Price info — current, currency, displayedPrice |
timestamp | string | Date shown in the result |
ampVersion | boolean | Whether AMP version exists |
aboutThisResult | object | "About this result" panel data |
relatedResult | object[] | Related results shown inline |
paid
| Field | Type | Description |
|---|---|---|
breadcrumb | string | Display URL path |
highlighted | string[] | Highlighted terms in the ad |
extra | object | Extended ad content |
descriptionRows | string[] | Additional description lines |
links | object[] | Ad sitelinks — title, url, description |
faq | object[] | FAQ extensions |
rating | object | Seller rating |
price | object | Price extension data |
featuredSnippet
| Field | Type | Description |
|---|---|---|
featuredTitle | string | Title of the featured content |
images | object[] | Images shown in the snippet |
table | object | Table data if the snippet contains a table |
peopleAlsoAsk
| Field | Type | Description |
|---|---|---|
items | object[] | Array of questions, each with title, expandedElement[] |
localPack
| Field | Type | Description |
|---|---|---|
rating | object | Business rating — value, votesCount, ratingType |
phone | string | Business phone number |
address | string | Business street address |
cid | string | Google Maps CID identifier |
isMapsItem | boolean | Whether this links to Google Maps |
knowledgeGraph
| Field | Type | Description |
|---|---|---|
subTitle | string | Entity subtitle / category |
cardId | string | Knowledge Graph card identifier |
items | object[] | Key-value attribute items |
images | object[] | Associated images |
shopping
| Field | Type | Description |
|---|---|---|
items | object[] | Product items with title, price, source, url, rating, deliveryInfo |
video
| Field | Type | Description |
|---|---|---|
items | object[] | Video items with title, url, source, date, thumbnail |
Under the hood, this queries our advanced SERP engine. We normalize the response format, convert all field names to camelCase, and pass through all type-specific data in the data field. The exact fields available in data depend on what Google returns for a given query and result type.