如果你只想完成一次競爭對手流量分析,可以把本文整篇交給 Codex,並說:“按這篇文章的流程分析 competitor.com。”它會按文中的 skill 檢查可用資料來源、處理 Ahrefs、Semrush 或 DataForSEO 的連線設定,再向你索取真正影響分析結果的資訊:要檢視的域名、目標市場、語言,以及你自己的域名(如果要做內容缺口)。
先把一件事說清楚:除非對方把 Google Analytics、Search Console 或伺服器日誌共享給你,否則你看到的不是它的真實訪問量。Ahrefs、Semrush 和 DataForSEO 依據各自的關鍵詞庫、排名、點選模型與抓取資料生成估算。這並不讓資料失去價值。正確的用法是比較同一市場、同一時間窗中哪些域名在增長,哪些頁面和關鍵詞值得研究;錯誤的用法是把“預估月流量”當成對方財務報表。
什麼時候該用這套方法
不是每次看到一個同行網站都值得做完整分析。下面這些時刻,競爭對手流量資料最有用:
你的情況 | 為什麼這時值得查 | 你會得到的答案 |
|---|---|---|
你要做年度或季度內容計劃,但不知道先覆蓋哪個主題 | 競爭者的頁面和關鍵詞能暴露市場已經在搜尋什麼 | 哪些主題已經有需求,哪些 URL 值得優先更新或新建 |
你發現競爭對手增長很快 | 總流量沒有解釋原因,頁面和關鍵詞變化才有用 | 增長是否集中在工具、模板、部落格、產品頁或某一個國家 |
你準備寫“競品替代”或比較頁 | 先理解對方靠什麼意圖獲得曝光,避免只按品牌詞猜測 | 使用者到底在比較功能、價格、使用場景,還是尋找解決方案 |
你的自然流量停滯 | 需要找到“我們沒有覆蓋”與“已有頁面沒有做好”的區別 | 值得補的內容缺口,以及可能造成關鍵詞自相競爭的舊頁面 |
你要向團隊解釋為什麼一個內容專案值得做 | 主觀的“大家都在寫”很難獲得資源 | 帶有頁面、查詢、市場和趨勢證據的優先順序說明 |
它不適合回答“對方昨天到底有多少真實訪客”或“照著對方做一定能帶來多少流量”。沒有對方第一方 Analytics 時,任何第三方工具都無法給出這兩個答案。
用完後你會多出什麼判斷能力
這套方法的價值不是得到一個漂亮的流量數字,而是把模糊的競品觀察變成幾項可驗證的決策:
- 知道該看誰。 區分直接商業競爭者和自然搜尋競爭者。一個媒體、模板站或工具站可能不賣和你相同的產品,卻搶走了你最重要的搜尋需求。
- 知道增長來自哪裡。 找到帶來估算曝光的頁面組、關鍵詞和國家,而不是只看到一條上升曲線。
- 知道機會是不是你的機會。 將競爭者覆蓋的主題與自己的 URL、客戶需求和產品能力對照,排除不相關的關鍵詞。
- 知道下一步該做什麼。 在“更新現有頁面”“新增一個內容資產”“研究工具頁”與“暫不做”之間做選擇,並保留理由。

競爭對手流量研究的終點不是一串數字,而是一組可討論的頁面、主題和行動選擇。
你會完成什麼
這是一套給第一次使用 Codex 做 SEO 研究的人準備的只讀流程。
專案 | 本教程的約定 |
|---|---|
適合誰 | 想研究一個或多個競爭網站,但沒有 SEO 分析師或自己的指令碼的人 |
完成結果 |
|
最少輸入 | 一個規範域名,例如 |
可選輸入 | 你的域名、競爭對手名單、目標國家、語言、裝置、時間範圍和業務主題 |
預設市場 | United States / English;這只是預設值,不是“全球資料” |
建議時間 | 首次讓 Codex 完成資料來源連線後,每個域名通常只需幾分鐘到十幾分鍾,取決於配額和可用資料 |
定義為完成 | 每個關鍵數字都標有提供方、報告或端點、獲取時間、市場和含義;報告列出不確定性與下一步,而非只報一個流量數 |
把它想成一張證據表,而不是一個“查流量”按鈕。流量總量只能回答“誰看起來更大”;熱門頁面、排名關鍵詞、變化趨勢和內容缺口才幫助你判斷下一步寫什麼、改什麼,或者根本不該追什麼。
先選好資料來源,不必一次買齊三個
三家工具可以互相校驗,但它們並不是同一份資料庫的不同外殼。先接入你已經擁有 API 許可權的那一家;第二家適合在數字差異很大、要做重要決策,或要補齊某類報告時再加。
資料來源 | 這次研究最適合拿什麼 | 你應如何解釋結果 | 開始前要確認 |
|---|---|---|---|
域名的自然搜尋概覽、排名關鍵詞、熱門頁面、自然競爭者、反向連結線索 | Ahrefs 對指定資料庫的估算,不是競爭者 Analytics | 你的套餐是否有 API 訪問,以及需要的 Site Explorer 或相關報告是否被授權 | |
域名概覽、自然關鍵詞、競爭域名、自然趨勢和頁面線索 | Semrush 資料庫中的估算;資料庫與地區必須寫入報告 | API v4 的賬戶授權、單位額度和目標資料庫是否可用 | |
可指令碼化的排名關鍵詞、SERP、關鍵詞指標、流量估算和反鏈資料 | 端點返回的資料及其模型,不等同於真實會話數 | 登入名/密碼(或賬戶支援的授權方式)、餘額、目標地點與語言 |
不要把不同提供方的“traffic”直接加總,也不要因為它們給出不同數字就認定誰錯了。先檢查四件事:是否都是根域名、市場是否相同、語言是否相同、指標到底是自然流量、全站訪問還是付費流量。只有定義一致,比較才有意義。
最小可行路徑: 只有 DataForSEO 也可以完成本教程。它適合希望讓 Codex 把資料整理為 CSV 和 Markdown 的使用者。擁有 Ahrefs 或 Semrush API 時,再用其更擅長的競品、頁面和歷史報告補充即可。
給 Codex 一項穩定、可重複的工作
Codex 中的 skill 是一個包含 SKILL.md 的資料夾。它告訴 Codex 何時觸發、需要哪些輸入、按什麼順序工作,以及不能做什麼。當前的 Codex 文件建議將倉庫級技能放在當前專案或上級目錄的 .agents/skills/ 下;個人級技能可放在 ~/.agents/skills/。前者適合團隊複用,後者適合你在任何專案中使用。
在一個專門的研究倉庫或工作目錄中建立目錄:
mkdir -p .agents/skills/competitor-traffic-research然後新建 .agents/skills/competitor-traffic-research/SKILL.md,把下面的完整內容原樣放進去。連線、憑據、預設市場和提供方指令碼的處理都由這份 skill 負責;正文不需要讓讀者逐個配置。
完整的 SKILL.md 檔案
請將下方完整程式碼區塊原封不動複製到 .agents/skills/competitor-traffic-research/SKILL.md。不要複製程式碼區塊以外的文章文字。雖然這份 SKILL.md 以英文撰寫,但它是給 Codex 執行的指令檔;這樣能保留提供者名稱、API 與檔名的一致性。
---
name: competitor-traffic-research
description: Analyze a public competitor domain's estimated search traffic, top pages, ranked keywords, trends, and content gaps with Ahrefs, Semrush, or DataForSEO data. Use when a user asks to check competitor website traffic, competitor organic keywords, top pages, or organic search competitors. Set up any required provider connection, then produce a read-only, sourced report without inventing metrics.
---
# Competitor traffic research
## Purpose and boundary
Turn a public domain into a reviewable competitor-search report. This is research only. Do not edit a website, create a provider project, alter billing, change account settings, publish content, send email, or make any other external write action.
All third-party traffic values are estimates unless the user supplies first-party analytics for a domain they own. Never call an estimated value "actual traffic," "sessions," "revenue," or "conversions."
## Required input
Ask only for what is missing:
1. Competitor domain, subdomain, path, or exact URL. Normalize it and state which scope will be measured.
2. At least one available authorized provider: Ahrefs, Semrush, or DataForSEO.
Use `United States` and `English` when market and language are not supplied. State this default prominently in the final report. Optional inputs are the user's domain, additional competitors, device, date range, seed topic, and business goal.
## Provider connection and setup
Handle the provider setup so the user does not have to read API documentation or write request code.
1. Inspect installed provider skills and local integration scripts first. Prefer an existing authorized connection.
2. If no connection is ready, tell the user which provider connection is needed and guide them through its ordinary setup one step at a time. Use the provider's official documentation and configuration method; do not invent endpoints or settings.
3. Store provider settings in the location expected by the installed integration. Use `AHREFS_API_KEY`, `SEMRUSH_API_KEY`, `DATAFORSEO_LOGIN`, and `DATAFORSEO_PASSWORD` when a local script expects those names. Set DataForSEO's `DATAFORSEO_DEFAULT_LOCATION` and `DATAFORSEO_DEFAULT_LANGUAGE` to the selected market and language when the installed toolkit uses them.
4. Do not copy provider credentials into research artifacts, report tables, CSV output, or user-facing summaries. Keep connection setup out of the analysis report.
5. Use read-only reports/endpoints. Before a potentially billable request, state the provider, report or endpoint class, market, language, intended request count, and any known quota/credit uncertainty. Stop if the user declines.
6. On a 401, 403, quota, coverage, or provider error, record the provider as `unavailable` with the safe error category and a recovery suggestion. Do not retry repeatedly, switch providers silently, or invent a substitute metric.
## Provider query map
Choose the least complicated available route. Do not force all three providers into one run.
| Provider | First lookup | Extend the analysis with | Use it when |
| --- | --- | --- | --- |
| Ahrefs | Site Explorer domain overview or the installed Ahrefs connector's closest equivalent | Top pages, Organic keywords, Organic competitors, Content Gap | The connection exposes these reports and the user needs page-level competitor research |
| Semrush | Domain Overview or the installed Semrush connector's closest equivalent | Organic Research, Organic Competitors, Keyword Gap, historical position data | The connection exposes the target database and the user needs a second point of view or keyword-gap workflow |
| DataForSEO | `bulk_traffic_estimation` and `ranked_keywords` from the installed `dataforseo-toolkit` | `keywords_for_site`, `google_organic_serp`, `backlinks_summary`, `referring_domains` | A scriptable local workflow is available or a reproducible CSV is the main need |
For DataForSEO, use the installed toolkit before writing new HTTP code. Its normal sequence for a domain is:
```text
bulk_traffic_estimation -> ranked_keywords -> keywords_for_site
```
Run `google_organic_serp` only for a small, human-selected set of important keywords to validate intent and result-page format. Run backlink reports only when the user asks about referral or link opportunities. If an Ahrefs or Semrush connector uses different report names, use the closest documented read-only equivalent and record the exact report name.
## Data collection order
1. Create a timestamped folder under `competitor-research/` using a safe normalized domain name. Do not overwrite an existing run.
2. Create `research-scope.md` before any API call. Record target scope, market, language, date/time in UTC, available providers, user goal, and the meanings of requested metrics.
3. Inspect installed provider skills, local scripts, and official provider documentation before choosing a report/endpoint. Use only capabilities that are actually available to the authorized account. Do not guess an endpoint from memory.
4. Collect the smallest useful evidence set from each available provider:
- domain-level estimated organic traffic or visibility and any available trend;
- top organic pages with their leading keyword or traffic contribution when the provider supplies it;
- ranked organic keywords with position, volume, and URL when available;
- organic competitors or intersecting keywords when available;
- paid-search or backlink signals only when the user asks for them, and label them separately.
5. If the user provides their own domain, run a content-gap comparison only when the provider supports it. Return only relevant keyword opportunities; do not treat every missing keyword as a content brief.
6. Normalize domains, country/database, language, device, date window, URL scope, and metric definitions before comparing providers. Keep each provider's original metric in a separate column. Never average or sum traffic estimates across providers.
7. Save concise normalized CSV files only: `competitor-pages.csv`, `competitor-keywords.csv`, and, when applicable, `content-gap.csv`. Omit unavailable fields rather than filling them with zero.
## Output schemas
Write a `field-dictionary.md` beside the report. Use these columns where the provider returns them; preserve blanks as blanks.
### `competitor-pages.csv`
`url, page_role, leading_keyword, estimated_organic_traffic, ranking_keywords, traffic_change, provider, report_or_endpoint, retrieved_at_utc, market, language, scope, metric_definition, notes`
### `competitor-keywords.csv`
`keyword, intent, position, previous_position, search_volume, estimated_traffic, ranking_url, keyword_group, provider, report_or_endpoint, retrieved_at_utc, market, language, scope, metric_definition, relevance_note`
### `content-gap.csv`
Create this file only when the user's domain is supplied and a provider supports a comparison. Use:
`keyword, intent, competitor_domains, competitor_urls, user_domain_status, search_volume, position_gap, recommended_action, existing_url_risk, provider, report_or_endpoint, retrieved_at_utc, market, language, human_review_reason`
Do not manufacture a top-pages table from ranked keywords alone. If a provider cannot supply page-level estimated traffic, include the ranking URL and label the traffic field `not_available`.
## Analysis rules
- Separate a direct business competitor from an organic search competitor. A publisher, marketplace, directory, or tool can compete for keywords without selling the same product.
- Treat abrupt changes as observations, not causal claims. Check the changed pages and keywords before suggesting a reason.
- Prefer page groups, intent, relevance, and trend direction over one headline traffic number.
- For every quantitative field, retain `provider`, `report_or_endpoint`, `retrieved_at_utc`, `market`, `language`, `scope`, and `metric_definition` in the relevant output or its data dictionary.
- Label data `not_available`, `not_comparable`, or `estimated` rather than guessing. Explain why it cannot be compared when possible.
- Do not claim that an SEO metric predicts ranking, traffic, revenue, conversion, market share, or AI citations.
## Required report
Write `competitor-traffic-report.md` with these sections:
1. **Executive answer:** target, scope, market, language, retrieval time, provider coverage, and the shortest useful conclusion.
2. **What the numbers mean:** which metrics are estimates, what they do and do not measure, and comparison limits.
3. **Traffic and visibility snapshot:** a provider-by-provider table. Do not merge values.
4. **Trend and change check:** observed movement, relevant changed pages/keywords, and confidence or gaps.
5. **Top pages:** a compact table with URL, apparent page role, leading keyword when available, estimated contribution, provider, and a human interpretation.
6. **Keyword and intent patterns:** group a limited set of relevant keywords by searcher job. Identify themes, not a dump of thousands of rows.
7. **Competitors and gaps:** distinguish direct competitors from organic competitors. If the user's domain is supplied, show only review-worthy content gaps and cannibalization risks.
8. **Prioritized actions:** no more than five actions. Each must cite the evidence, likely owner, expected output, and a human approval gate.
9. **Data availability and caveats:** unavailable providers, errors, scope mismatches, freshness limits, and exact recovery steps.
10. **Artifact index:** paths to generated CSVs and a field dictionary.
## Quality gates before finishing
- Verify that target scope is explicit: root domain, subdomain, path, or exact URL.
- Verify market and language are stated; highlight defaults.
- Verify provider connection details do not appear in research artifacts, report tables, CSV output, or the final summary.
- Verify every headline metric names its provider and says `estimated` when it is not first-party data.
- Verify provider values were not added, averaged, or compared across mismatched markets, languages, scopes, or dates.
- Verify all recommended actions are evidence-backed and require human approval before website changes or publishing.
- If data is unavailable, complete the report with the availability log and the exact next input needed; do not return a fictional analysis.
## Final response to the user
State the target, market, language, available providers, top three observations, most important caveat, generated artifact paths, and the one decision the user should make next.儲存後請重新啟動 Codex,或開啟新工作階段並明確使用 $competitor-traffic-research 呼叫它。第一次執行時採用明確呼叫較可靠;之後 Codex 也能依工作描述自動比對。
第一次執行:從一個域名開始,而不是從十個開始
進入研究目錄並啟動 Codex。若某個資料來源尚未連線,Codex 會按 skill 處理相應設定;你不需要在正文的指引裡逐項處理 key。隨後輸入下面這句:
$competitor-traffic-research
請分析 competitor.com 的自然搜尋流量。使用所有可用的提供方;預設市場和語言即可。先說明計劃呼叫的報告型別、市場、語言和可能的計費請求數,再開始。如果你有自己的網站,第二次再增加它。這樣 Codex 才能做真正的內容缺口比較,而不是憑感覺判斷“這個詞我們沒做過”:
$competitor-traffic-research
我的網站是 mysite.com,競爭對手是 competitor.com。請在同一市場和語言下檢查自然搜尋內容缺口,只保留與 B2B 專案管理軟體相關、值得人工複核的機會。不要建議釋出頁面,先交付研究報告。這裡的“先交付研究報告”很重要。它把資料收集和網站改動分開了。讓 Codex 發現機會很快;決定是否寫一篇文章、更新一個產品頁或投入連結建設,仍然需要你看意圖、現有內容和業務價值。
讀懂輸出:不要只盯住“月流量”
一份可靠的報告會把“數字”翻譯成可以討論的線索。下面的讀法比比較誰的流量更大更有用。
你在報告裡看到的內容 | 先問什麼 | 可以採取的行動 | 不該得出的結論 |
|---|---|---|---|
某競爭者的預估自然流量上升 | 是哪些 URL 和關鍵詞帶動?市場、範圍和時間窗相同嗎? | 檢視增長頁面的搜尋意圖、內容格式、更新日期和內鏈位置 | “它一定做了某個 SEO 操作” |
一個工具頁遠高於其部落格 | 這些訪問來自什麼查詢,頁面解決了什麼可重複任務? | 評估你是否也有真實的輸入、規則與可解釋輸出可做工具頁 | “多做工具一定會有同樣流量” |
很多關鍵詞排在 4-15 名 | 這些詞是否匹配你的客戶和現有 URL? | 合併為主題簇,優先最佳化已有頁面或補內容缺口 | “把所有關鍵詞各寫一篇文章” |
Ahrefs 與 Semrush 數字差很大 | 域名範圍、國家資料庫、語言和日期一致嗎? | 以趨勢和共同出現的頁面/關鍵詞交叉驗證,記錄差異 | “取較大的一個就是正確答案” |
資料來源沒有返回流量 | 該市場、域名或套餐是否覆蓋? | 標為不可得,縮小範圍、換已授權源或等待配額恢復 | “沒有資料就等於沒有流量” |

先驗證,再行動。第三方流量資料適合幫助你提出好問題,而不是替你下結論。
一個虛構的閱讀示例
假設報告顯示 rival.example 的增長主要集中在 /templates/ 下的十個頁面,關鍵詞集中在“proposal template”“project brief template”等任務型搜尋。正確的下一步不是複製十個標題,而是驗證:你的客戶是否真的需要模板?你能否提供可以下載、修改或線上生成的版本?目前站內是否已有一個可以改進的資源頁?只有前三個答案都合理,才將它放進內容計劃。
遇到常見失敗時,按這個順序處理
症狀 | 最可能的原因 | 讓 Codex 做什麼 | 你需要做什麼 |
|---|---|---|---|
| 提供方連線未完成,或套餐沒有該報告許可權 | 停止重試;寫入 | 按 skill 的連線提示完成授權,或確認套餐許可權 |
| 額度不足或請求太密 | 儲存已完成結果,停止批次請求,報告未完成範圍 | 檢查餘額/額度;下次縮小域名數、行數或時間範圍 |
沒有關鍵詞或流量 | 域名太新、樣本太小、選錯國家/語言,或 API 覆蓋有限 | 將“無資料”和“零流量”分開寫;檢查根域名與子域名 | 確認目標範圍和市場;必要時提供同類競爭者 |
報告看起來互相矛盾 | 使用了不同資料庫、日期、裝置或 URL scope | 不合並指標;輸出可比性檢查表 | 指定一個業務市場作為主報告,另一個僅做交叉驗證 |
某個提供方無法連線 | skill 找不到可用連線、許可權或配置 | 標記該提供方不可用,繼續使用其餘資料來源 | 按 Codex 給出的連線步驟完成一次設定後重跑 |
把一次分析變成每月可用的競爭情報
第一次報告解決“現在看到了什麼”;每月複查才會告訴你變化是否值得行動。不要一上來監控五十個域名。對一個小團隊而言,選擇 3-5 個直接或自然搜尋競爭者,保持同一市場和語言,已經足夠。
每月讓 Codex 復跑同一 skill,並額外問四個問題:
- 哪些頁面的預估可見性或排名關鍵詞變化最大?
- 變化來自新頁面、已有頁面更新,還是關鍵詞排名改變?資料能否支援這個判斷?
- 哪三個主題與你的業務最相關,但你現有 URL 沒有很好回答?
- 哪個機會應該“更新已有頁面”“新增一個內容資產”或“暫不做”?為什麼?
儲存每次的 research-scope.md 和報告,而不是隻儲存最終表格。市場、語言、提供方、獲取時間與資料空缺會讓三個月後的趨勢比較仍然能被解釋。
完成檢查清單
- [ ] 已經確認分析範圍是根域名、子域名、路徑還是單個 URL。
- [ ] 已選擇並在報告中寫明國家/市場與語言;若使用預設值,已明確寫出。
- [ ] 所需資料來源已經由 skill 連線完成,且報告沒有混入連線設定。
- [ ] Codex 在呼叫前說明了提供方、報告型別和可能的計費範圍。
- [ ] 報告為每個估算數字保留了提供方、獲取時間和指標定義。
- [ ] 沒有把 Ahrefs、Semrush、DataForSEO 的估算相加,也沒有把它們當作真實 Analytics。
- [ ] 熱門頁面和關鍵詞被轉成了有限、可人工複核的行動,而不是一份無窮長的關鍵詞清單。
- [ ] 任何內容更新、釋出或網站改動都留給下一步的人工批准。
常見問題
我只給 Codex 一個域名,真的可以嗎?
可以。skill 有美國/英語的預設資料庫,因此最少輸入可以是域名和已經在安全環境中配置好的一個資料來源。只是預設市場未必是你的客戶所在市場。只要你開始做本地、非英語或特定國家業務,就應該明確提供國家和語言。
我需要同時購買 Ahrefs、Semrush 和 DataForSEO 嗎?
不需要。一個已授權的、覆蓋你的目標市場的資料來源足以開始。第二個來源主要用於重要決策的交叉驗證,或補充第一個來源沒有的報告。不要為了讓報告“看起來全面”而購買你不會使用的 API 單位。
為什麼競爭者在 Similarweb 或工具後臺顯示的總訪問量和這裡不同?
指標範圍不同。本文的主流程關注自然搜尋可見性、頁面與關鍵詞;一些產品提供的是所有渠道的訪問估算。先看它是否包含直接、引薦、社交和付費渠道,再決定能否比較。無論哪一種,第三方資料都不等於對方第一方分析資料。
Codex 能否替我判斷要寫哪些文章?
它可以基於證據提出有限的候選和風險提示,但不應該自行釋出。關鍵詞與頁面資料看不到你的銷售對話、產品能力、法務要求或內容資源。將 Codex 的輸出當作研究助理的備忘錄,再由內容、產品或銷售負責人批准。










