# 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 | El ID numérico de la cuenta (la consultada). |
| `name` | string \| null | Nombre visible. |
| `url` | string \| null | Enlace al perfil. |
| `avatar_url` | string \| null | Avatar. |
| `days` | integer | How many of the most recent days the figures cover. |
| `gained` | AccountGain | Lo que ganó la cuenta en el 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 | Totales a la fecha. |
| `ext` | object | Datos adicionales propios de la plataforma. Solo se devuelven con view=full. |

### AccountGain

| Field | Type | Description |
|---|---|---|
| `followers` | integer \| null | Net followers gained; negative when the account lost followers. |
| `likes` | integer \| null | Me gusta recibidos. |
| `comments` | integer \| null | Comentarios recibidos. |
| `shares` | integer \| null | Veces compartido. |
| `posts` | integer \| null | Publicaciones publicadas. |

### AccountChange

| Field | Type | Description |
|---|---|---|
| `followers` | number \| null | Variación de seguidores netos ganados. |
| `likes` | number \| null | Variación de me gusta recibidos. |
| `comments` | number \| null | Variación de comentarios recibidos. |
| `shares` | number \| null | Variación de compartidos recibidos. |
| `posts` | number \| null | Variación de publicaciones. |

### AccountTotals

| Field | Type | Description |
|---|---|---|
| `followers` | integer \| null | Seguidores actuales. |
| `likes` | integer \| null | Total de me gusta recibidos. |
| `posts` | integer \| null | Publicaciones en total. |

## Endpoints that return a AccountHistory

- [Crecimiento de cuentas de 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`
