pp-semrush
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- GENERATED FILE — DO NOT EDIT.
This file is a verbatim mirror of library/marketing/semrush/SKILL.md,
regenerated post-merge by tools/generate-skills/. Hand-edits here are
silently overwritten on the next regen. Edit the library/ source instead.
See AGENTS.md "Generated artifacts: registry.json, cli-skills/". -->
<!-- 生成文件 — 请勿编辑。
本文件是library/marketing/semrush/SKILL.md的完全镜像,
由tools/generate-skills/在合并后重新生成。此处手动编辑的内容会在下次生成时被自动覆盖。请改为编辑library/目录下的源文件。
请参阅AGENTS.md中的“生成产物:registry.json, cli-skills/”。 -->
Semrush — Printing Press CLI
Semrush — Printing Press CLI
Prerequisites: Install the CLI
前提条件:安装CLI
This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
semrush-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press-library install semrush --cli-only - Verify:
semrush-pp-cli --version - Ensure (or
$GOPATH/bin) is on$HOME/go/bin.$PATH
If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer):
npxbash
go install github.com/mvanhorn/printing-press-library/library/marketing/semrush/cmd/semrush-pp-cli@latestIf reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds.
--version$PATHWraps the Semrush v3 Analytics + Projects APIs with a real local store so weekly drift, keyword gap, backlink gap, and Site Audit triage become one-shot queries instead of multi-tab CSV diffs. Every API unit you spend is logged to a queryable budget ledger, and offline FTS5 search over everything you've ever synced means follow-up questions cost zero credits.
本技能基于二进制文件运行。在调用本技能的任何命令前,必须确认CLI已安装。如果未安装,请先执行以下步骤:
semrush-pp-cli- 通过Printing Press安装器安装:
bash
npx -y @mvanhorn/printing-press-library install semrush --cli-only - 验证安装:
semrush-pp-cli --version - 确保(或
$GOPATH/bin)已添加到$HOME/go/bin环境变量中。$PATH
如果安装失败(无Node环境、离线等情况),可改用Go直接安装(要求Go 1.26.3或更高版本):
npxbash
go install github.com/mvanhorn/printing-press-library/library/marketing/semrush/cmd/semrush-pp-cli@latest如果安装后执行提示“command not found”,说明安装步骤未将二进制文件添加到中。请在验证成功前不要执行技能命令。
--version$PATH本工具封装了Semrush v3 Analytics + Projects API,并搭配本地存储,让周度变化分析、关键词差距分析、反向链接差距分析和站点审计优先级排序等操作只需一次查询即可完成,无需再手动对比多标签页的CSV文件。您的每一次API调用消耗的单元都会记录到可查询的预算账本中,并且对已同步的所有数据支持离线FTS5搜索,后续查询无需消耗任何积分。
When to Use This CLI
何时使用本CLI
Use this CLI when you need to query Semrush data the same way more than once — weekly drift, keyword gap, backlink gap, Site Audit regression — or when you're orchestrating Semrush through an agent that should not re-spend credits on data already pulled. It's not the right tool for one-off ad-hoc lookups (the official Semrush UI is faster) or for Trends API workflows (out of scope by design).
当您需要重复查询Semrush数据时(如周度变化分析、关键词差距分析、反向链接差距分析、站点审计回归分析),或者当您通过Agent编排Semrush操作且不想重复消耗积分获取已拉取的数据时,适合使用本CLI。对于一次性临时查询(官方Semrush UI速度更快)或Trends API工作流(本工具设计上不支持),则不建议使用。
Unique Capabilities
独特功能
These capabilities aren't available in any other tool for this API.
以下功能是其他基于该API的工具所不具备的。
Local state that compounds
可累积的本地状态
-
— Diff this week's domain + keyword snapshot against last week's to see what moved, without re-spending credits on the data you already pulled.
driftWhen an agent is asked 'what changed for this domain this week', this is the single command that answers it from the local store with no API spend.bashsemrush-pp-cli drift apple.com --since 7d --agent -
— Tag the current local-store state of any resource (e.g. monday-baseline) and later diff any two tags to see exactly what moved between them.
snapshotLets an agent reason about state across multiple weeks of conversations without re-paying for the same data.bashsemrush-pp-cli snapshot tag monday && semrush-pp-cli snapshot diff monday today --select phrase,position --agent -
— Show only the referring domains and backlinks first seen in a window, so the 'did anything new link to us this week' question is a one-liner.
backlink newSaves an agent from re-pulling and diffing two full backlink reports to answer a recency question.bashsemrush-pp-cli backlink new apple.com --since 7d --json -
— Window-function over Position Tracking snapshots: which keywords moved more than N positions, dropped off page 1, or entered page 1, per region and device.
tracking driftAnswers 'what tracked keywords moved this month' in one command — the question Position Tracking emails fail to answer.bashsemrush-pp-cli tracking drift 12345 --since 30d --min-delta 3 --agent -
— Diff the latest two Site Audit snapshots for a project: new issue IDs introduced, issues resolved, count delta per severity.
audit regressionLets an agent tell you exactly what your tech-SEO state regressed on between two crawls.bashsemrush-pp-cli audit regression 12345 --agent
-
— 将本周域名+关键词快照与上周快照对比,查看变化情况,无需为已拉取的数据重复消耗积分。
drift当Agent被问及“该域名本周有什么变化”时,此命令可直接从本地存储获取答案,无需调用API消耗积分。bashsemrush-pp-cli drift apple.com --since 7d --agent -
— 为任意资源的当前本地存储状态添加标签(如monday-baseline),之后可对比任意两个标签,查看它们之间的具体变化。
snapshot允许Agent在多周对话中追踪状态变化,无需为相同数据重复付费。bashsemrush-pp-cli snapshot tag monday && semrush-pp-cli snapshot diff monday today --select phrase,position --agent -
— 仅显示指定时间段内首次出现的引荐域名和反向链接,只需一行命令即可回答“本周有哪些新域名链接到我们”的问题。
backlink new避免Agent为了回答时效性问题而重新拉取并对比两份完整的反向链接报告。bashsemrush-pp-cli backlink new apple.com --since 7d --json -
— 对Position Tracking快照进行窗口函数分析:查看哪些关键词排名变化超过N位、掉出第一页或进入第一页,支持按地区和设备筛选。
tracking drift只需一条命令即可回答“本月哪些追踪关键词排名发生变化”的问题——这是Position Tracking邮件无法回答的。bashsemrush-pp-cli tracking drift 12345 --since 30d --min-delta 3 --agent -
— 对比项目的最新两份Site Audit快照:查看新增的问题ID、已解决的问题,以及各严重级别的数量变化。
audit regression让Agent准确告知您两次爬取之间技术SEO状态的退化情况。bashsemrush-pp-cli audit regression 12345 --agent
Cost transparency
成本透明度
-
— Every API call's documented unit cost is logged locally; budget rolls up spend by day, command, resource, and projects month-end burn from the current balance probe.
budgetTells an agent before a request 'this would cost N units' and after a month 'here is where the units went' — neither answerable from the upstream alone.bashsemrush-pp-cli budget --since 30d --group-by command --agent
-
— 本地记录每一次API调用的文档化单元成本;预算功能可按天、命令、资源汇总消耗情况,并从当前余额查询中获取项目月末消耗数据。
budget可在请求前告知Agent“此操作将消耗N个单元”,并在月末告知“单元消耗去向”——这两个信息仅通过上游API无法获取。bashsemrush-pp-cli budget --since 30d --group-by command --agent
Cross-domain joins the API can't do
API无法实现的跨域关联
-
— Set-difference of organic keywords across two or more domains in the same database, with intersection and unique-to-each modes.
keyword gapReplaces the manual two-CSV VLOOKUP that every SEO consultant does by hand.bashsemrush-pp-cli keyword gap myco.com competitor1.com competitor2.com --database us --kd-max 40 --agent -
— Find referring domains that link to a competitor but not to you, filtered by authority score.
backlink gapDirectly surfaces link-building targets an agent can hand to an outreach workflow.bashsemrush-pp-cli backlink gap myco.com competitor.com --min-ascore 70 --agent -
— Run Domain Overview across multiple country databases in one shot, persist all rows with the database key so later cross-region drift queries work.
domain regionsLets an agent answer 'how does this domain perform across our top 5 markets' as one call rather than five.bashsemrush-pp-cli domain regions apple.com --databases us,uk,de,fr,it --agent
-
— 在同一数据库中计算两个或多个域名之间的自然关键词差异,支持交集、各域名独有等模式。
keyword gap替代SEO顾问手动完成的两份CSV文件VLOOKUP操作。bashsemrush-pp-cli keyword gap myco.com competitor1.com competitor2.com --database us --kd-max 40 --agent -
— 查找链接到竞品但未链接到您的引荐域名,可按权威分数筛选。
backlink gap直接为Agent提供可用于外联工作流的链接建设目标。bashsemrush-pp-cli backlink gap myco.com competitor.com --min-ascore 70 --agent -
— 一次性在多个国家数据库中运行Domain Overview,将所有行与数据库键一起持久化,以便后续进行跨区域变化查询。
domain regions让Agent只需一次调用即可回答“该域名在我们的Top 5市场表现如何”,无需调用五次。bashsemrush-pp-cli domain regions apple.com --databases us,uk,de,fr,it --agent
SEO content patterns no competitor exposes
竞品未公开的SEO内容模式
-
— Rank Site Audit pages by weighted issue severity (errors x3, warnings x1, notices x0.1) so you fix the highest-impact pages first.
audit triageTurns a Site Audit dump into a prioritized action list an agent can hand to the next step.bashsemrush-pp-cli audit triage 12345 --top 20 --agent -
— Time-series view of which SERP features (featured snippet, People Also Ask, video, image pack) have appeared and disappeared for a tracked keyword.
serp-featuresTells a content-strategy agent when an opportunity (e.g. featured snippet slot opening) appeared or closed.bashsemrush-pp-cli serp-features 'best running shoes' --since 30d --agent -
— List phrases where the same domain ranks for multiple URLs (a known SEO problem) with the URLs and their respective positions.
cannibalizationSurfaces a high-value SEO problem in one command — most consultants charge to find this.bashsemrush-pp-cli cannibalization apple.com --database us --agent
-
— 按加权问题严重程度(错误×3、警告×1、通知×0.1)对Site Audit页面排序,让您优先修复影响最大的页面。
audit triage将Site Audit的原始数据转化为优先级排序的操作列表,Agent可直接将其传递到下一步工作。bashsemrush-pp-cli audit triage 12345 --top 20 --agent -
— 查看追踪关键词对应的SERP功能(精选摘要、People Also Ask、视频、图片包)随时间的出现和消失情况。
serp-features告知内容策略Agent何时出现(或消失)机会(如精选摘要空位)。bashsemrush-pp-cli serp-features 'best running shoes' --since 30d --agent -
— 列出同一域名多个URL排名的关键词(已知的SEO问题),并显示对应的URL及其排名位置。
cannibalization只需一条命令即可发现高价值的SEO问题——大多数顾问会为此收费。bashsemrush-pp-cli cannibalization apple.com --database us --agent
Command Reference
命令参考
account — Account utilities (API units balance)
- — Get remaining API units balance (free probe; no units cost)
semrush-pp-cli account
audit — Site Audit: enable, run, list snapshots, drill into issues and pages
- — Get Site Audit campaign configuration and current status.
semrush-pp-cli audit campaign-info - — Edit Site Audit campaign settings (page limit, user-agent, scope, etc.).
semrush-pp-cli audit edit - — Enable Site Audit on a project. One-time per project. Free (config call).
semrush-pp-cli audit enable - — Site Audit snapshots history (time series of issue counts and score).
semrush-pp-cli audit history - — Detailed report for one issue in a snapshot (affected pages, status).
semrush-pp-cli audit issue - — Get text descriptions for all Site Audit issue codes. Free.
semrush-pp-cli audit issue-catalog - — Get full details for one crawled page (issues found, status, metrics).
semrush-pp-cli audit page - — Look up the page_id for a given URL within a snapshot.
semrush-pp-cli audit page-by-url - — Trigger a new Site Audit crawl. Free to launch; counts against page-credit pool.
semrush-pp-cli audit run - — Get aggregated counts for a snapshot (errors/warnings/notices, total checks).
semrush-pp-cli audit snapshot-info - — List Site Audit snapshots for a project. Free (no API units).
semrush-pp-cli audit snapshots
backlink — Backlinks: overview, list, referring domains/IPs, anchors, competitors, history
- — Anchors. 40 units/line. Anchor texts used in backlinks pointing at a target.
semrush-pp-cli backlink anchors - — Authority Score profile. 40 units/request. Snapshot of Semrush Authority Score (AS) for a target.
semrush-pp-cli backlink authority-score - — Categories. 40 units/line. Subject-matter categories of referring domains.
semrush-pp-cli backlink categories - — Categories profile. 40 units/request. Subject-matter categories of a target with confidence ratings.
semrush-pp-cli backlink categories-profile - — Batch Comparison. 40 units/request per domain. Side-by-side backlink stats for up to 200 domains.
semrush-pp-cli backlink compare-batch - — Comparison by Referring Domains. 40 units/line. Which refdomains link to multiple targets (matrix).
semrush-pp-cli backlink compare-refdomains - — Backlink Competitors. 40 units/line. Domains with similar backlink profiles to the target.
semrush-pp-cli backlink competitors - — Referring Domains by Country. 40 units/line. Country distribution of referring domains.
semrush-pp-cli backlink geo - — Historical data (Backlinks). 40 units/line. Time series of backlink/refdomain counts and AS.
semrush-pp-cli backlink history - — Indexed Pages. 40 units/line. Pages on the target receiving backlinks.
semrush-pp-cli backlink indexed-pages - — Backlinks. 40 units/line. Individual backlinks pointing at a target.
semrush-pp-cli backlink list - — Backlinks Overview. 40 units/request. Total backlinks, refdomains, refips, follow ratio, AS.
semrush-pp-cli backlink overview - — Referring Domains. 40 units/line. Deduped domains linking to a target.
semrush-pp-cli backlink referring-domains - — Referring IPs. 40 units/line. Deduped IP addresses hosting referring domains.
semrush-pp-cli backlink referring-ips - — TLD Distribution. 40 units/line. Distribution of referring domains by TLD.
semrush-pp-cli backlink tld
domain — Domain analytics: overview, organic/paid keywords, competitors, pages, ad history
- — Domain Ads Copies. 20 units/line. Unique ad creatives a domain has run (title + description).
semrush-pp-cli domain ad-copies - — Domain Ad History. 100 units/line. 12-month archive of ad copies a domain ran for paid keywords.
semrush-pp-cli domain ad-history - — Domain vs. Domain. 80 units/line. Side-by-side keyword overlap between 2-5 domains.
semrush-pp-cli domain compare - — Competitors in Organic Search. 40 units/line. Domains sharing organic keywords with the target.
semrush-pp-cli domain competitors-organic - — Competitors in Paid Search. 40 units/line. Domains overlapping the target's Google Ads keyword set.
semrush-pp-cli domain competitors-paid - — PLA Competitors. 40 units/line. Domains overlapping the target's Google Shopping PLA keyword set.
semrush-pp-cli domain competitors-pla - — Domain Organic Search Keywords. 30 units/line. Keywords a domain ranks for in Google's top 100 organic results.
semrush-pp-cli domain organic-keywords - — Domain Organic Pages. 30 units/line. Top organic landing pages on a domain by traffic.
semrush-pp-cli domain organic-pages - — Domain Overview (one database). 10 units/line. Live or historical rankings in one regional database.
semrush-pp-cli domain overview - — Domain Overview (all databases). 10 units/line. ~140 lines covering every regional database.
semrush-pp-cli domain overview-all - — Domain Overview (history). 10 units/line. Monthly historical rankings for one database (back to 2012-2016).
semrush-pp-cli domain overview-history - — Domain Paid Search Keywords. 30 units/line. Keywords a domain buys in Google Ads.
semrush-pp-cli domain paid-keywords - — Domain PLA Copies. 20 units/line. Unique PLA ad creatives (title, price, shop).
semrush-pp-cli domain pla-copies - — Domain PLA Search Keywords. 30 units/line. Google Shopping PLA keywords for a domain.
semrush-pp-cli domain pla-keywords - — Domain Organic Subdomains. 30 units/line. Subdomains of a domain ranked by organic traffic.
semrush-pp-cli domain subdomains
keyword — Keyword research reports (volume, difficulty, related, SERP, ad history)
- — Keyword Ads History. 100 units/line. 12-month archive of advertisers who bid on the keyword.
semrush-pp-cli keyword ads-history - — Batch Keyword Overview. 10 units/line. Up to 100 keywords in one call.
semrush-pp-cli keyword batch - — Broad Match Keywords. 20 units/line. Phrase-match variants of a seed term.
semrush-pp-cli keyword broad-match - — Keyword Difficulty. 50 units/line. KDI (0-100) for one or more keywords.
semrush-pp-cli keyword difficulty - — Organic Results (SERP) for a keyword. 10 units/line. Top organic ranking URLs for a phrase.
semrush-pp-cli keyword organic-serp - — Keyword Overview (one database). 10 units/line. Single-database volume, CPC, competition, results count.
semrush-pp-cli keyword overview - — Keyword Overview (all databases). 10 units/line. ~140 rows covering every regional database.
semrush-pp-cli keyword overview-all - — Paid Results (SERP) for a keyword. 20 units/line. Advertisers bidding on the phrase.
semrush-pp-cli keyword paid-serp - — Phrase Questions. 40 units/line. Question-form keywords containing a seed phrase.
semrush-pp-cli keyword questions - — Related Keywords. 40 units/line. Keywords semantically related to a seed phrase.
semrush-pp-cli keyword related
project — Manage Semrush Projects (containers for Position Tracking, Site Audit, Listings)
- — Create a new Semrush project (container) with a name and root domain.
semrush-pp-cli project create - — Delete a project. CLI requires --yes to confirm; otherwise dry-runs.
semrush-pp-cli project delete - — Get a single project by ID. Free (no API units).
semrush-pp-cli project get - — List all projects on your account. Free (no API units).
semrush-pp-cli project list - — Update an existing project's name/url.
semrush-pp-cli project update
subdomain — Subdomain analytics: overview, organic/paid keywords, pages
- — Subdomain Organic Search Keywords. 30 units/line.
semrush-pp-cli subdomain organic-keywords - — Subdomain Organic Pages. 30 units/line.
semrush-pp-cli subdomain organic-pages - — Subdomain Overview (one database). 10 units/line.
semrush-pp-cli subdomain overview - — Subdomain Overview (all databases). 10 units/line.
semrush-pp-cli subdomain overview-all - — Subdomain Overview (history). 10 units/line. Monthly historical rankings.
semrush-pp-cli subdomain overview-history - — Subdomain Paid Search Keywords. 30 units/line.
semrush-pp-cli subdomain paid-keywords
subfolder — Subfolder analytics: overview, organic/paid keywords, pages
- — Subfolder Organic Search Keywords. 30 units/line.
semrush-pp-cli subfolder organic-keywords - — Subfolder Organic Pages. 30 units/line.
semrush-pp-cli subfolder organic-pages - — Subfolder Organic Pages (unique). 30 units/line. Unique top organic landing pages within a subfolder.
semrush-pp-cli subfolder organic-pages-unique - — Subfolder Overview (one database). 10 units/line.
semrush-pp-cli subfolder overview - — Subfolder Overview (all databases). 10 units/line.
semrush-pp-cli subfolder overview-all - — Subfolder Overview (history). 10 units/line. Monthly historical rankings.
semrush-pp-cli subfolder overview-history - — Subfolder Paid Search Keywords. 30 units/line.
semrush-pp-cli subfolder paid-keywords
tracking — Position Tracking: create campaign, manage keywords/tags/competitors, organic and paid reports
- — List Position Tracking campaigns under a project. Use this to find the campaign_id.
semrush-pp-cli tracking campaigns - — Add competitors to an existing Position Tracking campaign.
semrush-pp-cli tracking competitors-add - — Remove competitors from an existing Position Tracking campaign.
semrush-pp-cli tracking competitors-remove - — Create a Position Tracking campaign on a project.
semrush-pp-cli tracking create - — Available snapshot dates for a tracking campaign (used by --snapshot flag elsewhere).
semrush-pp-cli tracking dates - — Disable weekly status emails for a Position Tracking campaign.
semrush-pp-cli tracking emails-disable - — Enable weekly status emails for a Position Tracking campaign.
semrush-pp-cli tracking emails-enable - — Add keywords to an existing Position Tracking campaign.
semrush-pp-cli tracking keywords-add - — Remove keywords from an existing Position Tracking campaign.
semrush-pp-cli tracking keywords-remove - — Universal location search (returns location IDs for cities/regions/countries).
semrush-pp-cli tracking location-search - — Organic competitors discovery (auto-detected competitors ranked across the tracked keyword set).
semrush-pp-cli tracking organic-competitors - — Top organic landing pages by tracked-keyword traffic.
semrush-pp-cli tracking organic-landings - — Organic overview report (visibility, estimated traffic, average position over a date range).
semrush-pp-cli tracking organic-overview - — Per-keyword organic positions report. Supports tag filters and competitor comparison.
semrush-pp-cli tracking organic-positions - — Organic visibility (Share-of-Voice) index over a date range.
semrush-pp-cli tracking organic-visibility - — AdWords competitors discovery (auto-detected paid competitors).
semrush-pp-cli tracking paid-competitors - — Top paid (AdWords) landing pages by tracked-keyword traffic.
semrush-pp-cli tracking paid-landings - — AdWords overview report (paid visibility, estimated traffic over a date range).
semrush-pp-cli tracking paid-overview - — Per-keyword paid (AdWords) positions report.
semrush-pp-cli tracking paid-positions - — AdWords visibility (Share-of-Voice) index over a date range.
semrush-pp-cli tracking paid-visibility - — Add tags to existing keywords in a Position Tracking campaign.
semrush-pp-cli tracking tags-add - — Remove tags from existing keywords in a Position Tracking campaign.
semrush-pp-cli tracking tags-remove
url — URL-level analytics: overview, organic/paid keywords
- — URL Organic Search Keywords. 30 units/line. Keywords this URL ranks for organically.
semrush-pp-cli url organic-keywords - — URL Overview (one database). 10 units/line.
semrush-pp-cli url overview - — URL Overview (all databases). 10 units/line.
semrush-pp-cli url overview-all - — URL Overview (history). 10 units/line. Monthly historical rankings for a URL.
semrush-pp-cli url overview-history - — URL Paid Search Keywords. 30 units/line. Keywords this URL has been advertised against.
semrush-pp-cli url paid-keywords
account — 账户工具(API单元余额)
- — 获取剩余API单元余额(免费查询;不消耗单元)
semrush-pp-cli account
audit — 站点审计:启用、运行、列出快照、深入查看问题和页面
- — 获取Site Audit活动配置和当前状态。
semrush-pp-cli audit campaign-info - — 编辑Site Audit活动设置(页面限制、用户代理、范围等)。
semrush-pp-cli audit edit - — 在项目上启用Site Audit。每个项目仅需执行一次。免费(配置调用)。
semrush-pp-cli audit enable - — Site Audit快照历史(问题数量和分数的时间序列)。
semrush-pp-cli audit history - — 快照中单个问题的详细报告(受影响页面、状态)。
semrush-pp-cli audit issue - — 获取所有Site Audit问题代码的文本描述。免费。
semrush-pp-cli audit issue-catalog - — 获取单个已爬取页面的完整详情(发现的问题、状态、指标)。
semrush-pp-cli audit page - — 在快照中查找给定URL对应的page_id。
semrush-pp-cli audit page-by-url - — 触发新的Site Audit爬取。启动免费;消耗页面积分池中的积分。
semrush-pp-cli audit run - — 获取快照的汇总统计(错误/警告/通知数量、总检查项)。
semrush-pp-cli audit snapshot-info - — 列出项目的所有Site Audit快照。免费(不消耗API单元)。
semrush-pp-cli audit snapshots
backlink — 反向链接:概览、列表、引荐域名/IP、锚文本、竞品、历史
- — 锚文本。40单元/行。指向目标的反向链接中使用的锚文本。
semrush-pp-cli backlink anchors - — 权威分数概况。40单元/请求。目标的Semrush权威分数(AS)快照。
semrush-pp-cli backlink authority-score - — 分类。40单元/行。引荐域名的主题分类。
semrush-pp-cli backlink categories - — 分类概况。40单元/请求。目标的主题分类及置信度评级。
semrush-pp-cli backlink categories-profile - — 批量对比。40单元/请求/域名。最多200个域名的反向链接统计对比。
semrush-pp-cli backlink compare-batch - — 按引荐域名对比。40单元/行。哪些引荐域名链接到多个目标(矩阵形式)。
semrush-pp-cli backlink compare-refdomains - — 反向链接竞品。40单元/行。与目标反向链接概况相似的域名。
semrush-pp-cli backlink competitors - — 按国家划分的引荐域名。40单元/行。引荐域名的国家分布。
semrush-pp-cli backlink geo - — 历史数据(反向链接)。40单元/行。反向链接/引荐域名数量和AS的时间序列。
semrush-pp-cli backlink history - — 已索引页面。40单元/行。目标上接收反向链接的页面。
semrush-pp-cli backlink indexed-pages - — 反向链接列表。40单元/行。指向目标的单个反向链接。
semrush-pp-cli backlink list - — 反向链接概览。40单元/请求。总反向链接数、引荐域名数、引荐IP数、跟随比例、AS。
semrush-pp-cli backlink overview - — 引荐域名。40单元/行。链接到目标的去重域名。
semrush-pp-cli backlink referring-domains - — 引荐IP。40单元/行。托管引荐域名的去重IP地址。
semrush-pp-cli backlink referring-ips - — TLD分布。40单元/行。引荐域名按顶级域名的分布情况。
semrush-pp-cli backlink tld
domain — 域名分析:概览、自然/付费关键词、竞品、页面、广告历史
- — 域名广告文案。20单元/行。域名投放过的独特广告创意(标题+描述)。
semrush-pp-cli domain ad-copies - — 域名广告历史。100单元/行。域名针对付费关键词投放的广告文案的12个月存档。
semrush-pp-cli domain ad-history - — 域名对比。80单元/行。2-5个域名之间的关键词重叠情况对比。
semrush-pp-cli domain compare - — 自然搜索竞品。40单元/行。与目标共享自然关键词的域名。
semrush-pp-cli domain competitors-organic - — 付费搜索竞品。40单元/行。与目标的Google Ads关键词集重叠的域名。
semrush-pp-cli domain competitors-paid - — PLA竞品。40单元/行。与目标的Google Shopping PLA关键词集重叠的域名。
semrush-pp-cli domain competitors-pla - — 域名自然搜索关键词。30单元/行。域名在Google自然搜索前100名中排名的关键词。
semrush-pp-cli domain organic-keywords - — 域名自然页面。30单元/行。域名上按流量排名的顶级自然着陆页。
semrush-pp-cli domain organic-pages - — 域名概览(单个数据库)。10单元/行。单个区域数据库中的实时或历史排名。
semrush-pp-cli domain overview - — 域名概览(所有数据库)。10单元/行。覆盖所有区域数据库的约140行数据。
semrush-pp-cli domain overview-all - — 域名概览(历史)。10单元/行。单个数据库的月度历史排名(可追溯至2012-2016年)。
semrush-pp-cli domain overview-history - — 域名付费搜索关键词。30单元/行。域名在Google Ads中购买的关键词。
semrush-pp-cli domain paid-keywords - — 域名PLA广告文案。20单元/行。独特的PLA广告创意(标题、价格、店铺)。
semrush-pp-cli domain pla-copies - — 域名PLA搜索关键词。30单元/行。域名的Google Shopping PLA关键词。
semrush-pp-cli domain pla-keywords - — 域名自然子域名。30单元/行。按自然流量排名的域名子域名。
semrush-pp-cli domain subdomains
keyword — 关键词研究报告(搜索量、难度、相关词、SERP、广告历史)
- — 关键词广告历史。100单元/行。竞价该关键词的广告主的12个月存档。
semrush-pp-cli keyword ads-history - — 批量关键词概览。10单元/行。一次调用最多处理100个关键词。
semrush-pp-cli keyword batch - — 广泛匹配关键词。20单元/行。种子词的短语匹配变体。
semrush-pp-cli keyword broad-match - — 关键词难度。50单元/行。一个或多个关键词的KDI(0-100)。
semrush-pp-cli keyword difficulty - — 关键词自然搜索结果(SERP)。10单元/行。短语的顶级自然排名URL。
semrush-pp-cli keyword organic-serp - — 关键词概览(单个数据库)。10单元/行。单个数据库中的搜索量、CPC、竞争度、结果数。
semrush-pp-cli keyword overview - — 关键词概览(所有数据库)。10单元/行。覆盖所有区域数据库的约140行数据。
semrush-pp-cli keyword overview-all - — 关键词付费搜索结果(SERP)。20单元/行。竞价该短语的广告主。
semrush-pp-cli keyword paid-serp - — 短语类问题。40单元/行。包含种子短语的问句形式关键词。
semrush-pp-cli keyword questions - — 相关关键词。40单元/行。与种子短语语义相关的关键词。
semrush-pp-cli keyword related
project — 管理Semrush项目(Position Tracking、Site Audit、Listings的容器)
- — 创建新的Semrush项目(容器),指定名称和根域名。
semrush-pp-cli project create - — 删除项目。CLI需要--yes参数确认;否则仅执行试运行。
semrush-pp-cli project delete - — 通过ID获取单个项目。免费(不消耗API单元)。
semrush-pp-cli project get - — 列出账户中的所有项目。免费(不消耗API单元)。
semrush-pp-cli project list - — 更新现有项目的名称/URL。
semrush-pp-cli project update
subdomain — 子域名分析:概览、自然/付费关键词、页面
- — 子域名自然搜索关键词。30单元/行。
semrush-pp-cli subdomain organic-keywords - — 子域名自然页面。30单元/行。
semrush-pp-cli subdomain organic-pages - — 子域名概览(单个数据库)。10单元/行。
semrush-pp-cli subdomain overview - — 子域名概览(所有数据库)。10单元/行。
semrush-pp-cli subdomain overview-all - — 子域名概览(历史)。10单元/行。月度历史排名。
semrush-pp-cli subdomain overview-history - — 子域名付费搜索关键词。30单元/行。
semrush-pp-cli subdomain paid-keywords
subfolder — 子文件夹分析:概览、自然/付费关键词、页面
- — 子文件夹自然搜索关键词。30单元/行。
semrush-pp-cli subfolder organic-keywords - — 子文件夹自然页面。30单元/行。
semrush-pp-cli subfolder organic-pages - — 子文件夹自然页面(唯一)。30单元/行。子文件夹内唯一的顶级自然着陆页。
semrush-pp-cli subfolder organic-pages-unique - — 子文件夹概览(单个数据库)。10单元/行。
semrush-pp-cli subfolder overview - — 子文件夹概览(所有数据库)。10单元/行。
semrush-pp-cli subfolder overview-all - — 子文件夹概览(历史)。10单元/行。月度历史排名。
semrush-pp-cli subfolder overview-history - — 子文件夹付费搜索关键词。30单元/行。
semrush-pp-cli subfolder paid-keywords
tracking — 排名追踪:创建活动、管理关键词/标签/竞品、自然和付费报告
- — 列出项目下的Position Tracking活动。用于查找campaign_id。
semrush-pp-cli tracking campaigns - — 向现有Position Tracking活动添加竞品。
semrush-pp-cli tracking competitors-add - — 从现有Position Tracking活动中移除竞品。
semrush-pp-cli tracking competitors-remove - — 在项目上创建Position Tracking活动。
semrush-pp-cli tracking create - — 追踪活动的可用快照日期(供其他命令的--snapshot参数使用)。
semrush-pp-cli tracking dates - — 禁用Position Tracking活动的每周状态邮件。
semrush-pp-cli tracking emails-disable - — 启用Position Tracking活动的每周状态邮件。
semrush-pp-cli tracking emails-enable - — 向现有Position Tracking活动添加关键词。
semrush-pp-cli tracking keywords-add - — 从现有Position Tracking活动中移除关键词。
semrush-pp-cli tracking keywords-remove - — 通用位置搜索(返回城市/地区/国家的位置ID)。
semrush-pp-cli tracking location-search - — 自然竞品发现(自动检测在追踪关键词集中排名的竞品)。
semrush-pp-cli tracking organic-competitors - — 按追踪关键词流量排名的顶级自然着陆页。
semrush-pp-cli tracking organic-landings - — 自然搜索概览报告(可见度、预估流量、指定日期范围内的平均排名)。
semrush-pp-cli tracking organic-overview - — 按关键词的自然排名报告。支持标签筛选和竞品对比。
semrush-pp-cli tracking organic-positions - — 指定日期范围内的自然搜索可见度(声量份额)指数。
semrush-pp-cli tracking organic-visibility - — AdWords竞品发现(自动检测付费竞品)。
semrush-pp-cli tracking paid-competitors - — 按追踪关键词流量排名的顶级付费(AdWords)着陆页。
semrush-pp-cli tracking paid-landings - — AdWords概览报告(付费可见度、指定日期范围内的预估流量)。
semrush-pp-cli tracking paid-overview - — 按关键词的付费(AdWords)排名报告。
semrush-pp-cli tracking paid-positions - — 指定日期范围内的AdWords可见度(声量份额)指数。
semrush-pp-cli tracking paid-visibility - — 向Position Tracking活动中的现有关键词添加标签。
semrush-pp-cli tracking tags-add - — 从Position Tracking活动中的现有关键词移除标签。
semrush-pp-cli tracking tags-remove
url — URL级分析:概览、自然/付费关键词
- — URL自然搜索关键词。30单元/行。该URL自然排名的关键词。
semrush-pp-cli url organic-keywords - — URL概览(单个数据库)。10单元/行。
semrush-pp-cli url overview - — URL概览(所有数据库)。10单元/行。
semrush-pp-cli url overview-all - — URL概览(历史)。10单元/行。URL的月度历史排名。
semrush-pp-cli url overview-history - — URL付费搜索关键词。30单元/行。该URL投放广告所针对的关键词。
semrush-pp-cli url paid-keywords
Freshness Contract
新鲜度协议
This printed CLI owns bounded freshness only for registered store-backed read command paths. In mode, those paths check and may run a bounded refresh before reading local data. never refreshes. reads the API and does not mutate the local store. Set to skip the freshness hook without changing source selection.
--data-source autosync_state--data-source local--data-source liveSEMRUSH_NO_AUTO_REFRESH=1Covered paths:
semrush-pp-cli projectsemrush-pp-cli project getsemrush-pp-cli project list
When JSON output uses the generated provenance envelope, freshness metadata appears at . Treat it as current-cache freshness for the covered command path, not a guarantee of complete historical backfill or API-specific enrichment.
meta.freshness本打印版CLI仅对已注册的存储支持型读取命令路径提供有限新鲜度保障。在模式下,这些路径会检查,并可能在读取本地数据前执行有限刷新。模式从不刷新。模式读取API且不修改本地存储。设置可跳过新鲜度钩子,无需更改数据源选择。
--data-source autosync_state--data-source local--data-source liveSEMRUSH_NO_AUTO_REFRESH=1覆盖的路径:
semrush-pp-cli projectsemrush-pp-cli project getsemrush-pp-cli project list
当JSON输出使用生成的来源信封时,新鲜度元数据会出现在字段中。将其视为对应命令路径的当前缓存新鲜度,而非完整历史回填或API特定增强的保证。
meta.freshnessFinding the right command
查找合适的命令
When you know what you want to do but not which command does it, ask the CLI directly:
bash
semrush-pp-cli which "<capability in your own words>"which02--help当您知道要做什么但不知道对应的命令时,可直接询问CLI:
bash
semrush-pp-cli which "<用您自己的语言描述功能>"which02--helpRecipes
使用示例
Monday baseline + Friday diff
周一基准 + 周五对比
bash
semrush-pp-cli snapshot tag monday-baselineAfter syncing your tracked domains and keywords, tag the snapshot. Re-sync on Friday and run to see the week`s movement.
snapshot diff monday-baseline todaybash
semrush-pp-cli snapshot tag monday-baseline同步您的追踪域名和关键词后,为快照添加标签。周五重新同步后,运行查看本周的变化。
snapshot diff monday-baseline todayFind keyword opportunities your competitor ranks for
查找竞品排名的关键词机会
bash
semrush-pp-cli keyword gap myco.com competitor.com --database us --kd-max 40 --json --select phrase,nq,kdSet-difference query in one shot — narrowed to keywords with realistic difficulty that the competitor ranks for but you don't.
bash
semrush-pp-cli keyword gap myco.com competitor.com --database us --kd-max 40 --json --select phrase,nq,kd一次完成差异集查询——筛选出竞品排名但您未排名的、难度合理的关键词。
Build a link-prospect list from a competitor
从竞品构建链接 prospect 列表
bash
semrush-pp-cli backlink gap myco.com competitor.com --min-ascore 70 --json --select domain,domain_ascore,backlinks_numAuthority-70+ referring domains linking to the competitor but not to you, ready to pipe into an outreach workflow.
bash
semrush-pp-cli backlink gap myco.com competitor.com --min-ascore 70 --json --select domain,domain_ascore,backlinks_num获取权威分数≥70的、链接到竞品但未链接到您的引荐域名,可直接传入外联工作流。
Triage the latest Site Audit
优先级排序最新的站点审计结果
bash
semrush-pp-cli audit triage 12345 --top 20 --agentOnce a Site Audit snapshot exists, get the 20 highest-impact pages weighted by errors x3 + warnings x1 + notices x0.1.
bash
semrush-pp-cli audit triage 12345 --top 20 --agent当Site Audit快照存在时,获取按错误×3 + 警告×1 + 通知×0.1加权的前20个影响最大的页面。
Where did this month's credits go
本月积分去向
bash
semrush-pp-cli budget --since 30d --group-by command --agentLocal credit_log rolled up by command; surfaces the top spenders so you can throttle or cache them.
bash
semrush-pp-cli budget --since 30d --group-by command --agent按命令汇总本地credit_log;显示消耗最高的命令,以便您进行限流或缓存。
Auth Setup
认证设置
Set from your Subscription Info → API Units page. The CLI uses the same v3 query-param auth as the official docs and the free balance endpoint as its doctor check, so you never spend credits to verify the key works.
SEMRUSH_API_KEYRun to verify setup.
semrush-pp-cli doctor从您的“订阅信息 → API单元”页面获取并设置。CLI使用与官方文档相同的v3查询参数认证方式,并将免费余额端点作为健康检查,因此您无需消耗积分即可验证密钥是否有效。
SEMRUSH_API_KEY运行验证设置是否正确。
semrush-pp-cli doctorAgent Mode
Agent模式
Add to any command. Expands to: .
--agent--json --compact --no-input --no-color --yes-
Pipeable — JSON on stdout, errors on stderr
-
Filterable —keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
--selectbashsemrush-pp-cli backlink list mock-value --type example-value --agent --select id,name,status -
Previewable —shows the request without sending
--dry-run -
Offline-friendly — sync/search commands can use the local SQLite store when available
-
Non-interactive — never prompts, every input is a flag
-
Explicit retries — useonly when an already-existing create should count as success, and
--idempotentonly when a missing delete target should count as success--ignore-missing
在任何命令后添加参数。该参数等价于:。
--agent--json --compact --no-input --no-color --yes-
可管道传输 — 标准输出为JSON,错误输出到标准错误
-
可筛选 —参数保留字段子集。点路径可深入嵌套结构;数组可遍历元素。对于冗长的API,这是保持上下文简洁的关键:
--selectbashsemrush-pp-cli backlink list mock-value --type example-value --agent --select id,name,status -
可预览 —参数显示请求但不发送
--dry-run -
离线友好 — 同步/搜索命令在可用时可使用本地SQLite存储
-
非交互式 — 从不提示,所有输入均通过标志参数提供
-
显式重试 — 仅当已存在的创建操作应视为成功时使用参数;仅当缺失的删除目标应视为成功时使用
--idempotent参数--ignore-missing
Response envelope
响应信封
Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}Parse for data and to know whether it's live or local. A human-readable summary is printed to stderr only when stdout is a terminal AND no machine-format flag (, , , , , ) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.
.results.meta.sourceN results (live)--json--csv--compact--quiet--plain--select从本地存储或API读取数据的命令会将输出包装在来源信封中:
json
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}解析字段获取数据,字段表示数据是实时的还是本地的。仅当标准输出为终端且未设置任何机器格式标志(, , , , , )时,才会将人类可读的摘要打印到标准错误——管道/Agent消费者和显式格式运行时,标准输出仅为纯JSON。
.results.meta.source--json--csv--compact--quiet--plain--selectN results (live)Agent Feedback
Agent反馈
When you (or the agent) notice something off about this CLI, record it:
semrush-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
semrush-pp-cli feedback --stdin < notes.txt
semrush-pp-cli feedback list --json --limit 10Entries are stored locally at . They are never POSTed unless is set AND either is passed or . Default behavior is local-only.
~/.local/share/semrush-pp-cli/feedback.jsonlSEMRUSH_FEEDBACK_ENDPOINT--sendSEMRUSH_FEEDBACK_AUTO_SEND=trueWrite what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当您(或Agent)发现本CLI存在问题时,请记录反馈:
semrush-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
semrush-pp-cli feedback --stdin < notes.txt
semrush-pp-cli feedback list --json --limit 10反馈条目存储在本地文件中。仅当设置了且传递了参数或设置了时,才会将反馈POST到指定端点。默认行为仅存储在本地。
~/.local/share/semrush-pp-cli/feedback.jsonlSEMRUSH_FEEDBACK_ENDPOINT--sendSEMRUSH_FEEDBACK_AUTO_SEND=true请记录让您感到意外的内容,而非提交bug报告。简短、具体、一行内容:这才是有价值的反馈。
Output Delivery
输出交付
Every command accepts . The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
--deliver <sink>| Sink | Effect |
|---|---|
| Default; write to stdout only |
| Atomically write output to |
| POST the output body to the URL ( |
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
每个命令都支持参数。输出会发送到指定的sink,同时(或替代)输出到标准输出,以便Agent无需手动管道即可路由命令结果。支持三种sink:
--deliver <sink>| Sink | 效果 |
|---|---|
| 默认;仅输出到标准输出 |
| 原子性地将输出写入 |
| 将输出主体POST到指定URL( |
未知的scheme会被拒绝,并返回结构化错误,列出支持的类型。Webhook失败时返回非零退出码,并在标准错误中记录URL和HTTP状态码。
Named Profiles
命名配置文件
A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
semrush-pp-cli profile save briefing --json
semrush-pp-cli --profile briefing backlink list mock-value --type example-value
semrush-pp-cli profile list --json
semrush-pp-cli profile show briefing
semrush-pp-cli profile delete briefing --yesExplicit flags always win over profile values; profile values win over defaults. lists all available profiles under so introspecting agents discover them at runtime.
agent-contextavailable_profiles配置文件是一组保存的标志值,可在多次调用中复用。当定时Agent每次运行都使用相同配置调用同一命令时,适合使用此功能——即HeyGen的“Beacon”模式。
semrush-pp-cli profile save briefing --json
semrush-pp-cli --profile briefing backlink list mock-value --type example-value
semrush-pp-cli profile list --json
semrush-pp-cli profile show briefing
semrush-pp-cli profile delete briefing --yes显式标志始终优先于配置文件值;配置文件值优先于默认值。命令会在字段下列出所有可用配置文件,以便自省Agent在运行时发现它们。
agent-contextavailable_profilesExit Codes
退出码
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (wrong arguments) |
| 3 | Resource not found |
| 4 | Authentication required |
| 5 | API error (upstream issue) |
| 7 | Rate limited (wait and retry) |
| 10 | Config error |
| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 2 | 使用错误(参数错误) |
| 3 | 资源未找到 |
| 4 | 需要认证 |
| 5 | API错误(上游问题) |
| 7 | 速率限制(请等待后重试) |
| 10 | 配置错误 |
Argument Parsing
参数解析
Parse :
$ARGUMENTS- Empty, , or
help→ show--helpoutputsemrush-pp-cli --help - Starts with → ends with
install→ MCP installation; otherwise → see Prerequisites abovemcp - Anything else → Direct Use (execute as CLI command with )
--agent
解析的规则:
$ARGUMENTS- 为空、或
help→ 显示--help输出semrush-pp-cli --help - 以开头 → 若以
install结尾 → MCP安装;否则 → 参见上方的前提条件mcp - 其他情况 → 直接使用(以参数执行CLI命令)
--agent
MCP Server Installation
MCP服务器安装
- Install the MCP server:
bash
go install github.com/mvanhorn/printing-press-library/library/marketing/semrush/cmd/semrush-pp-mcp@latest - Register with Claude Code:
bash
claude mcp add semrush-pp-mcp -- semrush-pp-mcp - Verify:
claude mcp list
- 安装MCP服务器:
bash
go install github.com/mvanhorn/printing-press-library/library/marketing/semrush/cmd/semrush-pp-mcp@latest - 在Claude Code中注册:
bash
claude mcp add semrush-pp-mcp -- semrush-pp-mcp - 验证:
claude mcp list
Direct Use
直接使用
- Check if installed: If not found, offer to install (see Prerequisites at the top of this skill).
which semrush-pp-cli - Match the user query to the best command from the Unique Capabilities and Command Reference above.
- Execute with the flag:
--agentbashsemrush-pp-cli <command> [subcommand] [args] --agent - If ambiguous, drill into subcommand help: .
semrush-pp-cli <command> --help
- 检查是否已安装:若未找到,提供安装选项(参见顶部的前提条件)。
which semrush-pp-cli - 将用户查询与上方“独特功能”和“命令参考”中的最佳命令匹配。
- 带参数执行:
--agentbashsemrush-pp-cli <command> [subcommand] [args] --agent - 若存在歧义,查看子命令帮助:。
semrush-pp-cli <command> --help