Competitors
Keyword Gap Analysis
Find keyword gaps and overlaps between two competing domains.
POST
from $0.02/call/v1/seo/competitors/keywordsUsage
const res = await fetch('https://api.yepapi.com/v1/seo/competitors/keywords', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
domain1: 'stripe.com',
domain2: 'square.com',
intersections: true,
location_code: 2840,
language: 'en',
limit: 100,
}),
});
const { data } = await res.json();
console.log(data.keywords);curl -X POST https://api.yepapi.com/v1/seo/competitors/keywords \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain1": "stripe.com", "domain2": "square.com", "intersections": true, "location_code": 2840, "limit": 100}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
domain1 | string | Yes | Primary domain (without protocol) | — |
domain2 | string | Yes | Competitor domain (without protocol) | — |
intersections | boolean | No | true = shared keywords, false = keywords only domain1 ranks for | true |
location_code | number | No | Target country code. See Location Codes. | 2840 |
language | string | No | ISO language code | "en" |
limit | number | No | Max keywords to return | 100 |
Info
Set intersections: false for keyword gap mode — returns keywords that domain1 ranks for but domain2 doesn't. This is how you find opportunities your competitors are missing.
Response
{
"ok": true,
"data": {
"domain1": "stripe.com",
"domain2": "square.com",
"intersections": true,
"keywords": [
{
"keyword": "payment processing",
"volume": 33100,
"cpc": 15.2,
"competition": 0.85,
"difficulty": 72,
"intent": "commercial",
"domain1": {
"position": 3,
"url": "https://stripe.com/payments",
"etv": 4500.0
},
"domain2": {
"position": 7,
"url": "https://square.com/payments",
"etv": 1200.0
}
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.domain1 | string | The primary domain analyzed |
data.domain2 | string | The competitor domain analyzed |
data.intersections | boolean | Whether the results show shared keywords or gap keywords |
data.keywords | array | List of keywords with ranking data for both domains |
data.keywords[].keyword | string | The keyword |
data.keywords[].volume | number | Monthly search volume |
data.keywords[].cpc | number | Average cost per click (USD) |
data.keywords[].competition | number | Competition level (0-1) |
data.keywords[].difficulty | number | Keyword difficulty score (0-100) |
data.keywords[].intent | string | Search intent (informational, navigational, commercial, transactional) |
data.keywords[].domain1 | object | Ranking data for the primary domain |
data.keywords[].domain1.position | number | SERP position for domain1 |
data.keywords[].domain1.url | string | Ranking URL for domain1 |
data.keywords[].domain1.etv | number | Estimated traffic value for domain1 (USD) |
data.keywords[].domain2 | object | Ranking data for the competitor domain |
data.keywords[].domain2.position | number | SERP position for domain2 |
data.keywords[].domain2.url | string | Ranking URL for domain2 |
data.keywords[].domain2.etv | number | Estimated traffic value for domain2 (USD) |