流量觀察 API
公開取用台灣網站每月的造訪估算、搜尋與 AI 導流、Radar 排名與標籤彙整本頁的資料來源與計算方式
使用規則
- 基底網址
https://traffic.observe.tw,全部是GET,回傳 UTF-8 JSON(CSV 與圖示除外)。不需要 API 金鑰。 - 允許跨網域(CORS
Access-Control-Allow-Origin: *),瀏覽器前端可直接呼叫。 - 造訪量單位是百萬次(
757.3= 757.3m);占比與成長率是 0–1 的小數(0.36= 36%);月份寫成YYYYMM;時間一律是 UTC 的 ISO 8601。 - 數字是 Similarweb 的造訪估算,不是 page views。Similarweb 沒有估算的月份改用從 Similarweb 平台補登的數字或 GeneHong 試算表,以
visitsSource標明;Similarweb 回傳 0 視為沒有估算。 - Similarweb 每小時更新一批網域、Cloudflare Radar 每天一次;請勿以高於每 10 分鐘的頻率輪詢。
- 錯誤回
{"error": "..."}加上 HTTP 狀態碼,例如404找不到網域或標籤。 - 路徑與參數中的網域、標籤請 URL 編碼。網頁上的排行預設排除「非台灣」,API 不會,需要時請自行傳
exclude。 v1只做向後相容的變更(新增欄位、新增端點);移除或改名會先在這份文件公告。- 使用資料請註明「資料來源:流量觀察 traffic.observe.tw(Similarweb 估算)」。
快速開始
命令列(curl + jq)
# 2026 年 9 月的排行,排除「非台灣」,取前 10 名
curl -s 'https://traffic.observe.tw/api/v1/rankings?month=202609&exclude=%E9%9D%9E%E5%8F%B0%E7%81%A3' | jq '.sites[:10][] | {rank, name, visits}'
# 單一網站每個月的造訪量(百萬次)
curl -s 'https://traffic.observe.tw/api/v1/sites/udn.com' | jq -r '.months[] | [.month, .similarweb // .manual // .sheet] | @tsv'JavaScript(瀏覽器或 Node 18+)
const res = await fetch('https://traffic.observe.tw/api/v1/rankings?month=202609&topic=' + encodeURIComponent('新聞'));
const { sites } = await res.json();
for (const s of sites.slice(0, 10)) console.log(s.rank, s.name, s.visits.toFixed(2) + 'm');Python
import requests
r = requests.get("https://traffic.observe.tw/api/v1/topics/all", params={"topic": "新聞"})
for s in r.json()["sites"][:10]:
print(s["name"], s["visits"])端點一覽
| 端點 | 用途 |
|---|---|
GET /api/v1/months | 有流量資料的月份 |
GET /api/v1/rankings | 單一月份的網站排行 |
GET /api/v1/rankings.csv | 同上,以 CSV 下載 |
GET /api/v1/history | 所有月份、所有網站的造訪量,一次取得 |
GET /api/v1/sites/{domain} | 單一網站的每月數字、試算表紀錄與抓取狀態 |
GET /api/v1/tags/{domain} | 單一網站的每個標籤、來源與投票數 |
GET /api/v1/tech | 各網站首頁偵測到的技術與統計 |
GET /api/v1/tech/{domain} | 單一網域的技術偵測結果、依據與檢查紀錄 |
GET /api/v1/topics/all | 跨月份的標籤彙整 |
GET /api/v1/topics | 單一月份的標籤統計與成長 |
GET /icon/{domain} | 網站圖示(64×64 PNG) |
GET /api/v1/status | Similarweb 抓取排程與最近批次 |
GET /api/v1 | 端點索引(JSON) |
GET /api/v1/openapi.json | OpenAPI 3.1 規格 |
排行
GET/api/v1/months
有流量資料的月份
curl -s 'https://traffic.observe.tw/api/v1/months'在瀏覽器開啟這個範例 ↗回應欄位1 個
months | string[] | YYYYMM,新到舊 |
GET/api/v1/rankings
單一月份的網站排行
依造訪量由大到小。topic、exclude、source 可同時使用;名次在篩選後剩下的網站之間重新計算。沒有 Similarweb 估算的月份用 Pro 補登或試算表數字,visitsSource 會註明。
| 參數 | 型別 | 說明 |
|---|---|---|
month | string (YYYYMM) | 資料月份;不在資料範圍內時改用最新月份,預設 最新月份 |
topic | string | 只列出有這個標籤的網站 |
exclude | string | 排除有這些標籤的網站,以逗號分隔(例如 非台灣,內容農場);API 不套網頁的預設排除 |
source | "tag" | "blog" | "manual" | 只列出某個追蹤來源的網域;manual 包含試算表與手動加入 |
from | string (YYYYMM) | 比較月份:成長、前期名次與各占比的前期值都和它比較,預設 前一個有資料的月份 |
curl -s 'https://traffic.observe.tw/api/v1/rankings?month=202609&exclude=%E9%9D%9E%E5%8F%B0%E7%81%A3'在瀏覽器開啟這個範例 ↗回應欄位28 個
month | string (YYYYMM) | 實際使用的月份 |
topic | string | null | |
exclude | string[] | 實際排除的標籤(不存在的標籤會被略過) |
source | string | null | |
topics | object[] | 這個月份(套用 source 後、排除前)各標籤的網站數 |
topics[].topic | string | |
topics[].sites | integer | |
sites | object[] | 排行 |
sites[].rank | integer | 依造訪量的名次,只在篩選後的網站之間計算 |
sites[].domain | string | 網域 |
sites[].name | string | 網站名稱(人工值優先,其次試算表) |
sites[].group | string | null | 試算表 A 欄(原表標籤 A) |
sites[].topics | string[] | 目前的標籤 |
sites[].visits | number | 當月造訪量,百萬次 |
sites[].prevVisits | number | null | 比較月份的造訪量,百萬次 |
sites[].growth | number | null | 與比較月份相比的成長率(0.1=10%) |
sites[].prevRank | integer | null | 比較月份在同一篩選下的名次 |
sites[].visitsSource | "similarweb" | "manual" | "sheet" | 造訪量來源:Similarweb 免費資料、從 Similarweb 平台手動補登、GeneHong 試算表 |
sites[].searchShare | number | null | 自然搜尋占造訪的比例(0–1,不含付費搜尋) |
sites[].aiShare | number | null | GenAI 導流占比(0–1) |
sites[].taiwanShare | number | null | 台灣訪客占比(0–1) |
sites[].searchVisits | number | null | 搜尋S:造訪量 × 自然搜尋占比,百萬次 |
sites[].aiVisits | number | null | AI:造訪量 × GenAI 占比,百萬次 |
sites[].prevSearchShare | number | null | 比較月份的自然搜尋占比 |
sites[].prevAiShare | number | null | 比較月份的 GenAI 占比 |
sites[].prevTaiwanShare | number | null | 比較月份的台灣訪客占比 |
sites[].channels | object | null | 當月 Similarweb 各導流來源占比:Direct、SearchOrganic、SearchPaid、SocialOrganic、SocialPaid、Referrals、Mail、DisplayAds、GenAi、Affiliate(0–1);沒有 Similarweb 估算時為 null |
sites[].prevChannels | object | null | 比較月份的各導流來源占比 |
GET/api/v1/rankings.csv
同上,以 CSV 下載
UTF-8(含 BOM),欄位:名次、網站名、網域、原表標籤 A、標籤、流量(百萬)、成長、上月名次、搜尋S、AI、搜尋占比、AI占比、台灣占比、來源。
| 參數 | 型別 | 說明 |
|---|---|---|
month | string (YYYYMM) | 資料月份;不在資料範圍內時改用最新月份,預設 最新月份 |
topic | string | 只列出有這個標籤的網站 |
exclude | string | 排除有這些標籤的網站,以逗號分隔(例如 非台灣,內容農場);API 不套網頁的預設排除 |
source | "tag" | "blog" | "manual" | 只列出某個追蹤來源的網域;manual 包含試算表與手動加入 |
from | string (YYYYMM) | 比較月份:成長、前期名次與各占比的前期值都和它比較,預設 前一個有資料的月份 |
curl -s 'https://traffic.observe.tw/api/v1/rankings.csv?month=202609&topic=%E6%96%B0%E8%81%9E'在瀏覽器開啟這個範例 ↗歷史與網站
GET/api/v1/history
所有月份、所有網站的造訪量,一次取得
首頁就是讀這一份資料。每個網站、每個月是一個五格陣列,欄位意義見 fields。回應約數 MB,快取 5 分鐘。
curl -s 'https://traffic.observe.tw/api/v1/history'在瀏覽器開啟這個範例 ↗回應欄位16 個
generatedAt | string (ISO 時間) | |
months | string[] | YYYYMM,舊到新 |
fields | string[] | 每月陣列的欄位:造訪量、搜尋S、AI(百萬次)、台灣占比、來源(0 Similarweb、1 試算表、2 平台補登) |
topics | string[] | 所有用到的標籤 |
sources | object[] | 各追蹤來源的網域數(tag、blog、manual) |
sites | object | 以網域為鍵 |
sites.<domain>.name | string | |
sites.<domain>.group | string | null | |
sites.<domain>.topics | string[] | |
sites.<domain>.src | string[] | 定期追蹤這個網域的來源(tag、blog、sheet、manual) |
sites.<domain>.m.<YYYYMM> | [number, number | null, number | null, number | null, 0 | 1 | 2] | |
radar | object | 以網域為鍵的 Cloudflare Radar 排名,舊到新 |
radar.<domain>[].date | string (YYYY-MM-DD) | |
radar.<domain>[].rank | integer | null | 前 100 名的確切名次 |
radar.<domain>[].bucket | integer | null | 「前 N 名」級距 |
radar.<domain>[].gt | integer | null | 「未入前 N 名」 |
GET/api/v1/sites/{domain}
單一網站的每月數字、試算表紀錄與抓取狀態
每個月分開列出 Similarweb、平台補登與試算表三種數字;網站頁用的就是這一份。沒有任何資料的網域回 404。
| 參數 | 型別 | 說明 |
|---|---|---|
domain路徑 | string | 網域,例如 udn.com |
curl -s 'https://traffic.observe.tw/api/v1/sites/udn.com'在瀏覽器開啟這個範例 ↗回應欄位20 個
domain | string | |
name | string | |
topics | string[] | |
months | object[] | 舊到新 |
months[].month | string (YYYYMM) | |
months[].similarweb | number | null | Similarweb 免費資料的造訪量,百萬次 |
months[].noEstimate | boolean | Similarweb 回傳 0,表示這個月沒有估算 |
months[].manual | number | null | 從 Similarweb 平台手動補登的造訪量,百萬次 |
months[].sheet | number | null | 試算表的造訪量,百萬次 |
months[].searchShare | number | null | |
months[].aiShare | number | null | |
months[].taiwanShare | number | null | |
labels | object[] | 試算表原始紀錄:month、name、group(A 欄)、topics(B 欄)、visits、adjusted(人工調整,不採用) |
profile | object | null | Similarweb 最新一個有估算的月份的組成:month、countries(前 5 名 code、share)、channels(Direct、SearchOrganic、SearchPaid、SocialOrganic、SocialPaid、Referrals、Mail、DisplayAds、GenAi、Affiliate 的占比)、bounceRate、pagesPerVisit、timeOnSite(秒)、globalRank、countryRank、categoryRank |
category | string | null | Similarweb 的網站類別,例如 Finance/Investing |
similarSites | string[] | Similarweb 列出的相似網站 |
tags | object[] | 每個標籤的來源與票數,同 /api/v1/tags/{domain} |
watchers | object[] | 追蹤這個網域的來源:requester、kind、requestedAt |
radar | object[] | Cloudflare Radar:dateStart、dateEnd、rank、bucket、bucketLowerBound、fetchedAt |
state | object | null | Similarweb 抓取狀態:lastSuccessAt、lastAttemptAt、nextAttemptAt、failures、lastError |
GET/icon/{domain}
網站圖示(64×64 PNG)
只回應本站已知的網域;圖示由伺服器向 Google favicon 服務抓取並快取 30 天。沒有圖示時回 404。
| 參數 | 型別 | 說明 |
|---|---|---|
domain路徑 | string | 網域 |
curl -s 'https://traffic.observe.tw/icon/udn.com'在瀏覽器開啟這個範例 ↗標籤
GET/api/v1/tags/{domain}
單一網站的每個標籤、來源與投票數
包含未顯示的標籤。編輯清單(或試算表)的標籤一律顯示;AI 初判在不同意比同意多 2 票時隱藏;讀者新增的標籤在同意多於不同意時顯示;管理員覆寫優先。只回票數,不回投票者。未知網域回 404。
| 參數 | 型別 | 說明 |
|---|---|---|
domain路徑 | string | 網域,例如 udn.com |
curl -s 'https://traffic.observe.tw/api/v1/tags/udn.com'在瀏覽器開啟這個範例 ↗回應欄位8 個
domain | string | |
tags | object[] | 顯示中的在前 |
tags[].tag | string | |
tags[].source | "editor" | "sheet" | "ai" | "community" | "admin" | 編輯清單、試算表、AI 初判、讀者新增、管理員覆寫 |
tags[].visible | boolean | 是否顯示在網站與排行上 |
tags[].agrees | integer | |
tags[].disagrees | integer | |
tags[].adminOverride | "set" | "hide" | null |
GET/api/v1/topics/all
跨月份的標籤彙整
以網站目前的標籤彙整所有已知月份;同一網域在一個標籤內只算一次。指定 topic 時另附該標籤的完整網站清單;不存在的標籤回 404。
| 參數 | 型別 | 說明 |
|---|---|---|
topic | string | 加上這個標籤的網站清單 |
curl -s 'https://traffic.observe.tw/api/v1/topics/all?topic=%E6%96%B0%E8%81%9E'在瀏覽器開啟這個範例 ↗回應欄位11 個
scope | "all" | |
months | string[] | 有流量資料的月份 |
topics | object[] | 依累計造訪量排序 |
topics[].topic | string | |
topics[].sites | integer | 網站數(含尚無流量的網站) |
topics[].sitesWithData | integer | |
topics[].visits | number | null | 累計造訪量,百萬次 |
topics[].searchShare | number | null | 以有資料的網站月份加權 |
topics[].aiShare | number | null | |
topic | string | 指定 topic 時才有 |
sites | object[] | 指定 topic 時才有:domain、name、topics、months(有資料月數)、visits、searchShare、aiShare |
GET/api/v1/topics
單一月份的標籤統計與成長
舊版介面,保留給既有使用者;新的使用方式請用 /api/v1/topics/all。
| 參數 | 型別 | 說明 |
|---|---|---|
month | string (YYYYMM) | 資料月份;不在資料範圍內時改用最新月份,預設 最新月份 |
curl -s 'https://traffic.observe.tw/api/v1/topics?month=202609'在瀏覽器開啟這個範例 ↗回應欄位9 個
month | string (YYYYMM) | |
topics[].topic | string | |
topics[].sites | integer | |
topics[].visits | number | 當月造訪量合計,百萬次 |
topics[].visitsGrowth | number | null | |
topics[].searchShare | number | null | |
topics[].aiShare | number | null | |
topics[].searchGrowth | number | null | |
topics[].aiGrowth | number | null |
網站技術
GET/api/v1/tech
各網站首頁偵測到的技術與統計
範圍是所有追蹤清單與試算表的網域。每個首頁約一個月檢查一次,比對 Wappalyzer 社群版規則中本站列出的技術;「unknown」表示首頁沒有清單內技術的痕跡,不代表沒有技術。technologies 依 source 篩選後計算,sites 再依 category、technology、status 篩選。
| 參數 | 型別 | 說明 |
|---|---|---|
source | "tag" | "blog" | "manual" | 只看某個追蹤來源的網域 |
category | string | 只列出有這類技術的網站,例如 cms、cdn、analytics、ads |
technology | string | 只列出用這項技術的網站,例如 wordpress |
status | "detected" | "unknown" | "failed" | "blocked" | "unchecked" | 只列出最近一次是這個結果的網站 |
curl -s 'https://traffic.observe.tw/api/v1/tech?technology=wordpress'在瀏覽器開啟這個範例 ↗回應欄位9 個
rules | string | null | 目前的規則版本(wappalyzer-<commit 前 12 碼>) |
coverage | object | sites、checked、withSnapshot(有成功結果)、detected、unknown、failed、blocked |
technologies[] | object | id、name、category、sites(用它的網站數),多到少 |
sites[].domain | string | |
sites[].status | "detected" | "unknown" | "failed" | "blocked" | null | 最近一次檢查的結果;null 是還沒檢查 |
sites[].errorCode | string | null | robots、waf、rate-limit、http-error、not-html、timeout、network、address |
sites[].observedAt | string | null | 保留的成功結果是何時讀到的;之後失敗也會保留 |
sites[].origin | "traffic" | "blog" | null | blog 是從 blog.observe.tw 併入、本站還沒自己檢查過的結果 |
sites[].detections[] | object | id、name、category、version(只來自 meta generator,否則 unknown) |
GET/api/v1/tech/{domain}
單一網域的技術偵測結果、依據與檢查紀錄
任何檢查過的網域都有,包括有人在 /tech/ 查詢、不在追蹤清單裡的網域。沒檢查過回 404。
| 參數 | 型別 | 說明 |
|---|---|---|
domain路徑 | string | 網域,例如 udn.com |
curl -s 'https://traffic.observe.tw/api/v1/tech/udn.com'在瀏覽器開啟這個範例 ↗回應欄位9 個
status | "detected" | "unknown" | "failed" | "blocked" | 最近一次檢查的結果 |
errorCode | string | null | |
httpStatus | integer | null | |
lastAttemptAt | string | |
observedAt | string | null | |
sourceUrl | string | null | 讀到的頁面(轉址後,去掉查詢字串) |
ruleVersion | string | null | |
origin | "traffic" | "blog" | |
detections[] | object | id、name、category、confidence(0–1,CDN 與主機最多 0.4)、version、ruleId、ruleVersion、observedAt、evidence(kind 與固定的規則類別說明,不含頁面內容) |
抓取與服務
GET/api/v1/status
Similarweb 抓取排程與最近批次
抓取狀態頁用的資料。每小時一輪,每輪最多 budget 個網域。
curl -s 'https://traffic.observe.tw/api/v1/status'在瀏覽器開啟這個範例 ↗回應欄位9 個
budget | integer | 每輪上限 |
priority | string[] | 來源的優先序 |
coolingDownUntil | string (ISO 時間) | null | 被 Similarweb 拒絕後暫停到何時 |
watched | integer | 追蹤中的網域數 |
due | integer | 目前到期的網域數 |
queue | object[] | 排程:domain、position、requester、reason(new、refresh、catch-up、lookup)、lastSuccessAt、expectedAt |
watchers | object[] | 各來源與類型的網域數:requester、kind、domains |
last24h | object | 近 24 小時的請求結果計數 |
runs | object[] | 最近批次:startedAt、finishedAt、budget、sent、ok、failed、refused、note |
GET/api/v1
端點索引(JSON)
curl -s 'https://traffic.observe.tw/api/v1/'在瀏覽器開啟這個範例 ↗回應欄位4 個
service | string | |
docs | string | 這份文件的網址 |
openapi | string | OpenAPI 規格的網址 |
endpoints | object | 「方法 路徑」對應用途 |
GET/api/v1/openapi.json
OpenAPI 3.1 規格
curl -s 'https://traffic.observe.tw/api/v1/openapi.json'在瀏覽器開啟這個範例 ↗