apify-ai-search-visibility-tracker
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Search Visibility Tracker
AI 搜索可见度跟踪器
Four workflows covering the full AI visibility lifecycle: discover which prompts matter → find citation opportunities → audit your site → track over time.
All workflows use for AI search. Workflow C also uses .
apify/google-search-scraperapify/website-content-crawlerRecommended flow: Run Workflow A to discover prompts → Workflow B to find citation opportunities → Workflow C to audit your site → Workflow D to track everything on a schedule.
覆盖 AI 可见度完整生命周期的四个工作流:发现哪些提示词重要 → 寻找引用机会 → 审计你的网站 → 持续跟踪。
所有工作流都使用 进行 AI 搜索。工作流 C 还会使用 。
apify/google-search-scraperapify/website-content-crawler推荐流程: 运行工作流 A 发现提示词 → 运行工作流 B 寻找引用机会 → 运行工作流 C 审计网站 → 运行工作流 D 按计划跟踪所有内容。
Workflow A — Competitor Prompt Discovery
工作流 A — 竞争对手提示词发现
Goal: Find which queries surface a competitor in AI search answers, so you know which prompts are worth monitoring.
目标: 找出哪些查询会在 AI 搜索答案中展示竞争对手,从而了解哪些提示词值得监控。
Inputs to collect
需要收集的输入
| # | Input | Notes |
|---|---|---|
| 1 | Competitor domain(s) | e.g. |
| 2 | Seed topic keywords | e.g. "web scraping", "data extraction API" |
| 3 | AI sources | Default: all six (AI Overviews, AI Mode, ChatGPT, Perplexity, Copilot, Gemini) |
| # | 输入 | 备注 |
|---|---|---|
| 1 | 竞争对手域名 | 例如 |
| 2 | 种子主题关键词 | 例如“网络抓取”“数据提取 API” |
| 3 | AI 来源 | 默认:全部六个(AI Overviews、AI Mode、ChatGPT、Perplexity、Copilot、Gemini) |
Workflow
工作流
-
Generate 15–30 candidate queries from seed keywords using these templates:
- ,
best [topic],[topic] tools,how to [topic][topic] for [use case] - ,
[topic] vs [competitor brand][competitor brand] alternative - ,
[topic] API,[topic] pricing[topic] tutorial
-
Runfor each candidate query. For each result, extract:
apify/google-search-scraper- ,
aiOverview.sources[],aiMode.sources[],chatGptAnswer.sources[],perplexityAnswer.sources[],copilotAnswer.sources[]geminiAnswer.sources[] - Also check /
answer_textfor competitor brand name mentions (word-boundary match:aiOverview.text)\bBrand\b
-
For each (query, source) pair where the competitor domain or brand appears: record a hit.
-
Output a prompt-major table sorted by total hit count descending:
| Query | ChatGPT | Perplexity | AI Overviews | AI Mode | Copilot | Gemini | Total |
|-------|---------|------------|--------------|---------|---------|--------|-------|
| "best web scraping API" | ✓ | ✓ | — | ✓ | — | ✓ | 4 |
| "how to scrape Google" | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 6 |- Deliver the top-N queries (default 10) as a ready-to-paste list for Workflow D's prompts.
config.json
-
使用以下模板从种子关键词生成 15–30 个候选查询:
- 、
best [topic]、[topic] tools、how to [topic][topic] for [use case] - 、
[topic] vs [competitor brand][competitor brand] alternative - 、
[topic] API、[topic] pricing[topic] tutorial
-
针对每个候选查询运行。对于每个结果,提取:
apify/google-search-scraper- 、
aiOverview.sources[]、aiMode.sources[]、chatGptAnswer.sources[]、perplexityAnswer.sources[]、copilotAnswer.sources[]geminiAnswer.sources[] - 还要检查 /
answer_text中是否出现竞争对手品牌名称(词边界匹配:aiOverview.text)。\bBrand\b
-
对于竞争对手域名或品牌出现的每个(查询,来源)组合,记录一次命中。
-
输出以提示词为主体的表格,并按总命中数降序排列:
| Query | ChatGPT | Perplexity | AI Overviews | AI Mode | Copilot | Gemini | Total |
|-------|---------|------------|--------------|---------|---------|--------|-------|
| "best web scraping API" | ✓ | ✓ | — | ✓ | — | ✓ | 4 |
| "how to scrape Google" | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 6 |- 交付 top-N 个查询(默认 10 个),以生成可直接粘贴到工作流 D 的
config.json中的列表。prompts
Workflow B — Citation Opportunity Finder
工作流 B — 引用机会发现器
Goal: For a target topic, identify which domains and content types AI engines most often cite — revealing where to publish or pitch content.
目标: 针对目标主题,找出 AI 引擎最常引用的域名和内容类型,从而揭示应在何处发布内容或推广内容。
Inputs to collect
需要收集的输入
| # | Input | Notes |
|---|---|---|
| 1 | Target topic / industry | e.g. "web scraping", "ecommerce automation" |
| 2 | Seed queries | 5–20 queries covering the topic space |
| 3 | AI sources | Default: all six |
| 4 | Deep-crawl top cited? | Optional: crawl top-3 cited pages with |
| # | 输入 | 备注 |
|---|---|---|
| 1 | 目标主题/行业 | 例如 |
| 2 | 种子查询 | 覆盖该主题领域的 5–20 个查询 |
| 3 | AI 来源 | 默认:全部六个 |
| 4 | 是否深度抓取高频引用页面? | 可选:使用 |
Workflow
工作流
-
Runfor each seed query across selected AI sources.
apify/google-search-scraper -
Collect every URL fromacross all results. Normalise to registrable domain (
sources[]→blog.example.com).example.com -
Aggregate:
- By domain: count citations, list which AI sources cite it, list which queries triggered it
- By content type: infer from URL path patterns (docs → ,
/docs/; blog →/reference/; news → known news domains)/blog/
-
Rank by total citation count. Output:
Top-cited domains for "web scraping" (42 queries × 6 sources):
| Domain | Citations | AI Sources | Inferred type |
|--------|-----------|------------|--------------|
| docs.apify.com | 38 | ChatGPT, Perplexity, AI Mode | Documentation |
| scraperapi.com/blog | 21 | AI Overviews, Gemini | Long-form blog |-
If deep-crawl enabled: runon the top-3 cited URLs per domain. From the markdown output, extract:
apify/website-content-crawler- First heading that directly answers the query
- Presence of code blocks in first 500 words
- Word count
- Whether an H2/H3 contains the exact query phrase
-
Summarise patterns: "AI engines in this topic prefer [long-form docs / short direct-answer posts]. Typical cited page: [word count range], [has/lacks direct-answer H2], [has/lacks code example above the fold]."
-
针对每个种子查询,在所选 AI 来源中运行。
apify/google-search-scraper -
收集所有结果中里的每个 URL。将其规范化为可注册域名(
sources[]→blog.example.com)。example.com -
聚合:
- 按域名:统计引用次数,列出引用它的 AI 来源及触发它的查询
- 按内容类型:根据 URL 路径模式推断(文档 → 、
/docs/;博客 →/reference/;新闻 → 已知新闻域名)/blog/
-
按总引用次数排名。输出:
Top-cited domains for "web scraping" (42 queries × 6 sources):
| Domain | Citations | AI Sources | Inferred type |
|--------|-----------|------------|--------------|
| docs.apify.com | 38 | ChatGPT, Perplexity, AI Mode | Documentation |
| scraperapi.com/blog | 21 | AI Overviews, Gemini | Long-form blog |-
如果启用深度抓取:对每个域名引用次数最高的 3 个 URL 运行。从 markdown 输出中提取:
apify/website-content-crawler- 直接回答查询的第一个标题
- 前 500 个词中是否存在代码块
- 词数
- H2/H3 是否包含查询的确切短语
-
总结模式:“AI 引擎在此主题中偏好[长篇文档/简短直接回答型文章]。典型被引用页面:[词数范围],[有/无直接回答 H2],[首屏上方有/无代码示例]。”
Workflow C — GEO Website Audit
工作流 C — GEO 网站审计
Goal: Check whether a specific website's content is structured for AI citation; compare it against what AI engines actually cite for your target prompts.
目标: 检查特定网站的内容是否已针对 AI 引用进行结构化处理;并将其与 AI 引擎针对目标提示词实际引用的内容进行比较。
Inputs to collect
需要收集的输入
| # | Input | Notes |
|---|---|---|
| 1 | Your website URL | e.g. |
| 2 | Target prompts | Use Workflow A output, or supply 5–10 directly |
| 3 | AI sources | Default: all six |
| # | 输入 | 备注 |
|---|---|---|
| 1 | 你的网站 URL | 例如 |
| 2 | 目标提示词 | 使用工作流 A 的输出,或直接提供 5–10 个 |
| 3 | AI 来源 | 默认:全部六个 |
Workflow
工作流
-
Runfor each target prompt. For each (prompt × source) record whether your registrable domain appears in
apify/google-search-scraper.sources[] -
For prompts where your domain is not cited: identify the top-cited competitor URL for that prompt.
-
Runon:
apify/website-content-crawler- Your most relevant page(s) for each un-cited prompt
- The top-cited competitor page for each un-cited prompt
-
For each un-cited prompt, produce a gap card:
Prompt: "how to scrape Google search results"
Your page: apify.com/blog/scraping-google → NOT cited on ChatGPT, Perplexity, AI Mode
Top-cited: docs.brightdata.com/scraping/google (cited 5/6 sources)
Structural gaps:
✗ Your page: answer buried after 900 words, no direct-answer H2
✓ Competitor: H2 "How to scrape Google in 3 steps" at word 120 + code block at word 180
Recommended actions (priority order):
1. Add H2 that mirrors the query phrase within first 300 words
2. Move code example above the fold
3. Add a "Quick answer" summary box at the top- Deliver: per-prompt gap cards + a consolidated action table ranked by expected impact.
-
针对每个目标提示词运行。对于每个(提示词 × 来源)组合,记录你的可注册域名是否出现在
apify/google-search-scraper中。sources[] -
对于未引用你的域名的提示词,找出该提示词下被引用次数最高的竞争对手 URL。
-
对以下页面运行:
apify/website-content-crawler- 每个未引用提示词对应的最相关页面
- 每个未引用提示词对应的被引用次数最高的竞争对手页面
-
为每个未引用提示词生成差距卡片:
Prompt: "how to scrape Google search results"
Your page: apify.com/blog/scraping-google → NOT cited on ChatGPT, Perplexity, AI Mode
Top-cited: docs.brightdata.com/scraping/google (cited 5/6 sources)
Structural gaps:
✗ Your page: answer buried after 900 words, no direct-answer H2
✓ Competitor: H2 "How to scrape Google in 3 steps" at word 120 + code block at word 180
Recommended actions (priority order):
1. Add H2 that mirrors the query phrase within first 300 words
2. Move code example above the fold
3. Add a "Quick answer" summary box at the top- 交付:每个提示词的差距卡片,以及一份按预期影响排名的综合操作表。
Workflow D — Recurring Visibility Tracker
工作流 D — 定期可见度跟踪器
Goal: Snapshot brand citations and mentions across all six AI surfaces on a recurring schedule and track changes over time.
目标: 按计划对所有六个 AI 入口中的品牌引用和提及生成快照,并跟踪其随时间的变化。
Prerequisites
前置条件
(No need to check upfront)
- saved in a
APIFY_TOKENfile next to.env(the runner auto-loads it).config.json - Python 3.9+ on PATH. (only third-party dependency);
pip3 install requestsrecommended for accurate registrable-domain matching on multi-part TLDs.pip3 install tldextract - For automated daily runs: macOS / Linux with launchd or cron available (the installer handles both). Windows users get printed instructions.
schtasks
(无需预先检查)
- 已保存在
APIFY_TOKEN旁边的config.json文件中(运行器会自动加载)。.env - PATH 中有 Python 3.9+。(唯一的第三方依赖);建议使用
pip3 install requests,以便在多部分 TLD 上准确匹配可注册域名。pip3 install tldextract - 对于自动每日运行:macOS / Linux 上可使用 launchd 或 cron(安装器会处理两者)。Windows 用户会获得打印出的 说明。
schtasks
Steps
步骤
Copy this checklist and track progress:
Task Progress:
- [ ] Step 1: Load or collect the seven required inputs
- [ ] Step 2: Confirm AI sources and cadence
- [ ] Step 3: Write config.json + .env, then install the OS schedule
- [ ] Step 4: Run a snapshot now so the user sees the first report
- [ ] Step 5: Deliver the history report (diff vs. all prior runs)复制此清单并跟踪进度:
Task Progress:
- [ ] Step 1: Load or collect the seven required inputs
- [ ] Step 2: Confirm AI sources and cadence
- [ ] Step 3: Write config.json + .env, then install the OS schedule
- [ ] Step 4: Run a snapshot now so the user sees the first report
- [ ] Step 5: Deliver the history report (diff vs. all prior runs)Step 1: Load or Collect the Seven Required Inputs
步骤 1:加载或收集七项必需输入
If exists in the user's working directory, load it and skip to Step 4 unless the user asks to reconfigure. On first run, ask all seven anchors before any Actor call:
config.json| # | Input | Why it matters |
|---|---|---|
| 1 | Brand URL | Primary domain. Drives registrable-domain citation matching ( |
| 2 | Brand name(s) | Surface forms for text-mention matching (e.g., |
| 3 | Competitor brands | Ask explicitly: "Which competitors do you want tracked alongside your brand?" Accept |
| 4 | Prompts to monitor | One or more search queries. Each runs through every enabled AI source. If you don't know which prompts to use yet, run Workflow A first — it discovers competitor-visible prompts you can paste here. |
| 5 | Cadence | |
| 6 | Which AI sources | Present the six (AI Overviews, AI Mode, ChatGPT, Perplexity, Copilot, Gemini), all enabled by default. Each adds per-result cost -- current pricing on the Actor page (https://apify.com/apify/google-search-scraper). |
| 7 | Apify Dataset name | The named dataset to append to. If absent, created on first run; the name is recorded in |
After those seven, ask optional follow-ups: , , (UULE), preferred run hour (default local).
countryCodelanguageCodelocation09:00Then one verbosity question -- save as :
config.json:include_full_answers- (default): report shows short quoted snippets around each surface-form match. Full LLM answers live in the named KV store; user can ask later.
on_demand - : report embeds the full LLM answer verbatim whenever any entity is mentioned. Useful for one prompt; gets unwieldy at 5+ prompts.
always
如果 存在于用户的工作目录中,则加载它并跳转到步骤 4,除非用户要求重新配置。首次运行时,必须在调用任何 Actor 之前询问全部七项必填内容:
config.json| # | 输入 | 重要性 |
|---|---|---|
| 1 | 品牌 URL | 主域名。用于可注册域名引用匹配( |
| 2 | 品牌名称 | 用于文本提及匹配的形式(例如 |
| 3 | 竞争对手品牌 | 明确询问:“您希望与您的品牌一起监控哪些竞争对手?”接受“名称 + 域名”组合。可以没有竞争对手;首次运行时仍必须询问该问题。 |
| 4 | 待监控提示词 | 一个或多个搜索查询。每个查询都会在每个启用的 AI 来源中运行。如果尚不知道应使用哪些提示词,请先运行工作流 A——它会发现竞争对手可见的提示词,供你粘贴到此处。 |
| 5 | 频率 | |
| 6 | 哪些 AI 来源 | 列出这六个来源(AI Overviews、AI Mode、ChatGPT、Perplexity、Copilot、Gemini),默认全部启用。每个来源都会增加单次结果成本——当前价格见 Actor 页面(https://apify.com/apify/google-search-scraper)。 |
| 7 | Apify Dataset 名称 | 要追加数据的命名 Dataset。如果未提供,则在首次运行时创建;名称会记录在 |
完成上述七项后,再询问可选的后续问题:、、(UULE)、首选运行时间(默认当地 )。
countryCodelanguageCodelocation09:00然后询问一个详细程度问题——保存为 :
config.json:include_full_answers- (默认):报告显示每个文本形式匹配项周围的简短引用片段。完整 LLM 答案保存在命名 KV store 中;用户可稍后索取。
on_demand - :每当提及任何实体时,报告都会逐字嵌入完整 LLM 答案。适合只使用一个提示词;提示词达到 5 个以上后会变得过于冗长。
always
Step 2: Confirm AI Sources and Cadence
步骤 2:确认 AI 来源和频率
Echo back the user's seven choices in a single paragraph for confirmation. If the user toggles sources, update the in-memory config before writing.
用一段话回显用户的七项选择以供确认。如果用户切换了来源,请在写入前更新内存中的配置。
Step 3: Write config.json
+ .env
, Then Install the OS Schedule
config.json.env步骤 3:编写 config.json + .env,然后安装操作系统调度
Create the working directory layout next to where the user wants reports to land:
working-dir/
config.json # copied from the skill's config.example.json, edited with collected values
.env # APIFY_TOKEN=apify_api_xxx (chmod 600)bash
cp ${CLAUDE_PLUGIN_ROOT}/reference/scripts/config.example.json ./config.json在用户希望报告落地的位置旁创建工作目录结构:
working-dir/
config.json # copied from the skill's config.example.json, edited with collected values
.env # APIFY_TOKEN=apify_api_xxx (chmod 600)bash
cp ${CLAUDE_PLUGIN_ROOT}/reference/scripts/config.example.json ./config.jsonthen edit with the collected values, save
then edit with the collected values, save
echo 'APIFY_TOKEN=your_token_here' > ./.env
chmod 600 ./.env
Then install the OS schedule:
```bash
bash ${CLAUDE_PLUGIN_ROOT}/reference/scripts/install_cron.sh --cadence daily --hour 9Cron expression mapping:
| Cadence | Cron expression | When |
|---|---|---|
| daily | | every day at H:00 local |
| weekly | | every Monday at H:00 |
| monthly | | the 1st of every month at H:00 |
echo 'APIFY_TOKEN=your_token_here' > ./.env
chmod 600 ./.env
然后安装操作系统调度:
```bash
bash ${CLAUDE_PLUGIN_ROOT}/reference/scripts/install_cron.sh --cadence daily --hour 9Cron 表达式映射:
| 频率 | Cron 表达式 | 时间 |
|---|---|---|
| daily | | 每天的 H:00(本地时间) |
| weekly | | 每周一的 H:00 |
| monthly | | 每月 1 日的 H:00 |
Step 4: Run a Snapshot Now
步骤 4:立即运行快照
macOS:
bash
launchctl kickstart "gui/$(id -u)/com.apify.ai-visibility-tracker"
tail -f ~/Library/Logs/ai-visibility-tracker.logLinux / generic:
bash
python3 ${CLAUDE_PLUGIN_ROOT}/reference/scripts/run_snapshot.py --config ./config.jsonBoth paths:
- Call with the configured prompts + AI-source toggles.
apify/google-search-scraper - Parse each (prompt x source) cell for citations and brand/competitor mentions.
- Append rows to the named Apify Dataset (schema in ).
reference/output-schema.md - Write the raw item to the named KV store (long-term archive).
- Compute the history vs. all prior runs.
- Write next to
reports/snapshot-<ISO-date>.md.config.json
macOS:
bash
launchctl kickstart "gui/$(id -u)/com.apify.ai-visibility-tracker"
tail -f ~/Library/Logs/ai-visibility-tracker.logLinux / 通用:
bash
python3 ${CLAUDE_PLUGIN_ROOT}/reference/scripts/run_snapshot.py --config ./config.json两条路径都会:
- 使用配置的提示词和 AI 来源开关调用 。
apify/google-search-scraper - 解析每个(提示词 × 来源)单元格中的引用和品牌/竞争对手提及。
- 将行追加到指定的 Apify Dataset(schema 位于 )。
reference/output-schema.md - 将原始条目写入指定的 KV store(长期归档)。
- 计算相对于所有历史运行的变化。
- 在 旁写入
config.json。reports/snapshot-<ISO-date>.md
Step 5: Deliver the History Report
步骤 5:交付历史报告
Open and surface the top findings in chat. Lead with:
reports/snapshot-<ISO-date>.md- First-ever citations / mentions today -- entity x source combinations crossing the threshold for the first time.
- Drops -- entity was cited in the latest prior run but isn't today.
- For every cited entity, the exact matched URL(s).
打开 ,并在聊天中呈现最重要的发现。首先说明:
reports/snapshot-<ISO-date>.md- 今天首次出现的引用/提及——首次越过阈值的实体 × 来源组合。
- 下降——实体在上一次运行中有引用,但今天没有。
- 对每个被引用的实体,给出精确匹配的 URL。
Output format
输出格式
Snapshot summaries are entity-major: one Markdown table per tracked entity (brand, then competitors), one row per AI source, columns .
Source | Cited | Mentioned | SoV% | Matched URLs | History快照摘要以实体为主体:每个被跟踪实体(先是品牌,然后是竞争对手)对应一张 Markdown 表格,每个 AI 来源占一行,列为 。
Source | Cited | Mentioned | SoV% | Matched URLs | HistoryActors
Actor
| Actor | Used in | Key input fields |
|---|---|---|
| A, B, C, D | |
| B (optional), C | |
Pricing changes; check the pricing tab before quoting numbers. Disable unused AI sources to reduce cost.
Telemetry. Workflow D runs through , which already sets on every Apify API call. When calling these Actors ad-hoc in Workflows A-C, pass the matching flags so usage is attributed: and (use for ), and append . Example:
reference/scripts/run_snapshot.pyUser-Agent: apify-awesome-skills/ai-search-visibility-tracker-...--user-agent apify-awesome-skills/apify-ai-search-visibility-tracker--json--format jsonapify datasets get-items2>/dev/nullbash
apify actors call apify/google-search-scraper \
--user-agent apify-awesome-skills/apify-ai-search-visibility-tracker \
--json 2>/dev/null| Actor | 用途 | 关键输入字段 |
|---|---|---|
| A、B、C、D | |
| B(可选)、C | |
价格可能会变化;引用具体数字前,请查看 定价选项卡。禁用不需要的 AI 来源以降低成本。
遥测。 工作流 D 通过 运行,该脚本已在每次 Apify API 调用时设置 。在 A-C 工作流中临时调用这些 Actor 时,请传入匹配的标志,以便正确归因使用量:传入 和 (对 使用 ),并追加 。示例:
reference/scripts/run_snapshot.pyUser-Agent: apify-awesome-skills/ai-search-visibility-tracker-...--user-agent apify-awesome-skills/apify-ai-search-visibility-tracker--jsonapify datasets get-items--format json2>/dev/nullbash
apify actors call apify/google-search-scraper \
--user-agent apify-awesome-skills/apify-ai-search-visibility-tracker \
--json 2>/dev/nullQuality Rules
质量规则
- Non-interactive. No stdin reads in -- launchd / cron has no stdin.
run_snapshot.py - Word-boundary brand matching (, case-insensitive). See
\bbrand\b.reference/citation-matching.md - Registrable-domain citation matching (counts as
blog.apify.com). Seeapify.com.reference/citation-matching.md - Never skip a row. If an AI source returns nothing, write a row with .
cited: false, mentioned: false, answer_text: "[no answer returned]" - Every row carries the Apify run ID so any finding can be reverified.
- 非交互式。 不读取 stdin——launchd / cron 没有 stdin。
run_snapshot.py - 词边界品牌匹配(,不区分大小写)。参阅
\bbrand\b。reference/citation-matching.md - 可注册域名引用匹配(计为
blog.apify.com)。参阅apify.com。reference/citation-matching.md - 绝不跳过任何行。 如果某个 AI 来源没有返回内容,仍要写入一行,值为 。
cited: false, mentioned: false, answer_text: "[no answer returned]" - 每一行都携带 Apify run ID,以便重新验证任何发现。
Error Handling
错误处理
APIFY_TOKEN not found.envconfig.jsonecho 'APIFY_TOKEN=...' > .env && chmod 600 .envconfig.json not foundDataset name not setActor run FAILEDAI source returned no answer[no answer returned]website-content-crawler returns no markdownuseBrowserCrawler: trueSchedule not firingreference/scheduling.mdNo previous run to diff againstAPIFY_TOKEN not foundconfig.json.envecho 'APIFY_TOKEN=...' > .env && chmod 600 .envconfig.json not foundDataset name not setActor run FAILEDAI source returned no answer[no answer returned]website-content-crawler returns no markdownuseBrowserCrawler: trueSchedule not firingreference/scheduling.mdNo previous run to diff against