# 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`
