YepAPI
Keywords

SERP Analysis

Get the top search results for any query with rich snippet data, paid ads, knowledge graphs, and 30+ result types.

POST/v1/serp
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/serp', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ query: 'best react frameworks 2026', location_code: 2840 }),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/serp \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "best react frameworks 2026", "location_code": 2840}'

Request Body

ParameterTypeRequiredDescriptionDefault
querystringYesSearch query to analyze
location_codenumberNoTarget country code. See Location Codes.2840
languagestringNoISO language code"en"
depthnumberNoNumber of results (10, 20, 50, 100)10

Response

{
  "ok": true,
  "data": {
    "query": "nextjs seo",
    "totalResults": 3230000,
    "itemTypes": ["aiOverview", "organic", "peopleAlsoAsk", "relatedSearches"],
    "results": [
      {
        "position": 1,
        "type": "aiOverview",
        "title": "",
        "url": "",
        "description": "",
        "domain": "",
        "data": {
          "items": [
            {
              "type": "aiOverviewElement",
              "title": "Next.js SEO Best Practices",
              "url": "https://nextjs.org/learn/seo",
              "domain": "nextjs.org"
            }
          ]
        }
      },
      {
        "position": 2,
        "type": "organic",
        "title": "SEO",
        "url": "https://nextjs.org/learn/seo",
        "description": "SEO stands for Search Engine Optimization. The goal of SEO is to create a strategy that will increase your rankings position in search engine results.",
        "domain": "nextjs.org",
        "data": {
          "breadcrumb": "nextjs.org > learn > seo",
          "websiteName": "Next.js",
          "isFeaturedSnippet": false,
          "highlighted": ["SEO"]
        }
      },
      {
        "position": 3,
        "type": "organic",
        "title": "Next.js SEO Complete Checklist : r/nextjs",
        "url": "https://www.reddit.com/r/nextjs/comments/195ikpf/nextjs_seo_complete_checklist/",
        "description": "I wrote this tutorial to show you guys all the necessary things that should be added to your Next.js app to help search engines understand your site better.",
        "domain": "www.reddit.com",
        "data": {
          "breadcrumb": "www.reddit.com > r > nextjs",
          "websiteName": "Reddit",
          "isFeaturedSnippet": false,
          "highlighted": ["Next.js", "SEO"]
        }
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.querystringThe search query that was analyzed
data.totalResultsnumberTotal number of search results found
data.itemTypesstring[]Distinct result types present in this SERP
data.resultsobject[]Array of SERP result items
data.results[].positionnumberPosition in the search results
data.results[].typestringResult type — see Google SERP docs for the full list of 30+ types
data.results[].titlestringTitle of the search result
data.results[].urlstringURL of the search result
data.results[].descriptionstringSnippet or description shown in the SERP
data.results[].domainstringDomain of the result URL
data.results[].dataobject | nullType-specific extra fields (ratings, sitelinks, breadcrumbs, FAQs, etc.) — see type-specific fields
Info

This is a legacy alias for POST /v1/serp/google. Both endpoints return the same response. See the Google SERP docs for detailed per-type field documentation.

On this page