关于 seo-domain-analyzer
seo-domain-analyzer 是用于评估网站 SEO 表现的命令行技能,面向营销和 SEO 分析工作。它汇总 Semrush、Ahrefs 与 Google 搜索数据,并可在 Apify 不可用时改用免费网页搜索探测。
主要功能
- 01汇总权威度、流量与关键词指标
- 02分析反向链接和引荐域名
- 03验证关键词的 Google 排名
- 04发现竞争对手并进行比较
- 05生成 JSON 与 Markdown 报告
适用场景
- 01评估域名的自然搜索表现
- 02核实指定关键词的搜索排名
- 03比较目标网站与竞争对手
- 04Apify 不可用时生成基础 SEO 报告
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ gooseworks-ai/ goose-skills --skill seo-domain-analyzer安装后在 Claude Code 中输入/seo-domain-analyzer确认已加载。
附带文件scripts/analyze_domain.pyskill.meta.json
详细介绍
SEO 域名分析器
获取任意域名的真实 SEO 表现数据,无需订阅 Semrush 或 Ahrefs。使用 Apify Actor 抓取 Semrush/Ahrefs 公开页面,获取权威度评分、流量估算、关键词排名、反向链接资料和竞争对手信息。
快速开始
# Basic domain analysis
python3 scripts/analyze_domain.py --domain "example.com"
# With competitor comparison
python3 scripts/analyze_domain.py \
--domain "example.com" \
--competitors "competitor1.com,competitor2.com,competitor3.com"
# Check specific keywords
python3 scripts/analyze_domain.py \
--domain "example.com" \
--keywords "cloud cost optimization,reduce aws bill,finops tools"
# Save output
python3 scripts/analyze_domain.py \
--domain "example.com" --output seo-profile.json
输入
| 参数 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| domain | 是 | — | 要分析的域名(例如,“example.com”) |
| competitors | 否 | 自动发现 | 以逗号分隔的竞争对手域名 |
| keywords | 否 | 自动推断 | 要检查排名的特定关键词 |
| output | 否 | stdout | 保存 JSON 输出的路径 |
| skip-backlinks | 否 | false | 跳过 Ahrefs 反向链接分析(节省约 $0.10) |
成本
| 数据来源 | Apify Actor | 预估成本 |
|---|---|---|
| 域名概览(Semrush) | devnaz/semrush-scraper | 约 $0.10/域名 |
| 反向链接资料(Ahrefs) | radeance/ahrefs-scraper | 约 $0.10/域名 |
| 关键词排名检查 | apify/google-search-scraper | 约 $0.002/关键词 |
| 典型完整运行 | 约 $0.50-1.00 | |
| 含 3 个竞争对手 | 约 $1.50-3.00 |
流程
阶段 1:域名概览(Semrush 数据)
使用 Apify Actor devnaz/semrush-scraper 获取:
# Actor: devnaz/semrush-scraper
# Input: domain URL
{
"urls": ["https://example.com"]
}
提取的指标:
- 权威度评分(0-100)
- 自然搜索月流量估算
- 自然关键词数量(该域名排名的关键词数量)
- 付费流量估算(如有)
- 反向链接数量(Semrush 统计值)
- 引用域名数量
- 热门自然关键词(关键词、排名、流量占比)
- 主要竞争对手(按关键词重合度排列的竞争域名)
- 流量趋势(月环比变化方向)
阶段 2:反向链接资料(Ahrefs 数据)
使用 Apify Actor radeance/ahrefs-scraper 获取:
# Actor: radeance/ahrefs-scraper
# Input: domain for backlink analysis
{
"urls": ["https://example.com"],
"mode": "domain-overview"
}
提取的指标:
- 域名评级(DR)(0-100)
- 首页的 URL 评级
- 引用域名数量及趋势
- 反向链接总数
- 主要引用域名(哪些网站链接到该域名)
- 锚文本分布(品牌词、关键词与通用文本的占比)
- Dofollow 与 nofollow 比例
阶段 3:关键词排名验证
对于特定关键词(用户提供或根据阶段 1 自动推断),使用 Google 搜索验证实际排名:
# Actor: apify/google-search-scraper
# Input: keyword queries
{
"queries": "cloud cost optimization",
"maxPagesPerQuery": 1,
"resultsPerPage": 10,
"countryCode": "us",
"languageCode": "en"
}
对于每个关键词:
- 目标域名是否出现在前 10 名?
- 排名是多少?
- 哪个具体 URL 排名?
- 还有哪些网站排名?(该关键词的竞争格局)
关键词来源(按优先级排列):
- 用户提供的关键词
- Semrush 数据中的热门自然关键词(阶段 1)
- 根据域名内容自动推断(使用 WebSearch
site:[domain]查看页面标题)
阶段 4:热门页面分析
从 Semrush 数据中提取流量最高的页面:
- URL
- 预估月流量
- 带来流量的主要关键词
- 排名关键词数量
如果 Semrush 未提供单页数据,可通过以下方式补充:
- WebSearch:搜索
site:[domain],并记录最先出现的页面(作为重要性参考) - WebSearch:搜索
site:[domain] blog,查看热门博客内容
阶段 5:发现竞争对手
通过多个来源识别竞争对手:
- Semrush 竞争对手数据(阶段 1)——争夺相同关键词的域名
- 用户提供的竞争对手——始终纳入
- Google SERP 竞争对手——根据阶段 3 的关键词检查,记录反复出现的域名
对每个竞争对手运行简化版阶段 1(仅域名概览):
- 权威度评分
- 自然流量估算
- 关键词数量
- 热门关键词
阶段 6:输出
JSON 输出
{
"domain": "example.com",
"analysis_date": "2026-02-25",
"domain_metrics": {
"semrush_authority_score": 45,
"ahrefs_domain_rating": 52,
"organic_monthly_traffic": 28500,
"organic_keywords": 1240,
"backlinks": 8930,
"referring_domains": 412,
"traffic_trend": "increasing"
},
"top_pages": [
{
"url": "https://example.com/blog/reduce-aws-costs",
"estimated_traffic": 3200,
"top_keyword": "reduce aws costs",
"ranking_keywords": 45
}
],
"keyword_rankings": [
{
"keyword": "cloud cost optimization",
"position": 4,
"url": "https://example.com/blog/cloud-cost-optimization-guide",
"serp_competitors": ["vantage.sh", "antimetal.com", "finout.io"]
}
],
"backlink_profile": {
"domain_rating": 52,
"total_backlinks": 8930,
"referring_domains": 412,
"dofollow_ratio": 0.78,
"top_referring_domains": ["techcrunch.com", "producthunt.com", ...],
"anchor_text_distribution": {
"branded": 0.45,
"keyword": 0.22,
"generic": 0.18,
"url": 0.15
}
},
"competitors": [
{
"domain": "competitor1.com",
"authority_score": 62,
"organic_traffic": 45000,
"organic_keywords": 2100,
"keyword_overlap": 340
}
]
}
Markdown 摘要(也会生成)
# SEO Domain Profile: example.com
**Date:** 2026-02-25
## Domain Metrics
| Metric | Value |
|--------|-------|
| Semrush Authority Score | 45/100 |
| Ahrefs Domain Rating | 52/100 |
| Monthly Organic Traffic | ~28,500 |
| Organic Keywords | 1,240 |
| Backlinks | 8,930 |
| Referring Domains | 412 |
| Traffic Trend | Increasing |
## Top Performing Pages
| # | URL | Est. Traffic | Top Keyword |
|---|-----|-------------|-------------|
| 1 | /blog/reduce-aws-costs | 3,200 | reduce aws costs |
| ... |
## Keyword Rankings
| Keyword | Position | URL | SERP Competitors |
|---------|----------|-----|-----------------|
| cloud cost optimization | #4 | /blog/cloud-cost... | vantage.sh, antimetal.com |
| ... |
## Backlink Profile
- Domain Rating: 52/100
- Referring Domains: 412
- Dofollow Ratio: 78%
- Top linking sites: TechCrunch, Product Hunt, ...
## Competitor Comparison
| Domain | Authority | Traffic | Keywords | Overlap |
|--------|-----------|---------|----------|---------|
| example.com | 45 | 28.5K | 1,240 | — |
| competitor1.com | 62 | 45K | 2,100 | 340 |
| ... |
提示
- Semrush 抓取的数据质量参差不齐。 Apify actors 会抓取公开的 Semrush 页面,这些页面向非订阅用户展示的数据有限。可以获取流量估算值和热门关键词,但每个页面的详细数据可能不完整。
- 结合 site-content-catalog,同时获取内容清单和效果数据——二者结合后,就能了解有哪些内容,以及哪些内容确实能带来流量。
- 通过 Google 验证关键词排名是最可靠的数据点。Semrush/Ahrefs 的估算可能不准确,但检查实际 SERP 能获得真实结果。
- 精简竞品分析。 对 5 个竞品进行完整的反向链接分析成本较高。通常只需查看域名概览(仅限 Semrush)进行比较。
- Apify actors 可能会失效。 它们会抓取公开的 Semrush/Ahrefs 页面,而这些页面可能发生变化。如果某个 actor 失效,请改用免费的
seo-traffic-analyzerskill,它会使用网络搜索探测。
回退方案:免费模式
如果未设置 APIFY_API_TOKEN 或 Apify actors 失效,脚本会回退到:
- WebSearch 探测(类似
seo-traffic-analyzerskill) - 使用
site:[domain]查询已编入索引的页面数量 - 使用 SimilarWeb 免费版估算流量
- 手动检查 Google SERP 中的关键词排名
这样获得的数据精度较低,但仍能生成有用的报告。
依赖项
- Python 3.8+
requests库APIFY_API_TOKEN环境变量(用于 Apify 模式;未设置时会回退到免费探测)
评论
支持 Markdown