# 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 | L'ID numerico dell'account (quello richiesto). |
| `name` | string \| null | Nome visualizzato. |
| `url` | string \| null | Link al profilo. |
| `avatar_url` | string \| null | Avatar. |
| `days` | integer | How many of the most recent days the figures cover. |
| `gained` | AccountGain | Cosa ha guadagnato l'account nel periodo. |
| `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 | Totali ad oggi. |
| `ext` | object | Dati aggiuntivi specifici della piattaforma. Restituiti solo con view=full. |

### AccountGain

| Field | Type | Description |
|---|---|---|
| `followers` | integer \| null | Net followers gained; negative when the account lost followers. |
| `likes` | integer \| null | Mi piace ricevuti. |
| `comments` | integer \| null | Commenti ricevuti. |
| `shares` | integer \| null | Condivisioni ricevute. |
| `posts` | integer \| null | Post pubblicati. |

### AccountChange

| Field | Type | Description |
|---|---|---|
| `followers` | number \| null | Variazione dei follower netti acquisiti. |
| `likes` | number \| null | Variazione dei Mi piace ricevuti. |
| `comments` | number \| null | Variazione dei commenti ricevuti. |
| `shares` | number \| null | Variazione delle condivisioni ricevute. |
| `posts` | number \| null | Variazione dei post pubblicati. |

### AccountTotals

| Field | Type | Description |
|---|---|---|
| `followers` | integer \| null | Follower attuali. |
| `likes` | integer \| null | Mi piace ricevuti in totale. |
| `posts` | integer \| null | Post in totale. |

## Endpoints that return a AccountHistory

- [Crescita account 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`
