YepAPI
Competitors

Keyword Gap Analysis

Find keyword gaps and overlaps between two competing domains.

POST/v1/seo/competitors/keywords
from $0.02/call

Usage

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

ParameterTypeRequiredDescriptionDefault
domain1stringYesPrimary domain (without protocol)
domain2stringYesCompetitor domain (without protocol)
intersectionsbooleanNotrue = shared keywords, false = keywords only domain1 ranks fortrue
location_codenumberNoTarget country code. See Location Codes.2840
languagestringNoISO language code"en"
limitnumberNoMax keywords to return100
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

FieldTypeDescription
okbooleanWhether the request succeeded
data.domain1stringThe primary domain analyzed
data.domain2stringThe competitor domain analyzed
data.intersectionsbooleanWhether the results show shared keywords or gap keywords
data.keywordsarrayList of keywords with ranking data for both domains
data.keywords[].keywordstringThe keyword
data.keywords[].volumenumberMonthly search volume
data.keywords[].cpcnumberAverage cost per click (USD)
data.keywords[].competitionnumberCompetition level (0-1)
data.keywords[].difficultynumberKeyword difficulty score (0-100)
data.keywords[].intentstringSearch intent (informational, navigational, commercial, transactional)
data.keywords[].domain1objectRanking data for the primary domain
data.keywords[].domain1.positionnumberSERP position for domain1
data.keywords[].domain1.urlstringRanking URL for domain1
data.keywords[].domain1.etvnumberEstimated traffic value for domain1 (USD)
data.keywords[].domain2objectRanking data for the competitor domain
data.keywords[].domain2.positionnumberSERP position for domain2
data.keywords[].domain2.urlstringRanking URL for domain2
data.keywords[].domain2.etvnumberEstimated traffic value for domain2 (USD)

On this page