If you're building a creator analytics dashboard or comparing accounts for a campaign, a follower count doesn't tell you how their recent videos performed. You need the individual videos, their play counts, the interactions each received, and the date you collected those numbers.
This tutorial uses Python and Spidra to collect TikTok plays, likes, comments, shares and saves from public profiles and videos. We'll turn those records into a creator scorecard and a CSV file you can use in a reporting or monitoring pipeline. You won't need to write selectors or maintain a browser-based scraper.
Start with per-video data, not follower counts
For a creator comparison, collect a consistent recent window, say 15 videos per account. Store the video ID, URL, publication date, play count, likes, comments, shares, saves, and the time of collection. The account's follower count provides context, but it shouldn't stand in for video performance.
You'll use those fields to calculate three different things:
- Typical reach: Median plays across the selected videos. A median prevents one viral post from pulling the result as far upward as an arithmetic mean.
- Engagement by views: For each video,
(likes + comments + shares + saves) / plays * 100, followed by the median of those video-level percentages. Define the formula because published engagement rates often use different denominators and interaction types. - Output over a period: The number of videos published and their combined plays across the same time window. This matters when comparing an account posting several times a day with one posting twice a week.
These are descriptive measures, not a fraud detector or a prediction of the next video's reach. An unusually low views-to-followers ratio is a reason to look at the posting history and audience, not evidence that someone purchased followers.
Can you get TikTok metrics through its official API?
TikTok provides official interfaces, but each serves a different purpose.
The Display API lets an app display videos for a creator who has authorized it. TikTok's video object includes view, like, comment and share counts, but not a saves count. It isn't an API for reading every public creator account without their consent.
The Research API provides eligible researchers with access to public video data. Its query-video fields include favorites_count, which is relevant when studying saves. Access requires approval, and TikTok's eligibility FAQ says commercial users aren't eligible for its Research Tools.
If you're working with creators who authorize your app, the official Display API may be enough. For a developer evaluating public video pages as data, Spidra offers another route: it returns the fields available from a public TikTok profile or video link as JSON.
Check permission before collecting. TikTok's US Terms of Service prohibit automated extraction without written approval. Public availability doesn't establish permission for commercial collection, and profile information can be personal data. Review the terms and applicable privacy requirements before deploying a production workflow. Spidra's guide to web scraping and the law explains the general considerations.
Get a TikTok profile and its recent videos as JSON
Spidra's regular Scrape API already recognizes public TikTok profile and video links. With output="json", you can request the structured record directly, without a custom prompt or a template. A profile includes its counts and up to 15 recent videos with their metrics. Individual video links return the corresponding video record.
Install the Python SDK, then add your Spidra API key to your environment:
pip install spidra
export SPIDRA_API_KEY="spd_YOUR_API_KEY"A single profile request looks like this:
import os
from spidra import Spidra
client = Spidra(api_key=os.environ["SPIDRA_API_KEY"])
profile = client.scrape("https://www.tiktok.com/@nba", output="json").content
print(profile["username"], profile["followers"])
print(len(profile["recentVideos"]), "recent videos")A published Spidra snapshot from October 18, 2026 produced:
nba 27306047
15 recent videosOne of those video records included the following metrics:
{
"id": "7698146299102678303",
"plays": 5428,
"likes": 553,
"comments": 26,
"shares": 12,
"saves": 14
}Those values are a dated snapshot, not the account's current numbers. Spidra returns precise follower counts, but TikTok itself rounds some large play counts, so don't assume every plays value has unit-level precision. Use the returned values rather than converting abbreviations from the visible page yourself.
This route is useful if you're enriching a small roster of profiles or already have the profile URLs. The same approach works for other supported websites, as shown in our guide to structured web data, so a product can use one API for more than TikTok.
Collect more videos for a creator scorecard
Fifteen videos may be enough for a first look, but a larger window is useful when an account publishes frequently or its recent posts include a few unusually popular videos.
Spidra's ready-made TikTok templates provide a second route. TikTok recent videos accepts account names and a requested video count, and returns a row per video. You can run it from the Templates dashboard or use the SDK.
To request 45 videos from Duolingo:
run = client.run_template(
"tiktok-recent-videos",
{"accounts": ["duolingo"], "videos": 45},
)
rows = run.rowsA November 24, 2026 run returned 45 video rows. One of them was:
{
"id": "7707022192655060237",
"description": "the birthday girl is muy bonita",
"createdAt": "2026-11-11T21:02:33.000Z",
"plays": 16100000,
"likes": 2600000,
"comments": 10700,
"shares": 690500,
"saves": 175612,
"reposts": 0,
"hashtags": [],
"music": {"title": "sonido original", "author": "Tania"},
"duration": 12,
"language": "en"
}That record has what the scorecard needs: a stable ID, a publication timestamp, the interaction counts, and some context about the content. The complete rows also make it possible to examine hashtags, sounds and video formats rather than interpreting counts without looking at what was posted.
The distinction between these two Spidra routes is useful: Scrape reads a TikTok URL as a structured record; the template packages a specific collection task with inputs and a table of rows. You don't need the template to access TikTok data, and you don't need to build your own extraction prompt when a template already covers the dataset you want.
Calculate typical views and engagement in Python
Use the collected rows to calculate the median instead of relying on the most viral video in a profile. We'll keep saves in the engagement formula and leave a rate undefined if a video lacks any required interaction count, rather than silently assuming the missing value is zero.
import statistics as st
def engagement_rate(video):
fields = ("likes", "comments", "shares", "saves")
plays = video.get("plays")
if not isinstance(plays, (int, float)) or plays <= 0:
return None
if any(not isinstance(video.get(k), (int, float)) for k in fields):
return None
return 100 * sum(video[k] for k in fields) / playsNow summarize the recent-video window:
def scorecard(rows, followers):
videos = list({str(r["id"]): r for r in rows if r.get("id")}.values())
plays = [r["plays"] for r in videos if isinstance(r.get("plays"), (int, float)) and r["plays"] > 0]
rates = [rate for r in videos if (rate := engagement_rate(r)) is not None]
if not plays:
raise ValueError("No usable play counts")
return {
"median_plays": int(st.median(plays)),
"mean_plays": int(st.mean(plays)),
"median_engagement_pct": round(st.median(rates), 2) if rates else None,
"views_to_followers_pct": round(100 * st.median(plays) / followers, 2) if followers else None,
}Using the Duolingo sample and its follower count at the time:
print(scorecard(rows, followers=18624480)){'median_plays': 747600, 'mean_plays': 1917980,
'median_engagement_pct': 14.87, 'views_to_followers_pct': 4.01}The mean was about 2.6 times the median. The top three videos in that 45-video sample accounted for roughly 40% of its plays, so the mean described the influence of a few breakouts more than it described a typical upload.
That doesn't make the median a forecast. Video age, topic, format, posting frequency and distribution affect performance. For example, the NBA account's latest 15 videos in the supplied sample had a much lower median play count than Duolingo's, but its publishing cadence was also very different. A useful comparison groups accounts by similar time windows and content patterns, or reports total plays per week alongside the median per upload.
Save the rows so you can compare future runs
A single CSV export is enough to inspect the result in a spreadsheet or import it into another application. For a recurring data product, the extra field you need is collected_at: the date and time when these counters were observed.
The companion script for this article exports one row per video, including video_id, video_url, posted_at, collected_at, plays, likes, comments, shares, saves and its calculated engagement rate. Run it with:
python tiktok_metrics_scorecard.py --account duolingo --videos 45 \
--output duolingo_snapshot.csvKeep the video ID as the record key and the collection time as part of each observation. When a video receives more plays tomorrow, you want another observation for the same video, not a replacement that erases yesterday's count. For a database, a key such as (video_id, collected_at) preserves that history; in a CSV workflow, append successive snapshots to a historical file rather than overwriting them.
If you're tracking a defined campaign, Spidra's TikTok video metrics template is useful once you know the specific video URLs. It lets you refresh the campaign's actual videos rather than repeatedly collecting everything from an account:
video_links = [r["url"] for r in rows if r.get("url")][:3]
if video_links:
refreshed = client.run_template("tiktok-video-metrics", {"videos": video_links})
refreshed_rows = refreshed.rowsA November 24 example showed one video increase from 87,700 to 90,600 plays between pulls. Those are two observations of the same counter, not a guarantee that other posts will grow at the same rate.
Add the content behind the metrics when it matters
The metrics explain how much attention a video received, but the accompanying fields help explain what was published. TikTok video records include descriptions, hashtags, music and, where available, subtitle information. That gives a product the option to group videos by topic, sound or format without guessing from the play count alone.
For example, the TikTok video transcripts template retrieves a caption track when one exists. In the supplied November 24 collection, 22 of Duolingo's 45 videos had caption tracks. A separate transcript check returned one timestamped transcript and an explicit no-captions result for two music-led videos. A missing transcript is not a failed metrics scrape; the video may simply have no caption track to return.
Don't assume that caption availability or language is complete, or that an automatically generated transcript is error-free. Treat the transcript as content-analysis material, not a verified record of every spoken word.
Turn one snapshot into a repeatable workflow
Most applications don't need to refresh every public TikTok video all day. Start with a known roster of accounts and a frequency that matches the decision your product supports.
For recurring discovery, Spidra Monitors can rerun a template on a schedule and notify you when new or changed rows appear. A monitor gives you change detection and alerts; if you're building historical analytics, store each collection in your own database or snapshot files as well. The first monitor check establishes a baseline.
For a campaign dashboard, another useful division is to discover new videos from a profile on a schedule and refresh only the exact video URLs included in the campaign. That avoids mixing unrelated uploads into a paid campaign's reporting.
A profile scrape costs one credit. The November 24 recent-video run returned 45 rows at three credits, while the single-video metrics template processed specific links at one credit per video. For a commercial workload, estimate the number of profiles, video URLs, and refreshes you actually need before choosing a paid plan. Spidra's pricing and credit guide explains how charges accumulate, and the free plan includes a one-time credit allowance for trying the workflow.
What this dataset cannot tell you
A clean CSV doesn't tell you everything about a creator. Public video counters don't give you audience demographics, retention, completion rate, clicks or conversions. Those are different questions, often requiring the creator's cooperation or another authorized analytics source. You also can't conclude that a high save count caused a video to perform well, or that a low follower-to-views ratio proves manipulation.
Results can be missing for removed, restricted or inaccessible videos. Spidra doesn't guarantee every public page is available every time; unsuccessful fetches aren't charged. And because TikTok's own counters change and some are rounded, record timestamps and interpret close differences cautiously.
What you now have is a usable base for creator reporting: recent video records, consistent engagement calculations, and an export you can collect again. If your application needs this for multiple accounts, create a free Spidra account and run the same code on your own public-profile shortlist, after confirming your planned use is permitted.