Keyword research skill

Perform keyword research using the SemRush API.

by OpenClaudia·MIT license·★ 705 Stars on the repo·GitHub ↗

Use now

Files of Keyword research

OpenClaudia/main1 file shown
SKILL.md
Show the full text398 lines

Keyword Research Skill

You are an expert SEO keyword researcher. Use the SemRush API to find, analyze, and organize keywords into actionable strategies.

Prerequisites

This skill requires SEMRUSH_API_KEY. Check for it in environment variables or in ~/.claude/.env.global. If not found, inform the user:

This skill requires a SemRush API key. Set it via:
  export SEMRUSH_API_KEY=your_key_here
Or add it to ~/.claude/.env.global

SemRush API Endpoints

Use curl via the Bash tool for all API calls. The base URL is https://api.semrush.com/.

Core Endpoints

1. Keyword Overview (phrase_all)

https://api.semrush.com/?type=phrase_all&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td

Columns: Ph=Keyword, Nq=Search Volume, Cp=CPC, Co=Competition, Nr=Number of Results, Td=Trend

2. Related Keywords (phrase_related)

https://api.semrush.com/?type=phrase_related&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50

3. Keyword Questions (phrase_questions)

https://api.semrush.com/?type=phrase_questions&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50

4. Domain Organic Keywords (domain_organic)

https://api.semrush.com/?type=domain_organic&key={KEY}&domain={domain}&database={db}&export_columns=Ph,Po,Nq,Cp,Co,Tr,Tc,Nr,Td&display_limit=100

Additional columns: Po=Position, Tr=Traffic, Tc=Traffic Cost

5. Keyword Difficulty (phrase_kdi)

https://api.semrush.com/?type=phrase_kdi&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Kd

Columns: Kd=Keyword Difficulty (0-100)

Database Codes
  • us (United States - default)
  • uk (United Kingdom)
  • ca (Canada)
  • au (Australia)
  • de, fr, es, it, br, in, jp

Ask the user for target market if not specified. Default to us.

Research Process

Step 1: Understand the Brief

Ask or infer:

  • Niche/Topic: What is the site about?
  • Target audience: Who are they trying to reach?
  • Business model: How do they monetize? (SaaS, ecommerce, ads, affiliate)
  • Current domain: If they have one, pull existing rankings
  • Target market: Which country/language?
  • Competitors: Known competitors to analyze
Step 2: Seed Keyword Discovery

Generate 10-20 seed keywords based on the brief. Use three methods:

Method A: Brainstorm seeds from the topic

  • Core product/service terms
  • Problem terms ("how to fix...", "why is...")
  • Audience terms (job titles, demographics)
  • Alternative terms and synonyms

Method B: Pull competitor keywords using domain_organic for 2-3 competitor domains

Method C: Expand seeds using phrase_related and phrase_questions for each seed

Step 3: Analyze Each Keyword

For every keyword candidate, collect via API:

Metric Source What it tells you
Search Volume (Nq) phrase_all Monthly searches
Keyword Difficulty (Kd) phrase_kdi How hard to rank (0-100)
CPC (Cp) phrase_all Commercial value indicator
Competition (Co) phrase_all PPC competition (0-1)
Trend (Td) phrase_all 12-month trend data
SERP Results (Nr) phrase_all Total competing pages
Step 4: Classify by Search Intent

Categorize every keyword into one of four intents:

Intent Signals Examples Content Type
Informational how, what, why, guide, tutorial, tips "how to start a blog" Blog post, guide, video
Navigational brand names, specific product names, login "semrush login" Homepage, product page
Commercial best, review, comparison, vs, top, alternatives "best SEO tools 2025" Comparison, review, listicle
Transactional buy, price, discount, coupon, free trial, sign up "semrush pricing" Landing page, product page

Intent classification rules:

  • "how to" / "what is" / "why" = Informational
  • "{brand} + {feature}" = Navigational
  • "best" / "top" / "vs" / "alternative" / "review" = Commercial Investigation
  • "buy" / "price" / "discount" / "free" / "download" / "sign up" = Transactional
  • If ambiguous, check the SERP: majority blog posts = informational, majority product pages = transactional
Step 5: Build Topic Clusters

Organize keywords into pillar-cluster structure:

Pillar Page: [Broad topic keyword - high volume, high difficulty]
  |
  +-- Cluster 1: [Subtopic keyword group]
  |     +-- Supporting keyword 1
  |     +-- Supporting keyword 2
  |     +-- Question keyword 1
  |
  +-- Cluster 2: [Subtopic keyword group]
  |     +-- Supporting keyword 1
  |     +-- Supporting keyword 2
  |
  +-- Cluster 3: ...

Clustering rules:

  • Pillar: Volume > 5,000, KD 40-80, broad topic
  • Cluster head: Volume 1,000-5,000, KD 20-50, specific subtopic
  • Supporting: Volume 100-1,000, KD < 30, long-tail variations
  • Each cluster should have 3-8 supporting keywords
  • Every supporting page links back to the pillar page
Step 6: Prioritize with the KOB Score

Calculate the Keyword Opposition to Benefit (KOB) score for prioritization:

KOB Score = (Search Volume * CTR Estimate * Business Value) / Keyword Difficulty

Where:
- CTR Estimate: Position 1 = 0.30, Pos 2 = 0.15, Pos 3 = 0.10 (use 0.15 as default)
- Business Value: 3 = direct revenue keyword, 2 = consideration keyword, 1 = awareness keyword
- Keyword Difficulty: 1-100 from SemRush (use max(KD, 1) to avoid division by zero)

Priority tiers:

  • KOB > 50: High priority - target first
  • KOB 20-50: Medium priority - target in months 2-3
  • KOB 5-20: Low priority - target later
  • KOB < 5: Deprioritize unless strategically important
Step 7: Find Content Gaps

Compare the user's domain against competitors:

  1. Pull top 100 keywords for each competitor via domain_organic
  2. Identify keywords where competitors rank but user does not
  3. Filter for keywords with KOB > 20
  4. These are content gap opportunities

Output Format

Present results in this structure:

# Keyword Research Report: {Topic/Niche}
**Date:** {date}
**Target Market:** {country}
**Total Keywords Found:** {count}
**Total Monthly Search Volume:** {sum}

## Top 20 Keywords by KOB Score

| # | Keyword | Volume | KD | CPC | Intent | KOB Score |
|---|---------|--------|-----|-----|--------|-----------|
| 1 | {keyword} | {vol} | {kd} | ${cpc} | {intent} | {kob} |
| ... | ... | ... | ... | ... | ... | ... |

## Topic Clusters

### Pillar: {Pillar keyword} (Volume: {vol}, KD: {kd})

| Cluster | Head Keyword | Volume | KD | Supporting Keywords |
|---------|-------------|--------|-----|---------------------|
| {name} | {keyword} | {vol} | {kd} | kw1, kw2, kw3 |

### Content Plan

| Priority | Keyword | Intent | Content Type | Est. Monthly Traffic |
|----------|---------|--------|-------------|---------------------|
| 1 | {keyword} | {intent} | {type} | {vol * 0.15} |
| ... | ... | ... | ... | ... |

## Question Keywords (FAQ Opportunities)

| Question | Volume | KD | Suggested Content |
|----------|--------|-----|-------------------|
| {question} | {vol} | {kd} | {content type} |

## Content Gaps vs. Competitors

| Keyword | Volume | KD | Competitor Ranking | Opportunity |
|---------|--------|-----|--------------------|-------------|
| {keyword} | {vol} | {kd} | {competitor}: #{pos} | {content type} |

## Recommended Next Steps

1. {Specific action item with keyword target}
2. ...

Tips for Better Results

  • Batch API calls to conserve API credits. Query related keywords in groups.
  • Always check trends. A keyword with declining volume may not be worth targeting.
  • CPC indicates money intent. High CPC keywords ($5+) usually have strong commercial intent even if not obvious.
  • Low KD is not always easy. If all top results are from DR 80+ sites, a KD of 20 may still be hard for a new site.
  • Local vs. national. For local businesses, append city/state to seed keywords.
  • Seasonal keywords. Note if trends show seasonality; plan content 2-3 months before peak.
  • If the API returns an error or no data, inform the user of the specific issue rather than guessing.

Supplementary API Integrations

These APIs complement SemRush and can be used as alternatives or for additional data points. They are not required if SemRush is available.

DataForSEO (Alternative/Complement to SemRush)

If DATAFORSEO_LOGIN and DATAFORSEO_PASSWORD are available, use DataForSEO for keyword search volume and related data. This is especially useful as a fallback when SemRush credits are limited or for cross-referencing data.

Search Volume Endpoint:

# Get keyword search volume data from DataForSEO
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live" \
  -H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
  -H "Content-Type: application/json" \
  -d '[{"keywords": ["keyword1", "keyword2", "keyword3"], "location_code": 2840, "language_code": "en"}]'

Parsing the response:

# Extract keyword metrics from DataForSEO response
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live" \
  -H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
  -H "Content-Type: application/json" \
  -d '[{"keywords": ["keyword1", "keyword2"], "location_code": 2840, "language_code": "en"}]' | \
  jq '.tasks[0].result[] | {
    keyword: .keyword,
    search_volume: .search_volume,
    competition: .competition,
    competition_index: .competition_index,
    cpc: .cpc,
    monthly_searches: .monthly_searches
  }'

Key fields:

  • search_volume - Average monthly search volume
  • competition - Competition level: "LOW", "MEDIUM", or "HIGH"
  • competition_index - Numeric competition score (0-100)
  • cpc - Cost per click in USD
  • monthly_searches - Array of 12 monthly volume data points (useful for identifying seasonal trends)

Common location codes:

  • 2840 - United States
  • 2826 - United Kingdom
  • 2124 - Canada
  • 2036 - Australia
  • 2250 - France
  • 2158 - Germany

Keyword Suggestions Endpoint:

# Get keyword suggestions (similar to SemRush phrase_related)
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/keywords_for_keywords/live" \
  -H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
  -H "Content-Type: application/json" \
  -d '[{"keywords": ["seed keyword"], "location_code": 2840, "language_code": "en", "sort_by": "search_volume"}]'

When to use DataForSEO vs SemRush:

  • Use SemRush as the primary source for keyword difficulty, competitor analysis, and domain organic keywords
  • Use DataForSEO for bulk search volume lookups (supports up to 700 keywords per request, more cost-effective for large batches)
  • Use DataForSEO when you need Google Ads-aligned data (their data comes directly from Google Keyword Planner)
  • Cross-reference both sources when search volume numbers differ significantly

If SERPAPI_API_KEY is available, use SerpAPI to extract "People Also Ask" questions and related searches directly from Google SERPs. This data is not available from SemRush and is valuable for FAQ sections and content ideation.

Search Endpoint:

# Get SERP data including People Also Ask and related searches
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10"

Parsing People Also Ask:

# Extract People Also Ask questions
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10" | \
  jq -r '.related_questions[] | {
    question: .question,
    snippet: .snippet,
    link: .link,
    title: .title
  }'

Key response sections:

  • related_questions - Array of "People Also Ask" questions with snippets and source URLs
  • related_searches - Array of related search queries that Google suggests
  • organic_results - Top 10 organic results (useful for SERP analysis)

Parsing Related Searches:

# Extract related searches for content ideation
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10" | \
  jq -r '.related_searches[] | .query'

How to use SerpAPI data in keyword research:

  1. FAQ content: Use "People Also Ask" questions directly as H2/H3 headings in blog posts or as FAQ schema entries. These are questions Google already associates with the keyword.
  2. Content gap discovery: If a PAA question has a weak snippet answer (short, vague, or from a low-authority site), that is an opportunity to write a better answer and win the featured snippet.
  3. Keyword expansion: Related searches are Google's own suggestions for related topics. Add these to your keyword list and check their volume via SemRush or DataForSEO.
  4. Search intent validation: The organic results show what content types Google ranks for this keyword. If all top 10 are blog posts, write a blog post. If they are product pages, a blog post will not rank.
  5. Cluster building: Group PAA questions and related searches by subtopic to identify natural content clusters.

Additional SerpAPI parameters:

  • location=United+States - Geo-target the search
  • gl=us - Country code for Google domain
  • hl=en - Interface language
  • device=desktop or device=mobile - Desktop vs mobile SERPs (mobile may show different PAA questions)

Note: SerpAPI charges per search. Use it strategically for your highest-priority keywords rather than for bulk research. Pair it with SemRush for volume data and DataForSEO for bulk lookups.

If SERPINGAPI_API_KEY is available, use Serping API (https://serpingapi.com) for the same "People Also Ask" and related-searches data from live Google SERPs. A free tier is available.

Search Endpoint:

# Get SERP data including People Also Ask and related searches
curl -s -X POST "https://api.serpingapi.com/v1/search" \
  -H "X-API-Key: ${SERPINGAPI_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"q": "{keyword}", "gl": "us", "hl": "en", "num": 10}'

Parsing People Also Ask:

# Extract People Also Ask questions
curl -s -X POST "https://api.serpingapi.com/v1/search" \
  -H "X-API-Key: ${SERPINGAPI_API_KEY}" -H "Content-Type: application/json" \
  -d '{"q": "{keyword}", "gl": "us", "hl": "en", "num": 10}' | \
  jq -r '.peopleAlsoAsk[] | {question, snippet, link, title}'

Key response sections (present only when Google shows them):

  • peopleAlsoAsk - Array of "People Also Ask" questions with snippets and source URLs
  • relatedSearches - Array of { "query": ... } objects that Google suggests
  • organic - Organic results with position, title, link, snippet
  • answerBox / knowledgeGraph - Featured snippet and knowledge panel, when present

Parsing Related Searches:

# Extract related searches for content ideation
curl -s -X POST "https://api.serpingapi.com/v1/search" \
  -H "X-API-Key: ${SERPINGAPI_API_KEY}" -H "Content-Type: application/json" \
  -d '{"q": "{keyword}", "gl": "us", "hl": "en", "num": 10}' | \
  jq -r '.relatedSearches[] | .query'

Use the data exactly as described for SerpAPI above (FAQ headings, gap discovery, keyword expansion, intent validation, clustering).

Additional Serping API parameters: location (e.g. "Seattle, Washington, United States"), page (starting at 1), tbs time filter (qdr:d, qdr:w, qdr:m, qdr:y). Every response carries X-Quota-Remaining, so you can tell the user how much of the monthly quota is left. Errors are {"error": {"code", "message"}} — 429 quota_exceeded means the month's quota is spent; report it rather than retrying.

1---
2name: keyword-research
3description: Perform keyword research using the SemRush API. Use when the user says "find keywords", "keyword research", "what should I rank for", "keyword ideas", "search volume", "keyword difficulty", "topic clusters", "content gaps", or asks about SEO keywords for a topic or niche.
4---
5 
6# Keyword Research Skill
7 
8You are an expert SEO keyword researcher. Use the SemRush API to find, analyze, and organize keywords into actionable strategies.
9 
10## Prerequisites
11 
12This skill requires `SEMRUSH_API_KEY`. Check for it in environment variables or in `~/.claude/.env.global`. If not found, inform the user:
13 
14```
15This skill requires a SemRush API key. Set it via:
16 export SEMRUSH_API_KEY=your_key_here
17Or add it to ~/.claude/.env.global
18```
19 
20## SemRush API Endpoints
21 
22Use `curl` via the Bash tool for all API calls. The base URL is `https://api.semrush.com/`.
23 
24### Core Endpoints
25 
26**1. Keyword Overview (phrase_all)**
27```
28https://api.semrush.com/?type=phrase_all&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td
29```
30Columns: Ph=Keyword, Nq=Search Volume, Cp=CPC, Co=Competition, Nr=Number of Results, Td=Trend
31 
32**2. Related Keywords (phrase_related)**
33```
34https://api.semrush.com/?type=phrase_related&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50
35```
36 
37**3. Keyword Questions (phrase_questions)**
38```
39https://api.semrush.com/?type=phrase_questions&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50
40```
41 
42**4. Domain Organic Keywords (domain_organic)**
43```
44https://api.semrush.com/?type=domain_organic&key={KEY}&domain={domain}&database={db}&export_columns=Ph,Po,Nq,Cp,Co,Tr,Tc,Nr,Td&display_limit=100
45```
46Additional columns: Po=Position, Tr=Traffic, Tc=Traffic Cost
47 
48**5. Keyword Difficulty (phrase_kdi)**
49```
50https://api.semrush.com/?type=phrase_kdi&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Kd
51```
52Columns: Kd=Keyword Difficulty (0-100)
53 
54### Database Codes
55- `us` (United States - default)
56- `uk` (United Kingdom)
57- `ca` (Canada)
58- `au` (Australia)
59- `de`, `fr`, `es`, `it`, `br`, `in`, `jp`
60 
61Ask the user for target market if not specified. Default to `us`.
62 
63## Research Process
64 
65### Step 1: Understand the Brief
66 
67Ask or infer:
68- **Niche/Topic:** What is the site about?
69- **Target audience:** Who are they trying to reach?
70- **Business model:** How do they monetize? (SaaS, ecommerce, ads, affiliate)
71- **Current domain:** If they have one, pull existing rankings
72- **Target market:** Which country/language?
73- **Competitors:** Known competitors to analyze
74 
75### Step 2: Seed Keyword Discovery
76 
77Generate 10-20 seed keywords based on the brief. Use three methods:
78 
79**Method A: Brainstorm seeds** from the topic
80- Core product/service terms
81- Problem terms ("how to fix...", "why is...")
82- Audience terms (job titles, demographics)
83- Alternative terms and synonyms
84 
85**Method B: Pull competitor keywords** using `domain_organic` for 2-3 competitor domains
86 
87**Method C: Expand seeds** using `phrase_related` and `phrase_questions` for each seed
88 
89### Step 3: Analyze Each Keyword
90 
91For every keyword candidate, collect via API:
92 
93| Metric | Source | What it tells you |
94|--------|--------|-------------------|
95| Search Volume (Nq) | phrase_all | Monthly searches |
96| Keyword Difficulty (Kd) | phrase_kdi | How hard to rank (0-100) |
97| CPC (Cp) | phrase_all | Commercial value indicator |
98| Competition (Co) | phrase_all | PPC competition (0-1) |
99| Trend (Td) | phrase_all | 12-month trend data |
100| SERP Results (Nr) | phrase_all | Total competing pages |
101 
102### Step 4: Classify by Search Intent
103 
104Categorize every keyword into one of four intents:
105 
106| Intent | Signals | Examples | Content Type |
107|--------|---------|----------|--------------|
108| **Informational** | how, what, why, guide, tutorial, tips | "how to start a blog" | Blog post, guide, video |
109| **Navigational** | brand names, specific product names, login | "semrush login" | Homepage, product page |
110| **Commercial** | best, review, comparison, vs, top, alternatives | "best SEO tools 2025" | Comparison, review, listicle |
111| **Transactional** | buy, price, discount, coupon, free trial, sign up | "semrush pricing" | Landing page, product page |
112 
113**Intent classification rules:**
114- "how to" / "what is" / "why" = Informational
115- "{brand} + {feature}" = Navigational
116- "best" / "top" / "vs" / "alternative" / "review" = Commercial Investigation
117- "buy" / "price" / "discount" / "free" / "download" / "sign up" = Transactional
118- If ambiguous, check the SERP: majority blog posts = informational, majority product pages = transactional
119 
120### Step 5: Build Topic Clusters
121 
122Organize keywords into pillar-cluster structure:
123 
124```
125Pillar Page: [Broad topic keyword - high volume, high difficulty]
126 |
127 +-- Cluster 1: [Subtopic keyword group]
128 | +-- Supporting keyword 1
129 | +-- Supporting keyword 2
130 | +-- Question keyword 1
131 |
132 +-- Cluster 2: [Subtopic keyword group]
133 | +-- Supporting keyword 1
134 | +-- Supporting keyword 2
135 |
136 +-- Cluster 3: ...
137```
138 
139**Clustering rules:**
140- Pillar: Volume > 5,000, KD 40-80, broad topic
141- Cluster head: Volume 1,000-5,000, KD 20-50, specific subtopic
142- Supporting: Volume 100-1,000, KD < 30, long-tail variations
143- Each cluster should have 3-8 supporting keywords
144- Every supporting page links back to the pillar page
145 
146### Step 6: Prioritize with the KOB Score
147 
148Calculate the Keyword Opposition to Benefit (KOB) score for prioritization:
149 
150```
151KOB Score = (Search Volume * CTR Estimate * Business Value) / Keyword Difficulty
152 
153Where:
154- CTR Estimate: Position 1 = 0.30, Pos 2 = 0.15, Pos 3 = 0.10 (use 0.15 as default)
155- Business Value: 3 = direct revenue keyword, 2 = consideration keyword, 1 = awareness keyword
156- Keyword Difficulty: 1-100 from SemRush (use max(KD, 1) to avoid division by zero)
157```
158 
159**Priority tiers:**
160- KOB > 50: High priority - target first
161- KOB 20-50: Medium priority - target in months 2-3
162- KOB 5-20: Low priority - target later
163- KOB < 5: Deprioritize unless strategically important
164 
165### Step 7: Find Content Gaps
166 
167Compare the user's domain against competitors:
168 
1691. Pull top 100 keywords for each competitor via `domain_organic`
1702. Identify keywords where competitors rank but user does not
1713. Filter for keywords with KOB > 20
1724. These are content gap opportunities
173 
174## Output Format
175 
176Present results in this structure:
177 
178```markdown
179# Keyword Research Report: {Topic/Niche}
180**Date:** {date}
181**Target Market:** {country}
182**Total Keywords Found:** {count}
183**Total Monthly Search Volume:** {sum}
184 
185## Top 20 Keywords by KOB Score
186 
187| # | Keyword | Volume | KD | CPC | Intent | KOB Score |
188|---|---------|--------|-----|-----|--------|-----------|
189| 1 | {keyword} | {vol} | {kd} | ${cpc} | {intent} | {kob} |
190| ... | ... | ... | ... | ... | ... | ... |
191 
192## Topic Clusters
193 
194### Pillar: {Pillar keyword} (Volume: {vol}, KD: {kd})
195 
196| Cluster | Head Keyword | Volume | KD | Supporting Keywords |
197|---------|-------------|--------|-----|---------------------|
198| {name} | {keyword} | {vol} | {kd} | kw1, kw2, kw3 |
199 
200### Content Plan
201 
202| Priority | Keyword | Intent | Content Type | Est. Monthly Traffic |
203|----------|---------|--------|-------------|---------------------|
204| 1 | {keyword} | {intent} | {type} | {vol * 0.15} |
205| ... | ... | ... | ... | ... |
206 
207## Question Keywords (FAQ Opportunities)
208 
209| Question | Volume | KD | Suggested Content |
210|----------|--------|-----|-------------------|
211| {question} | {vol} | {kd} | {content type} |
212 
213## Content Gaps vs. Competitors
214 
215| Keyword | Volume | KD | Competitor Ranking | Opportunity |
216|---------|--------|-----|--------------------|-------------|
217| {keyword} | {vol} | {kd} | {competitor}: #{pos} | {content type} |
218 
219## Recommended Next Steps
220 
2211. {Specific action item with keyword target}
2222. ...
223```
224 
225## Tips for Better Results
226 
227- **Batch API calls** to conserve API credits. Query related keywords in groups.
228- **Always check trends.** A keyword with declining volume may not be worth targeting.
229- **CPC indicates money intent.** High CPC keywords ($5+) usually have strong commercial intent even if not obvious.
230- **Low KD is not always easy.** If all top results are from DR 80+ sites, a KD of 20 may still be hard for a new site.
231- **Local vs. national.** For local businesses, append city/state to seed keywords.
232- **Seasonal keywords.** Note if trends show seasonality; plan content 2-3 months before peak.
233- If the API returns an error or no data, inform the user of the specific issue rather than guessing.
234 
235## Supplementary API Integrations
236 
237These APIs complement SemRush and can be used as alternatives or for additional data points. They are not required if SemRush is available.
238 
239### DataForSEO (Alternative/Complement to SemRush)
240 
241If `DATAFORSEO_LOGIN` and `DATAFORSEO_PASSWORD` are available, use DataForSEO for keyword search volume and related data. This is especially useful as a fallback when SemRush credits are limited or for cross-referencing data.
242 
243**Search Volume Endpoint:**
244 
245```bash
246# Get keyword search volume data from DataForSEO
247curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live" \
248 -H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
249 -H "Content-Type: application/json" \
250 -d '[{"keywords": ["keyword1", "keyword2", "keyword3"], "location_code": 2840, "language_code": "en"}]'
251```
252 
253**Parsing the response:**
254 
255```bash
256# Extract keyword metrics from DataForSEO response
257curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live" \
258 -H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
259 -H "Content-Type: application/json" \
260 -d '[{"keywords": ["keyword1", "keyword2"], "location_code": 2840, "language_code": "en"}]' | \
261 jq '.tasks[0].result[] | {
262 keyword: .keyword,
263 search_volume: .search_volume,
264 competition: .competition,
265 competition_index: .competition_index,
266 cpc: .cpc,
267 monthly_searches: .monthly_searches
268 }'
269```
270 
271Key fields:
272- **`search_volume`** - Average monthly search volume
273- **`competition`** - Competition level: "LOW", "MEDIUM", or "HIGH"
274- **`competition_index`** - Numeric competition score (0-100)
275- **`cpc`** - Cost per click in USD
276- **`monthly_searches`** - Array of 12 monthly volume data points (useful for identifying seasonal trends)
277 
278**Common location codes:**
279- `2840` - United States
280- `2826` - United Kingdom
281- `2124` - Canada
282- `2036` - Australia
283- `2250` - France
284- `2158` - Germany
285 
286**Keyword Suggestions Endpoint:**
287 
288```bash
289# Get keyword suggestions (similar to SemRush phrase_related)
290curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/keywords_for_keywords/live" \
291 -H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
292 -H "Content-Type: application/json" \
293 -d '[{"keywords": ["seed keyword"], "location_code": 2840, "language_code": "en", "sort_by": "search_volume"}]'
294```
295 
296**When to use DataForSEO vs SemRush:**
297- Use **SemRush** as the primary source for keyword difficulty, competitor analysis, and domain organic keywords
298- Use **DataForSEO** for bulk search volume lookups (supports up to 700 keywords per request, more cost-effective for large batches)
299- Use **DataForSEO** when you need Google Ads-aligned data (their data comes directly from Google Keyword Planner)
300- Cross-reference both sources when search volume numbers differ significantly
301 
302### SerpAPI (People Also Ask & Related Searches)
303 
304If `SERPAPI_API_KEY` is available, use SerpAPI to extract "People Also Ask" questions and related searches directly from Google SERPs. This data is not available from SemRush and is valuable for FAQ sections and content ideation.
305 
306**Search Endpoint:**
307 
308```bash
309# Get SERP data including People Also Ask and related searches
310curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10"
311```
312 
313**Parsing People Also Ask:**
314 
315```bash
316# Extract People Also Ask questions
317curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10" | \
318 jq -r '.related_questions[] | {
319 question: .question,
320 snippet: .snippet,
321 link: .link,
322 title: .title
323 }'
324```
325 
326Key response sections:
327- **`related_questions`** - Array of "People Also Ask" questions with snippets and source URLs
328- **`related_searches`** - Array of related search queries that Google suggests
329- **`organic_results`** - Top 10 organic results (useful for SERP analysis)
330 
331**Parsing Related Searches:**
332 
333```bash
334# Extract related searches for content ideation
335curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10" | \
336 jq -r '.related_searches[] | .query'
337```
338 
339**How to use SerpAPI data in keyword research:**
340 
3411. **FAQ content:** Use "People Also Ask" questions directly as H2/H3 headings in blog posts or as FAQ schema entries. These are questions Google already associates with the keyword.
3422. **Content gap discovery:** If a PAA question has a weak snippet answer (short, vague, or from a low-authority site), that is an opportunity to write a better answer and win the featured snippet.
3433. **Keyword expansion:** Related searches are Google's own suggestions for related topics. Add these to your keyword list and check their volume via SemRush or DataForSEO.
3444. **Search intent validation:** The organic results show what content types Google ranks for this keyword. If all top 10 are blog posts, write a blog post. If they are product pages, a blog post will not rank.
3455. **Cluster building:** Group PAA questions and related searches by subtopic to identify natural content clusters.
346 
347**Additional SerpAPI parameters:**
348- `location=United+States` - Geo-target the search
349- `gl=us` - Country code for Google domain
350- `hl=en` - Interface language
351- `device=desktop` or `device=mobile` - Desktop vs mobile SERPs (mobile may show different PAA questions)
352 
353**Note:** SerpAPI charges per search. Use it strategically for your highest-priority keywords rather than for bulk research. Pair it with SemRush for volume data and DataForSEO for bulk lookups.
354 
355### Serping API (People Also Ask & Related Searches)
356 
357If `SERPINGAPI_API_KEY` is available, use Serping API (https://serpingapi.com) for the same "People Also Ask" and related-searches data from live Google SERPs. A free tier is available.
358 
359**Search Endpoint:**
360 
361```bash
362# Get SERP data including People Also Ask and related searches
363curl -s -X POST "https://api.serpingapi.com/v1/search" \
364 -H "X-API-Key: ${SERPINGAPI_API_KEY}" \
365 -H "Content-Type: application/json" \
366 -d '{"q": "{keyword}", "gl": "us", "hl": "en", "num": 10}'
367```
368 
369**Parsing People Also Ask:**
370 
371```bash
372# Extract People Also Ask questions
373curl -s -X POST "https://api.serpingapi.com/v1/search" \
374 -H "X-API-Key: ${SERPINGAPI_API_KEY}" -H "Content-Type: application/json" \
375 -d '{"q": "{keyword}", "gl": "us", "hl": "en", "num": 10}' | \
376 jq -r '.peopleAlsoAsk[] | {question, snippet, link, title}'
377```
378 
379Key response sections (present only when Google shows them):
380- **`peopleAlsoAsk`** - Array of "People Also Ask" questions with snippets and source URLs
381- **`relatedSearches`** - Array of `{ "query": ... }` objects that Google suggests
382- **`organic`** - Organic results with `position`, `title`, `link`, `snippet`
383- **`answerBox`** / **`knowledgeGraph`** - Featured snippet and knowledge panel, when present
384 
385**Parsing Related Searches:**
386 
387```bash
388# Extract related searches for content ideation
389curl -s -X POST "https://api.serpingapi.com/v1/search" \
390 -H "X-API-Key: ${SERPINGAPI_API_KEY}" -H "Content-Type: application/json" \
391 -d '{"q": "{keyword}", "gl": "us", "hl": "en", "num": 10}' | \
392 jq -r '.relatedSearches[] | .query'
393```
394 
395Use the data exactly as described for SerpAPI above (FAQ headings, gap discovery, keyword expansion, intent validation, clustering).
396 
397**Additional Serping API parameters:** `location` (e.g. `"Seattle, Washington, United States"`), `page` (starting at 1), `tbs` time filter (`qdr:d`, `qdr:w`, `qdr:m`, `qdr:y`). Every response carries `X-Quota-Remaining`, so you can tell the user how much of the monthly quota is left. Errors are `{"error": {"code", "message"}}` — `429 quota_exceeded` means the month's quota is spent; report it rather than retrying.
398 

Discussion

Alternatives

Agentic Browsing ReadinessAudit and fix agent readiness: the Lighthouse Agentic Browsing fraction, accessibility tree for agents, robots.txt and Content-Signal for AI agents, WAF treatment of agent traffic, llms.txt, Markdown delivery, ai-catalog.json, /.well-known discovery files, and WebMCP tools. Exclude AI citability and brand signals (seo-geo) and commerce protocol depth (seo-ecommerce).Marketing · MITBacklink Profile AnalysisBacklink profile analysis: referring domains, anchor text distribution, toxic link detection, competitor gap analysis. Works with free APIs (Moz, Bing Webmaster, Common Crawl) and DataForSEO extension. Use when user says backlinks, link profile, referring domains, anchor text, toxic links, link gap, link building, disavow, or backlink audit.Marketing · MIT/setup-cmsConnect a CMS to notfair SEO tools. Guides users through configuring WordPress, Strapi, Contentful, or Ghost — tests the connection, and writes credentials to .env.local. Once set up, seo-analysis automatically cross- references CMS content against Google Search Console data. Use whenever the user says "connect my CMS", "set up WordPress", "configure Strapi", "add Contentful", "connect Ghost", or "CMS setup". Also trigger if the user asks why no CMS data appears in a seo-analysis report. · MITBacklink checkBacklink profile for any domain — referring domains, authority, anchors, new/lost links, and a side-by-side vs a competitor. Use when asked "check my backlinks", "backlink profile of X", "who links to them", or "link gap vs competitor".Marketing · MIT