一键导入
semrush-cli
SEMrush keyword research, domain analytics, backlinks, and competitive intelligence via the local semrush CLI tool
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
SEMrush keyword research, domain analytics, backlinks, and competitive intelligence via the local semrush CLI tool
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | semrush-cli |
| description | SEMrush keyword research, domain analytics, backlinks, and competitive intelligence via the local semrush CLI tool |
| argument-hint | ["keyword","domain","or command"] |
| disable-model-invocation | true |
| allowed-tools | ["Bash","Read"] |
Fast keyword research, domain analytics, backlinks, traffic analysis, and competitive intelligence using the locally installed semrush CLI. This CLI is built from the unified semrush-mcp repo and shares the same API client as the MCP server.
$ARGUMENTS
The CLI is installed globally from the semrush-mcp repo. Verify it's available:
semrush --version
Ensure SEMRUSH_API_KEY is set in your environment or .env file.
Auto-detects whether the target is a keyword or domain and returns the appropriate overview.
semrush q "seo tools" # Keyword overview
semrush q example.com # Domain overview
semrush quick "content marketing" -d uk # Specify database
Options:
-d, --database <db>: Country database code (default: us)-f, --format <fmt>: Output format — text or json (default: text)In-depth keyword analysis with multiple sub-commands.
# Basic keyword overview
semrush kw "content marketing"
# Related keywords
semrush kw "seo" --related -l 20
# Question-based keywords
semrush kw "marketing" --questions -l 10
# Broad match keywords
semrush kw "email marketing" --broad -l 15
# SERP organic results (who ranks for this keyword)
semrush kw "seo tools" --organic -l 10
# SERP paid results
semrush kw "ppc software" --paid -l 10
Options:
--related: Get related keywords--questions: Get question-based keyword variations--broad: Get broad match keywords--organic: Get organic SERP results for the keyword--paid: Get paid SERP results for the keyword-d, --database <db>: Country database code (default: us)-l, --limit <n>: Number of results to return-f, --format <fmt>: Output format — text or json (default: text)Analyze difficulty scores for multiple keywords at once.
semrush kd "seo" "content marketing" "link building"
semrush kd "keyword1" "keyword2" "keyword3" -d uk
Options:
-d, --database <db>: Country database code (default: us)-f, --format <fmt>: Output format — text or json (default: text)Comprehensive domain analysis with multiple views.
# Domain overview
semrush d semrush.com
semrush domain example.com
# Organic keywords the domain ranks for
semrush d example.com --organic -l 30
# Paid keywords the domain bids on
semrush d example.com --paid -l 20
# Organic search competitors
semrush d example.com --competitors -l 10
Options:
--organic: Get organic keywords for the domain--paid: Get paid keywords for the domain--competitors: Get organic search competitors-d, --database <db>: Country database code (default: us)-l, --limit <n>: Number of results to return-f, --format <fmt>: Output format — text or json (default: text)Backlink analysis for domains and URLs.
# Backlink overview
semrush bl example.com
semrush backlinks example.com
# Referring domains
semrush bl example.com --domains -l 20
Options:
--domains: Get referring domains instead of individual backlinks-l, --limit <n>: Number of results to return-f, --format <fmt>: Output format — text or json (default: text)Traffic data for domains (requires .Trends subscription).
# Traffic summary
semrush traffic example.com
# Traffic sources breakdown
semrush traffic example.com --sources
Options:
--sources: Get traffic sources breakdown--country <code>: Country filter (default: us)-f, --format <fmt>: Output format — text or json (default: text)Find keyword opportunities by comparing two domains.
semrush gaps mysite.com competitor.com -l 50
semrush gaps mysite.com competitor.com -d uk -l 30
Options:
-d, --database <db>: Country database code (default: us)-l, --limit <n>: Number of results to return-f, --format <fmt>: Output format — text or json (default: text)Check remaining API units on your account.
semrush units
Determine what kind of research the user wants:
semrush q for fast overview of a keyword or domainsemrush kw with appropriate flagssemrush d with appropriate flagssemrush d --competitors or semrush gapssemrush blsemrush trafficBased on $ARGUMENTS, construct and execute the right command. Always use -f text for human-readable output unless the user specifically wants JSON.
Summarize results clearly:
Overview: Brief summary of key metrics
Key Data Points:
Insights: Actionable observations based on the data
All commands support these flags:
-d, --database <db>: Country/database code (default: us). Codes: us, uk, ca, au, de, fr, es, it, br, mx, in, jp, etc.-l, --limit <n>: Number of results to return-f, --format <fmt>: Output format — text (colorized tables) or json (raw data, pipe to jq)semrush kw "project management software" --related -l 20
semrush kw "project management software" --organic -l 10
semrush kd "project management" "task management" "team collaboration"
semrush d competitor.com
semrush d competitor.com --organic -l 50
semrush d competitor.com --competitors -l 10
semrush bl competitor.com --domains -l 20
semrush gaps mysite.com competitor.com -l 100
semrush q "best crm software"
semrush q hubspot.com
semrush units
Different API calls consume different amounts of units per line returned:
| Operation | Units/Line |
|---|---|
| Keyword overview | 10 |
| Batch keyword overview | 10 |
| Keyword organic results | 10 |
| Keyword paid results | 20 |
| Related keywords | 40 |
| Keyword ads history | 100 |
| Broad match keywords | 20 |
| Phrase questions | 40 |
| Keyword difficulty | 50 |
Check your balance anytime with semrush units.