Keywords
SERP Analysis
Get the top search results for any query with rich snippet data, paid ads, knowledge graphs, and 30+ result types.
POST
$0.01/call/v1/serpUsage
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
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
query | string | Yes | Search query to analyze | — |
location_code | number | No | Target country code. See Location Codes. | 2840 |
language | string | No | ISO language code | "en" |
depth | number | No | Number 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
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.query | string | The search query that was analyzed |
data.totalResults | number | Total number of search results found |
data.itemTypes | string[] | Distinct result types present in this SERP |
data.results | object[] | Array of SERP result items |
data.results[].position | number | Position in the search results |
data.results[].type | string | Result type — see Google SERP docs for the full list of 30+ types |
data.results[].title | string | Title of the search result |
data.results[].url | string | URL of the search result |
data.results[].description | string | Snippet or description shown in the SERP |
data.results[].domain | string | Domain of the result URL |
data.results[].data | object | null | Type-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.