Keywords
Keyword Research
Get search volume, CPC, competition, and difficulty for up to 100 keywords per request.
POST
$0.11/call/v1/seo/keywordsUsage
const res = await fetch('https://api.yepapi.com/v1/seo/keywords', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ keywords: ['nextjs seo', 'vibe coding'], location_code: 2840 }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/seo/keywords \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keywords": ["nextjs seo", "vibe coding"], "location_code": 2840}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
keywords | string[] | Yes | Array of keywords to analyze (max 100) | — |
location_code | number | No | Target country code (e.g., 2840 for US). See Location Codes. | 2840 |
language | string | No | ISO language code (e.g., en, es) | "en" |
Info
We support 90+ countries via location_code. See the full list at Location Codes Reference. You can also pass a location string (e.g. "us") as a fallback.
Response
{
"ok": true,
"data": {
"keywords": [
{
"keyword": "nextjs seo",
"volume": 390,
"cpc": 0.0,
"difficulty": 0,
"competition": 0.01,
"competitionLevel": "LOW",
"intent": "unknown",
"avgBacklinks": 0.0,
"avgReferringDomains": 0.0,
"serpFeatures": [],
"totalResults": 0,
"trend": [
{ "month": "2026-03", "volume": 390 },
{ "month": "2026-02", "volume": 140 },
{ "month": "2026-01", "volume": 170 }
]
},
{
"keyword": "vibe coding",
"volume": 0,
"cpc": 0.0,
"difficulty": 0,
"competition": 0.0,
"competitionLevel": "unknown",
"intent": "unknown",
"avgBacklinks": 0.0,
"avgReferringDomains": 0.0,
"serpFeatures": [],
"totalResults": 0,
"trend": []
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.keywords | object[] | Array of keyword analysis results |
data.keywords[].keyword | string | The analyzed keyword |
data.keywords[].volume | number | Average monthly search volume |
data.keywords[].cpc | number | Cost per click in USD |
data.keywords[].difficulty | number | SEO difficulty score (0-100) |
data.keywords[].competition | number | PPC competition index (0-1) |
data.keywords[].competitionLevel | string | Competition category (LOW, MEDIUM, HIGH, or unknown) |
data.keywords[].intent | string | Search intent (informational, commercial, navigational, transactional, or unknown) |
data.keywords[].avgBacklinks | number | Average number of backlinks for top-ranking pages |
data.keywords[].avgReferringDomains | number | Average number of referring domains for top-ranking pages |
data.keywords[].serpFeatures | string[] | SERP features present for this keyword (e.g., images, video, peopleAlsoAsk) |
data.keywords[].totalResults | number | Total number of search results |
data.keywords[].trend | object[] | Monthly search volume trend data |
data.keywords[].trend[].month | string | Month in YYYY-MM format |
data.keywords[].trend[].volume | number | Search volume for that month |
Under the Hood
Under the hood, this queries our SEO data engine for keyword metrics. We normalize the response, map location/language codes automatically, and flatten nested result arrays.