# SiteTraffic

> 網站流量估算：月訪問量、全球和類目排名、訪問質量、主要國家、流量來源、關鍵詞、相似網站和訪客畫像。

網頁版：https://okdata.online/zh/docs/objects/site_traffic/

所有平台同一種結構。平台沒有的欄位為 null，meta.unavailable 會說明原因。用 fields= 只取需要的欄位。

| 欄位 | 型別 | 說明 |
|---|---|---|
| `id` | string | 域名。 |
| `url` | string \| null | 分析平台上的網站頁。 |
| `category` | string \| null | 網站類目，平台原文。 |
| `global_rank` | integer \| null | 全球網站排名。 |
| `country_rank` | integer \| null | 在主要國家的排名。 |
| `category_rank` | integer \| null | 類目排名。 |
| `monthly_visits` | integer \| null | snapshot_date 所在月份的估算訪問量。 |
| `bounce_rate` | number \| null | 只看一頁就離開的訪問佔比，0 到 1。 |
| `pages_per_visit` | number \| null | 每次訪問瀏覽的頁數。 |
| `avg_visit_seconds` | integer \| null | 平均訪問時長（秒）。 |
| `top_countries` | object \| null | 各國家（ISO 程式碼）的訪問佔比，0 到 1，由多到少。 |
| `traffic_sources` | object \| null | 各來源的訪問佔比（直接、搜尋、社交、外鏈、郵件、付費），按平台給出的。 |
| `top_keywords` | string[] \| null | 帶來訪問的搜尋關鍵詞，由多到少。 |
| `competitors` | string[] \| null | 相似網站（域名）。 |
| `audience` | object \| null | 訪客的性別、年齡分佈，以及他們還常訪問的網站、話題和類目；僅訪客畫像介面給出。 |
| `snapshot_date` | string \| null | 估算所屬月份（ISO 日期）。 |
| `ext` | object | 平台特有欄位，只在 view=full 時返回。 |

## 返回 SiteTraffic 的介面

- [網站流量](https://okdata.online/zh/apis/similarweb/sites/get/) (`similarweb.sites.get`): $0.003/次
- [網站訪客畫像](https://okdata.online/zh/apis/similarweb/sites/audience/get/) (`similarweb.sites.audience.get`): $0.003/次
- [相似網站](https://okdata.online/zh/apis/similarweb/sites/competitors/list/) (`similarweb.sites.competitors.list`): $0.003/次 · 每頁約 20 條結果

## 各 view 返回的欄位

每一級 view 都包含上一級的欄位。`view=compact` 最精簡；`full` 會在 `ext` 里加上平台特有欄位。

- compact：`id`, `url`, `category`, `global_rank`, `monthly_visits`, `snapshot_date`
- standard：`country_rank`, `category_rank`, `bounce_rate`, `pages_per_visit`, `avg_visit_seconds`, `top_countries`, `traffic_sources`, `top_keywords`, `competitors`, `audience`
- full：`ext`
