# KeywordHistory

> 關鍵詞在平台指數工具裡的逐日指數。

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

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

| 欄位 | 型別 | 說明 |
|---|---|---|
| `keyword` | string | 關鍵詞。 |
| `points` | KeywordPoint[] | 逐日資料，一天一條，從早到晚。 |
| `ext` | object | 平台特有欄位，只在 view=full 時返回。 |

### KeywordPoint

| 欄位 | 型別 | 說明 |
|---|---|---|
| `date` | string | 日期：中國時間（UTC+8）的一個自然日，寫成該日期的 UTC 零點。 |
| `search_index` | integer \| null | 當天的搜尋指數：平台對搜尋熱度的度量，不是搜尋次數；指數還沒出的日子為 null。 |
| `composite_index` | integer \| null | 當天的綜合指數：平台對相關內容關注度的度量，不是次數；指數還沒出的日子為 null。 |
| `notes` | integer \| null | 當天與該詞相關的內容數。 |
| `impressions` | integer \| null | 這些內容當天的曝光次數。 |
| `views` | integer \| null | 這些內容當天的閱讀次數。 |
| `engagements` | integer \| null | 這些內容當天的互動數。 |

## 返回 KeywordHistory 的介面

- [抖音巨量算數關鍵詞熱度趨勢](https://okdata.online/zh/apis/douyin/index/keywords/history/) (`douyin.index.keywords.history`): $0.006/次 · 每頁約 1 條結果
- [小紅書蒲公英關鍵詞搜尋指數](https://okdata.online/zh/apis/xiaohongshu/pgy/keywords/history/) (`xiaohongshu.pgy.keywords.history`): $0.04/次
- [微信指數](https://okdata.online/zh/apis/wechat/index/keywords/history/) (`wechat.index.keywords.history`): $0.15/次 · 每頁約 1 條結果

## 各 view 返回的欄位

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

- compact：`keyword`, `points`
- standard：—
- full：`ext`
