# How to Automate TikTok Analytics Reports using the API

- Tool: API Automations
- Difficulty: Intermediate
- Fix time: 30-60 minutes
- Compatibility: TikTok Developer account at developers.tiktok.com; user.info.stats and video.list scopes required; access token expires every 24 hours
- Last updated: May 2026

## TL;DR

Automate TikTok analytics reports using the public API's two available data sources: GET /v2/user/info/ for account-level stats (follower_count, following_count, likes_count, video_count) and POST /v2/video/list/ for per-video metrics (likes, comments, shares, views). Watch time, For You Page impressions, per-video reach, and audience demographics are NOT available through any public API. Access tokens expire every 24 hours — a refresh job is mandatory.

## Best practices

- Always refresh the access token at the start of every analytics run — do not rely on checking expiry timestamps
- Store time-series snapshots of follower_count and likes_count daily since TikTok's API only returns current values with no historical data
- Clearly document in your reports that watch time, FYP impressions, and audience demographics are NOT available via any public TikTok API
- Use share_rate (shares/views) as your primary content quality signal since TikTok's algorithm weights shares heavily for FYP distribution
- Paginate the video.list endpoint with 500ms delays to avoid hitting the 30 req/min limit during bulk historical data fetches
- Alert on token refresh failures — a single failed refresh means your next analytics run will fail silently with auth errors

## Frequently asked questions

### Is the TikTok analytics API free?

The Content Posting API and basic user/video stats endpoints are free. You need a TikTok developer account (free at developers.tiktok.com) and app approval for the user.info.stats and video.list scopes. The Research API for advanced analytics is also free but restricted to academic institutions in approved countries.

### Why can't I get watch time or FYP impressions from the TikTok API?

TikTok has not exposed these metrics in its public API. Watch time (average seconds watched), For You Page impressions, completion rate, and audience demographics are only available in TikTok Studio (studio.tiktok.com) and the TikTok Business Center. This is a deliberate limitation — TikTok considers these metrics proprietary. No third-party tool can provide them without a special data partnership agreement with TikTok.

### What happens when my access token expires?

You'll get error code 'access_token_invalid' (HTTP 401). All API calls fail until you refresh. Use POST https://open.tiktokapis.com/v2/oauth/token/ with grant_type=refresh_token and your 365-day refresh_token to get a new 24-hour access_token. Implement this as an automated job running every 18-20 hours. If your refresh token also expires (after 365 days), the user must manually re-authorize your app.

### How can I calculate follower growth over time if the API only returns current values?

Store daily snapshots. Run a cron job every 24 hours that fetches /v2/user/info/?fields=follower_count and writes a row to your database with the count and a timestamp. Week-over-week growth = today's snapshot minus the snapshot from 7 days ago. This is the only way to build historical trend data since TikTok's API provides only current account totals, not historical time series.

### Can I track how many views my videos get over time?

Partially. The /v2/video/list/ endpoint returns the current cumulative view_count for each video. By polling it daily and storing snapshots, you can see total views per video over time. However, you cannot get daily view breakdowns (e.g., 'this video got 5,000 views specifically on May 7th') — that level of granularity is only in TikTok Studio.

### Can RapidDev build a TikTok analytics system for my team?

Yes — RapidDev builds analytics dashboards that combine TikTok's available API data with time-series storage to deliver actionable reports. We handle the TikTok developer setup, token refresh automation, data pipeline to PostgreSQL, and a custom reporting interface. Book a free consultation at rapidevelopers.com.

### Does the TikTok API provide audience demographic data?

No. Audience demographics (age range, gender distribution, top countries, top cities) are not available through any public TikTok API endpoint. This data is visible in TikTok Studio's Followers tab and Analytics section but is not exposed via the API. Demographic data access would require a special TikTok partner agreement, which is not available to general developers.

---

Source: https://www.rapidevelopers.com/api-automations/how-to-automate-tiktok-analytics-reports-using-the-api
© RapidDev — https://www.rapidevelopers.com/api-automations/how-to-automate-tiktok-analytics-reports-using-the-api
