# AccountHistory

> 帳號最近一段時間的增長，以及與上一段時間的對比。

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

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

| 欄位 | 型別 | 說明 |
|---|---|---|
| `id` | string | 帳號的數字 ID（即所查的那個）。 |
| `name` | string \| null | 暱稱。 |
| `url` | string \| null | 主頁連結。 |
| `avatar_url` | string \| null | 頭像。 |
| `days` | integer | 資料覆蓋最近多少天。 |
| `gained` | AccountGain | 這段時間的增量。 |
| `change` | AccountChange | 每項增量與上一段同樣長時間相比的變化：0.3 即多 30%，-0.5 即減半。 |
| `totals` | AccountTotals \| null | 截至現在的總量。 |
| `ext` | object | 平台特有欄位，只在 view=full 時返回。 |

### AccountGain

| 欄位 | 型別 | 說明 |
|---|---|---|
| `followers` | integer \| null | 淨增粉絲；掉粉時為負數。 |
| `likes` | integer \| null | 新增獲贊。 |
| `comments` | integer \| null | 新增評論。 |
| `shares` | integer \| null | 新增分享。 |
| `posts` | integer \| null | 釋出的作品數。 |

### AccountChange

| 欄位 | 型別 | 說明 |
|---|---|---|
| `followers` | number \| null | 淨增粉絲的變化。 |
| `likes` | number \| null | 新增獲讚的變化。 |
| `comments` | number \| null | 新增評論的變化。 |
| `shares` | number \| null | 新增分享的變化。 |
| `posts` | number \| null | 釋出作品數的變化。 |

### AccountTotals

| 欄位 | 型別 | 說明 |
|---|---|---|
| `followers` | integer \| null | 當前粉絲數。 |
| `likes` | integer \| null | 累計獲贊。 |
| `posts` | integer \| null | 作品總數。 |

## 返回 AccountHistory 的介面

- [抖音達人互動與粉絲趨勢](https://okdata.online/zh/apis/douyin/users/history/) (`douyin.users.history`): $0.002/次

## 各 view 返回的欄位

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

- compact：`id`, `name`, `url`, `days`, `gained`, `change`
- standard：`avatar_url`, `totals`
- full：`ext`
