Loading...
Loading...
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.
npx skill4agent add openclaudia/openclaudia-skills keyword-researchSEMRUSH_API_KEY~/.claude/.env.globalThis skill requires a SemRush API key. Set it via:
export SEMRUSH_API_KEY=your_key_here
Or add it to ~/.claude/.env.globalcurlhttps://api.semrush.com/https://api.semrush.com/?type=phrase_all&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Tdhttps://api.semrush.com/?type=phrase_related&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50https://api.semrush.com/?type=phrase_questions&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50https://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=100https://api.semrush.com/?type=phrase_kdi&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Kdusukcaaudefresitbrinjpusdomain_organicphrase_relatedphrase_questions| 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 |
| 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 |
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: ...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)domain_organic# 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. ...DATAFORSEO_LOGINDATAFORSEO_PASSWORD# 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"}]'# 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
}'search_volumecompetitioncompetition_indexcpcmonthly_searches284028262124203622502158# 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"}]'SERPAPI_API_KEY# 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"# 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
}'related_questionsrelated_searchesorganic_results# 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'location=United+Statesgl=ushl=endevice=desktopdevice=mobile