# 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 numérique du compte (celui demandé). |
| `name` | string \| null | Nom affiché. |
| `url` | string \| null | Lien du profil. |
| `avatar_url` | string \| null | Avatar. |
| `days` | integer | How many of the most recent days the figures cover. |
| `gained` | AccountGain | Ce que le compte a gagné sur la période. |
| `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 | Totaux à ce jour. |
| `ext` | object | Données propres à la plateforme. Renvoyées uniquement avec view=full. |

### AccountGain

| Field | Type | Description |
|---|---|---|
| `followers` | integer \| null | Net followers gained; negative when the account lost followers. |
| `likes` | integer \| null | J'aime reçus. |
| `comments` | integer \| null | Commentaires reçus. |
| `shares` | integer \| null | Partages reçus. |
| `posts` | integer \| null | Publications publiées. |

### AccountChange

| Field | Type | Description |
|---|---|---|
| `followers` | number \| null | Variation du gain net d'abonnés. |
| `likes` | number \| null | Variation des j'aime reçus. |
| `comments` | number \| null | Variation des commentaires reçus. |
| `shares` | number \| null | Variation des partages reçus. |
| `posts` | number \| null | Variation des publications. |

### AccountTotals

| Field | Type | Description |
|---|---|---|
| `followers` | integer \| null | Abonnés actuels. |
| `likes` | integer \| null | Total des j'aime reçus. |
| `posts` | integer \| null | Publications au total. |

## Endpoints that return a AccountHistory

- [Croissance d'un compte 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`
