# TikTok follows in the PubNio analytics API

For a TikTok video, `follows` is `new_followers`. For the account, PubNio reads `daily_new_followers` into two metrics at once, `follows` and `follower_gained`, so the two always match. `follower_lost` is `daily_lost_followers`, and `followers` is the current count.

## What PubNio returns

| Metric | Scope | TikTok field | Unit | Combines by |
| --- | --- | --- | --- | --- |
| `follows` | post | `new_followers` | count | sum |
| `follows` | account | `daily_new_followers` | count | sum |
| `follower_gained` | account | `daily_new_followers` | count | sum |
| `follower_lost` | account | `daily_lost_followers` | count | sum |
| `followers` | account | `followers_count`, else the latest `daily_total_followers` (lifetime total only) | count | latest |

`follows`: New follows attributed to the post or gained in the period.

`follower_gained`: Followers gained in the period.

`follower_lost`: Followers lost in the period.

`followers`: Current follower or subscriber count; a stock, never summed.

## How PubNio reads it

- `followers` is the response's `followers_count`; if it is absent, PubNio takes the latest dated `daily_total_followers` in the rows.
- Both account metrics are declared as renamed from `daily_new_followers`.

## Example

The capabilities endpoint answers without calling TikTok. Under the TikTok provider, these are its entries for `follows`.

```http
GET /api/v1/workspaces/4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b/analytics/capabilities
Authorization: Bearer pn_live_***
```

```json
[
  {
    "key": "follows",
    "scope": "post",
    "granularity": "day",
    "unit": "count",
    "aggregation": "sum",
    "availability": "available",
    "supported": true,
    "renamedFrom": "new_followers"
  },
  {
    "key": "follows",
    "scope": "account",
    "granularity": "day",
    "unit": "count",
    "aggregation": "sum",
    "availability": "available",
    "supported": true,
    "renamedFrom": "daily_new_followers"
  }
]
```

## Limits

- PubNio stops re-reading a TikTok post 366 days after it is published, so a post's `follows` stops changing then.
- An account `follows` total is the last daily read's value for its window, 30 days before the read through the day of the read, whatever `from` and `to` the request names. Per-day values come from the daily series, which the workspace plan bounds.
- A metric TikTok does not report comes back with `value: null` and an availability state that says why. A post with no stored values whose last read failed on permissions, a rate limit, or a transient error answers with that error instead.

## Related

- [TikTok analytics API: the metrics PubNio reads](https://pubnio.com/platforms/tiktok/analytics)
- [TikTok OAuth scopes](https://pubnio.com/docs/providers/tiktok/scopes/)
- [API reference: analytics capabilities](https://pubnio.com/docs/reference/analytics-capabilities-get/)

