YepAPI
SERP

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

POST/v1/serp/google
$0.01 per 10 results

Billed 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

ParameterTypeRequiredDescriptionDefault
querystringYesSearch query to look up on Google—
depthnumberNoNumber of results to return (max 100)10
location_codenumberNoCountry 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
languagestringNoISO language code (e.g., en, es)"en"
devicestringNodesktop or mobile. Mobile results differ from desktop — track both if you report both."desktop"
location_namestringNoA full location name instead of a code, e.g. "New York,New York,United States". Not combinable with location_code.—
coordinatesobjectNoSearch from a point: { "latitude": 40.7128, "longitude": -74.0060 }. Not combinable with location_code or location_name.—
stop_at_domainstringNoStop fetching further pages as soon as this domain (or a subdomain of it) appears, and bill only the pages fetched. See Rank tracking.—
timestringNoOnly results from the past hour, day, week, month or year (Google's "Any time" filter).—
sort_by_datebooleanNoNewest results first (Google's "Sorted by date"). Combine with time.false
search_paramstringNoOther 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), a location_name, or coordinates. Send only one.
  • Device: desktop (default) or mobile.
  • Stop at your domain: with stop_at_domain, the search stops at the page where the domain is found instead of always fetching the full depth. The response then includes pagesFetched, 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

FieldTypeDescription
okbooleanWhether the request succeeded
data.querystringThe search query that was executed
data.totalResultsnumberEstimated total number of Google results for the query
data.itemTypesstring[]Distinct result types present in this SERP (e.g. ["organic", "paid", "localPack"])
data.resultsobject[]Array of search result items
data.results[].positionnumberPosition in search results (1-indexed)
data.results[].typestringResult type — see Supported Result Types below
data.results[].titlestringTitle of the search result
data.results[].urlstringURL of the search result page
data.results[].descriptionstringSnippet or meta description shown in the SERP
data.results[].domainstringDomain 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[].dataobject | nullType-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.

TypeDescription
organicStandard organic search results
paidPaid search ads (Google Ads)
featuredSnippetFeatured snippet / answer box at position zero
peopleAlsoAsk"People also ask" expandable questions
relatedSearchesRelated search queries
peopleAlsoSearch"People also search for" suggestions
localPackLocal business results from Google Maps
knowledgeGraphKnowledge panel (entity info, Wikipedia, etc.)
videoVideo results (YouTube, etc.)
topStoriesTop stories / news carousel
imagesImage results pack
shoppingGoogle Shopping product results
twitterTwitter/X results carousel
answerBoxDirect answer box
eventsEvent listings
jobsJob listing results
recipesRecipe results with ratings
topSightsTourist attraction results
scholarlyArticlesAcademic paper results
popularProductsPopular product listings
hotelsPackHotel listings with prices
googleFlightsFlight results
googleReviewsGoogle review results
thirdPartyReviewsThird-party review aggregations
googlePostsGoogle business posts
carouselSingle carousel of results
multiCarouselMulti-row carousel
mentionCarouselMention/brand carousel
appApp install results
mapMap embed results

Type-Specific data Fields

Below are the key fields available in data for common result types. All field names use camelCase.

organic

FieldTypeDescription
breadcrumbstringURL breadcrumb trail shown in the SERP
websiteNamestringDisplay name of the website
isImagebooleanWhether an image thumbnail is shown
isVideobooleanWhether a video thumbnail is shown
isFeaturedSnippetbooleanWhether this result is also a featured snippet
isMaliciousbooleanWhether Google flagged this as potentially malicious
preSnippetstringText shown before the main description
extendedSnippetstringAdditional snippet text
highlightedstring[]Search terms highlighted in the snippet
linksobject[]Sitelinks — each with title, url, description
faqobject[]FAQ items — each with question, answer
ratingobjectStar rating — ratingType, value, votesCount, bestRating
priceobjectPrice info — current, currency, displayedPrice
timestampstringDate shown in the result
ampVersionbooleanWhether AMP version exists
aboutThisResultobject"About this result" panel data
relatedResultobject[]Related results shown inline
FieldTypeDescription
breadcrumbstringDisplay URL path
highlightedstring[]Highlighted terms in the ad
extraobjectExtended ad content
descriptionRowsstring[]Additional description lines
linksobject[]Ad sitelinks — title, url, description
faqobject[]FAQ extensions
ratingobjectSeller rating
priceobjectPrice extension data

featuredSnippet

FieldTypeDescription
featuredTitlestringTitle of the featured content
imagesobject[]Images shown in the snippet
tableobjectTable data if the snippet contains a table

peopleAlsoAsk

FieldTypeDescription
itemsobject[]Array of questions, each with title, expandedElement[]

localPack

FieldTypeDescription
ratingobjectBusiness rating — value, votesCount, ratingType
phonestringBusiness phone number
addressstringBusiness street address
cidstringGoogle Maps CID identifier
isMapsItembooleanWhether this links to Google Maps

knowledgeGraph

FieldTypeDescription
subTitlestringEntity subtitle / category
cardIdstringKnowledge Graph card identifier
itemsobject[]Key-value attribute items
imagesobject[]Associated images

shopping

FieldTypeDescription
itemsobject[]Product items with title, price, source, url, rating, deliveryInfo

video

FieldTypeDescription
itemsobject[]Video items with title, url, source, date, thumbnail
Under the Hood

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.

On this page