# Analytics

Post and account metrics TikTok returns through Zernio.

import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

Call `GET /v1/analytics?platform=tiktok` ([Analytics API](/analytics/get-analytics)).

| Metric | Available |
|--------|-----------|
| Likes | <Yes /> |
| Comments | <Yes /> |
| Shares | <Yes /> |
| Views | <Yes /> |
| Saves (`saves`) | <Yes /> (Business app connections) |
| Reach (`reach`) | <Yes /> (Business app connections) |
| Watch time (`igReelsAvgWatchTime`, `igReelsVideoViewTotalTime`, ms) | <Yes /> (Business app connections) |
| Completion rate (`completionRate`, 0-1) | <Yes /> (Business app connections) |
| Profile views (`profileViews`) | <Yes /> (Business app connections) |
| New followers (`follows`) | <Yes /> (Business app connections) |
| Profile-link clicks (`clicks`, every link type) and website clicks alone (`websiteClicks`) | <Yes /> (Business app connections) |
| Impression sources (`impressionSources`: For You, Follow, Search, Personal Profile, Sound, Direct Message, Others, as 0-1 shares) | <Yes /> (Business app connections) |
| Audience types (`audienceTypes`: follower vs non-follower and new vs returning viewers, as 0-1 shares) | <Yes /> (Business app connections) |
| Audience countries (`audienceCountries`: share of views by ISO country code, top 20 plus `other`) | <Yes /> (Business app connections) |
| Retention curve (`retentionCurve`: share still watching at each second, at most 61 points) | <Yes /> (Business app connections) |

The Business app rows come from TikTok's `video.insights`. It is granted to every account connected through the TikTok for Business app ([connection lanes](/platforms/tiktok#connection-lanes)).

TikTok fills them at T+24-48h and only for posts active in the last 7 days. A fresh post reports zeros and empty maps until then.

The same fields come back per day from the [post timeline](/analytics/get-post-timeline).

Accounts still on the developer app report likes, comments, shares and views only. Reconnecting moves the account to the Business app.

Not exposed by any TikTok API: account-level impressions and reach.

Covers (`thumbnailUrl`) are TikTok's signed CDN links and expire, so download the image rather than storing the link.

Once one has lapsed, the analytics response re-reads the cover from TikTok and serves it from Zernio storage, which does not expire.

Until that re-read lands, or when TikTok no longer returns the video (deleted or private), `thumbnailUrl` is null rather than an expired link.

<Tabs items={['Node.js', 'Python', 'curl']}>
<Tab value="Node.js">
```typescript
const { data: analytics } = await zernio.analytics.getAnalytics({
  query: { platform: 'tiktok', fromDate: '2026-08-01', toDate: '2026-08-31' }
});

console.log(analytics.posts);
```
</Tab>
<Tab value="Python">
```python
analytics = client.analytics.get_analytics(
    platform="tiktok",
    from_date="2026-08-01",
    to_date="2026-08-31"
)

print(analytics["posts"])
```
</Tab>
<Tab value="curl">
```bash
curl "https://zernio.com/api/v1/analytics?platform=tiktok&fromDate=2026-08-01&toDate=2026-08-31" \
  -H "Authorization: Bearer $ZERNIO_API_KEY"
```
</Tab>
</Tabs>

Response (`200`), one entry per post:

```json
{
  "posts": [
    {
      "_id": "65f1c0a9e2b5af0012ab34cd",
      "platform": "tiktok",
      "status": "published",
      "publishedAt": "2026-08-14T10:00:05Z",
      "platformPostUrl": "https://www.tiktok.com/@myaccount/video/7300000000000000000",
      "analytics": {
        "likes": 342,
        "comments": 28,
        "shares": 45,
        "views": 15420
      }
    }
  ]
}
```

[Account insights](/analytics/get-tiktok-account-insights) adds account-level counters (`follower_count`, `following_count`, `likes_count`, `video_count`) plus `followers_gained` and `followers_lost` deltas.

Live values come from the `user.info.stats` scope. The historical series is joined from Zernio's daily snapshotter.

It also returns TikTok's own daily account figures: `video_views`, `likes`, `comments`, `shares` and `profile_views`. Ask for them in `metrics` with `metricType=time_series` to get one value per day.

They count every video of the account, so they are higher than [daily metrics](/analytics/get-daily-metrics), which sums per-post analytics of recent posts.

- They need a TikTok for Business connection (Business or personal account) with the `user.insights` scope. Accounts on the original integration get them listed in `unavailableMetrics` until they reconnect.
- The latest day available is yesterday, and TikTok can take 24 to 48 hours to settle a day.

[Follower demographics](/analytics/get-tiktok-demographics) returns the share of an account's followers by age, gender, country and city. It needs a TikTok for Business connection and at least 100 followers.

Accounts connected through TikTok's Business app also report:

- `profileViews`: the profile views a post brought in.
- `completionRate`: the share of viewers who watched to the end, as a number from 0 to 1.

Both land 24 to 48 hours after publishing. TikTok reports completion only for posts active in the last 7 days.

Account-level impressions and reach are not available on any public TikTok API.

TikTok's Research API does not expose them either. It is restricted to non-commercial academic use under TikTok's eligibility policy.