# AccountHistory

> How much an account gained over its last days, and how that compares with the period before.

Canonical page: https://okdata.online/docs/objects/account_history/

The same shape on every platform. A field a platform does not have is null, and meta.unavailable says why. Use fields= to keep only what you need.

| Field | Type | Description |
|---|---|---|
| `id` | string | O ID numérico da conta (a consultada). |
| `name` | string \| null | Nome de exibição. |
| `url` | string \| null | Link do perfil. |
| `avatar_url` | string \| null | Avatar. |
| `days` | integer | How many of the most recent days the figures cover. |
| `gained` | AccountGain | O que a conta ganhou no período. |
| `change` | AccountChange | Each gain against the same length of time before, as a ratio: 0.3 is 30% more, -0.5 is half. |
| `totals` | AccountTotals \| null | Totais até agora. |
| `ext` | object | Extras específicos da plataforma. Retornados apenas com view=full. |

### AccountGain

| Field | Type | Description |
|---|---|---|
| `followers` | integer \| null | Net followers gained; negative when the account lost followers. |
| `likes` | integer \| null | Curtidas recebidas. |
| `comments` | integer \| null | Comentários recebidos. |
| `shares` | integer \| null | Compartilhamentos recebidos. |
| `posts` | integer \| null | Posts publicados. |

### AccountChange

| Field | Type | Description |
|---|---|---|
| `followers` | number \| null | Variação no ganho líquido de seguidores. |
| `likes` | number \| null | Variação nas curtidas recebidas. |
| `comments` | number \| null | Variação nos comentários recebidos. |
| `shares` | number \| null | Variação nos compartilhamentos recebidos. |
| `posts` | number \| null | Variação nos posts publicados. |

### AccountTotals

| Field | Type | Description |
|---|---|---|
| `followers` | integer \| null | Seguidores atuais. |
| `likes` | integer \| null | Total de curtidas recebidas. |
| `posts` | integer \| null | Total de posts. |

## Endpoints that return a AccountHistory

- [Crescimento de conta do Douyin](https://okdata.online/apis/douyin/users/history/) (`douyin.users.history`): $0.002 per call

## Fields by view

Each view includes the fields of the views above it. `view=compact` is the smallest; `full` adds platform extras under `ext`.

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