How to Scrape TikTok Comments (2026)
- TikTok serves comments from an internal endpoint,
/api/comment/list/, keyed on the video'saweme_id. Each comment object carries the author (unique_id), thetext, the like count (digg_count), and a reply count (reply_comment_total). - A bare
requests.getto that endpoint returns an empty body, because TikTok signs it with an X-Bogus parameter and an msToken. You need a signer or a real browser, plus a residential IP. - Replies are a second pagination layer: call
/api/comment/list/reply/with the parentcomment_idto expand each thread. Skip it and you only get top-level comments. - For volume, a scraper API takes a video URL and returns the threaded comment JSON with the signing and proxies handled server side. One call, no signature to reverse-engineer.
I scrape TikTok comments the same way every time, and this guide is how to scrape TikTok comments end to end: the endpoint that returns them, the exact fields each comment carries, how to page through replies, and the point where a raw script stops working. Everything below is code I ran against live videos in July 2026.
The short version: TikTok renders comments from an internal JSON endpoint, not from the page HTML, so you call that endpoint with a video id and walk a cursor. The catch is that TikTok signs the endpoint, so the interesting work is getting a signed request from an IP TikTok trusts. If you only need the data and not the plumbing, skip to the managed route.
What data can you scrape from a TikTok comment?
A TikTok comment gives you four fields most projects actually need: the author, the comment text, the like count, and the reply count. TikTok returns each comment as a JSON object from its comment endpoint, and the field names are stable even though the values are not. Here is the mapping from the raw payload to plain English:
| Plain field | Raw JSON key | What it holds |
|---|---|---|
| Author | user.unique_id | The commenter’s @handle |
| Text | text | The comment body |
| Likes | digg_count | Likes on the comment |
| Replies | reply_comment_total | Number of replies under it |
| Comment id | cid | Unique id, useful as a dedupe key |
| Posted at | create_time | Unix timestamp of the comment |
Two of those fields do more work than the rest. The cid is the unique comment id, and you use it both to deduplicate across paginated pages and as the key to fetch that comment’s replies. The reply_comment_total tells you whether a comment even has a reply thread worth expanding, which saves a request when it is zero. With the shape defined, the first job is pulling the top-level comments.
How do you scrape TikTok comments with Python?
You scrape TikTok comments with Python by calling https://www.tiktok.com/api/comment/list/ with a video’s aweme_id and paging through the results with a cursor. The endpoint returns a comments array plus two pagination fields: a cursor value for the next page and a has_more boolean that tells you when the thread is exhausted. It is the same cursor contract TikTok uses for video lists, so if you have written one paginated TikTok scraper, this is the same loop with a different path.
Install the one dependency first:
pip install requests
The loop reads a page, extracts the four fields from each comment, feeds the returned cursor into the next request, and stops when has_more flips to false:
import requests
UA = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36")
def fetch_comments(aweme_id, sign, pages=10):
cursor, out = 0, []
for _ in range(pages):
params = {"aweme_id": aweme_id, "count": 20, "cursor": cursor}
# sign() attaches X-Bogus + msToken; a raw URL returns nothing (see below)
url = sign("https://www.tiktok.com/api/comment/list/", params)
data = requests.get(url, headers={"User-Agent": UA}, timeout=25).json()
for c in data.get("comments", []):
out.append({
"author": c["user"]["unique_id"],
"text": c["text"],
"likes": c["digg_count"],
"replies": c["reply_comment_total"],
"cid": c["cid"],
})
cursor = data.get("cursor", 0) # carry forward to the next page
if not data.get("has_more"): # false on the last page
break
return out
Two variables drive the whole function: cursor, which you read out of each response and pass back on the next call, and has_more, which ends the loop. The count of 20 is the batch size TikTok serves per request on this endpoint, so a thread with a thousand comments is about fifty requests. Store each comment by its cid if you run the loop more than once, because pages can overlap slightly and you do not want the same comment twice.
The function above hides the hard part behind sign. A plain requests.get to /api/comment/list/ does not return comments the way a profile page returns HTML, and the next section is why. First, the replies, because fetch_comments only gives you the top level of each thread.
How do you scrape the replies under each comment?
You scrape TikTok replies from a second endpoint, https://www.tiktok.com/api/comment/list/reply/, called once per parent comment with that comment’s cid. The top-level comment/list/ response never contains the replies themselves, only the reply_comment_total count. To read the actual reply text you take each comment whose count is above zero and page its replies with the same cursor and has_more contract.
def fetch_replies(aweme_id, comment_id, sign, pages=5):
cursor, replies = 0, []
for _ in range(pages):
params = {
"item_id": aweme_id, # the video
"comment_id": comment_id, # the parent comment's cid
"count": 20,
"cursor": cursor,
}
url = sign("https://www.tiktok.com/api/comment/list/reply/", params)
data = requests.get(url, headers={"User-Agent": UA}, timeout=25).json()
replies.extend(data.get("comments", []))
cursor = data.get("cursor", 0)
if not data.get("has_more"):
break
return replies
This is the step cheaper scrapers skip, and it is why a tool that “returns TikTok comments” sometimes hands back a flat list with every reply missing. A full thread is two nested loops: the outer one walks top-level comments, and the inner one expands each parent that has replies. On a video with heavy discussion that multiplies your request count fast, which is exactly where the signing requirement below turns into a real cost.
Why does a plain request return no comments?
A plain request to TikTok’s comment endpoint returns an empty body because the endpoint is signed, not open. TikTok expects an X-Bogus parameter and an msToken, both generated by an obfuscated script that runs inside a real browser, and it validates them against your User-Agent before it returns any comment JSON. Strip the signature off and you get a 200 with zero useful bytes, no error and no comments array. That is the same wall the video-list endpoint sits behind, and it is what the sign placeholder in the code above stands in for.
There are two practical ways to produce a valid signature yourself:
- Drive a real browser. A tool like Playwright loads TikTok’s own JavaScript, so the page signs the request for you as it runs. It is the most durable option and the heaviest, because a browser per worker is far slower than an HTTP call.
- Run TikTok’s signer. A library reproduces the signing in a JavaScript runtime to mint
X-BogusandmsTokenwithout a full browser. The best-known open-source option is TikTok-Api by David Teather, which drives Playwright under the hood and gets patched whenever TikTok rotates its signing.
Signing is only half the wall. Even a perfectly signed comment request fails from a datacenter IP, because TikTok rate-limits cloud ranges from AWS, GCP, and Azure quickly and serves them a challenge instead of data. You need residential or mobile IPs that present as ordinary home connections, on top of the signature. Maintaining both a signer that you patch on TikTok’s schedule and a rotating residential proxy pool is the standing cost that pushes most teams to hand the fetch layer off.
How do you scrape TikTok comments without getting blocked?
You scrape TikTok comments without getting blocked by sending a video URL to a scraper API and letting it handle the signing, the msToken, and the residential proxies server side. You make one authenticated request and get the threaded comment JSON back, with no X-Bogus to reverse-engineer and no proxy pool to rent. This is the route I use for anything past a handful of videos, because the signing breaks on TikTok’s timetable and debugging an empty 200 at 2am is not work I enjoy.
With ChocoData the comment call is a single GET. The TikTok endpoints live under the tiktok path, you pass the video URL and your key as query parameters, and the reply threading is walked for you:
curl "https://chocodata.com/api/v1/tiktok/comments?url=https://www.tiktok.com/@nasa/video/7300000000000000000&api_key=$CHOCO_API_KEY"
The Python version is the same one request, and it returns the author, text, like count, and nested replies already parsed, so there is no cursor to walk and no signature to mint:
import os, requests
resp = requests.get(
"https://chocodata.com/api/v1/tiktok/comments",
params={
"url": "https://www.tiktok.com/@nasa/video/7300000000000000000",
"api_key": os.environ["CHOCO_API_KEY"],
},
timeout=60,
)
data = resp.json()
print(len(data["comments"]), "comments")
for c in data["comments"][:5]:
print(c["diggCount"], c["text"])
The same single-endpoint pattern covers the other TikTok objects by swapping the path: a profile call for creator stats and a video call for a post’s own metrics, all keyed on the same URL and one API key. The free tier covers 1,000 requests with no card, which is enough to pull a full comment thread before you decide whether the managed route is worth it. For a one-off pull of a couple of videos, the raw loop at the top of this guide is genuinely all you need, and the deeper Python build lives in my guide on how to scrape TikTok with Python.
Can you get TikTok comments from TikTok’s official API?
You can get TikTok comments from TikTok’s official API, but only if you qualify as an approved researcher. TikTok has no general-purpose public comment API, so the sanctioned route is the Research API video-comments endpoint, video/comment/list/, which returns native comment objects with id, text, video_id, create_time, like_count, parent_comment_id, and reply_count. The parent_comment_id is what lets you rebuild reply threads, since it links each reply back to its top-level comment.
The gate is eligibility and throughput, not the code. Access is limited to approved academic and non-profit researchers in eligible regions, and a developer account alone does not grant it. Even once approved, the standard quota is 1,000 requests per day for up to 100,000 records, with the comment endpoint returning 100 records per request and the quota resetting at 12 AM UTC. A single viral video’s comment count can exceed that daily record cap, and commercial use is not permitted at all, which is the wall most builders hit. Here is how the three routes compare:
| Route | Who it fits | Signing / proxies | Commercial use |
|---|---|---|---|
Raw /api/comment/list/ | Small pulls, learning | You maintain both | Public data, you carry upkeep |
| Research API | Approved academics | Handled by TikTok | Not permitted |
| Scraper API | Production, any volume | Handled server side | Allowed |
The decision comes down to who you are and how much you need. Approved researchers get accurate comments for free within the cap, everyone else scrapes the public payload directly, and a scraper API absorbs the signing and proxy work when that becomes a maintenance line rather than a one-off. Whichever route you pick, it is worth knowing where the legal line sits before you collect at volume.
Is it legal to scrape TikTok comments?
Scraping publicly visible TikTok comments sits on the safer side of US case law, because the comments render for any logged-out visitor. The Ninth Circuit in hiQ v. LinkedIn held that scraping public pages is not unauthorized access under the CFAA, and the Northern District of California in Meta v. Bright Data found that logged-out scraping of public data does not breach a platform’s terms. Logged-in scraping and TikTok’s Terms of Service are separate questions with different answers.
Two constraints still apply to comment data specifically. TikTok’s robots.txt sets Disallow: / for a long list of named crawlers and fences off several paths for everyone else, which states its automation policy even though it carries no technical enforcement on its own. And a comment carries a username and free text that identify a person, so any comment dataset falls under GDPR and CCPA regardless of how public it was. I work through the full picture, including the personal-data handling, in is scraping TikTok legal. If you are choosing among managed tools rather than building, I rank them head to head in best TikTok scrapers in 2026. This is general information, not legal advice, so confirm your specific use with counsel.
Sources
- TikTok Research API, video comments spec - endpoint
video/comment/list/, comment fields (text,like_count,parent_comment_id,reply_count) - https://developers.tiktok.com/doc/research-api-specs-query-video-comments - TikTok Research API FAQ - daily quota of 1,000 requests, 100 records per request, 12 AM UTC reset - https://developers.tiktok.com/doc/research-api-faq
- TikTok robots.txt - named-crawler
Disallow: /and path-level rules - https://www.tiktok.com/robots.txt - David Teather, TikTok-Api - open-source signer that drives Playwright to mint X-Bogus and msToken - https://github.com/davidteather/TikTok-Api
- Meta Platforms v. Bright Data (N.D. Cal.) - logged-out scraping of public data does not breach platform terms - https://www.fbm.com/publications/major-decision-affects-law-of-scraping-and-online-data-collection-meta-platforms-v-bright-data/
FAQ
How many TikTok comments can you scrape from one video?
There is no fixed ceiling on the public endpoint: /api/comment/list/ returns roughly 20 comments per request behind a cursor, and you keep paging while has_more is true, so a full thread is a question of rate limits, not a hard cap. The official Research API is capped instead, at 100 comments per request and 1,000 requests per day, so a single viral video can exceed its daily record limit.
What is the aweme_id and where do I find it?
The aweme_id is the long numeric video id in a TikTok video URL, the digits after /video/ in tiktok.com/@user/video/7300000000000000000. It is also present on each item returned by the post-list endpoint. The comment endpoint needs that id to know which video's comments to return.
How do you scrape TikTok comments without writing code?
You point a no-code step at a scraper API that exposes a comment endpoint, so a Zapier, Make, or n8n action sends a video URL and receives parsed comment JSON back. That avoids both the signing problem and any local script. The alternative, a browser extension, breaks whenever TikTok changes its comment markup and does not scale past manual clicks.
Do TikTok comments contain personal data I need to handle carefully?
Yes. A TikTok comment carries a username, a user id, and free text that can identify a person, which brings it inside GDPR and CCPA even when the comment is public. Collecting public comments sits on safer legal ground after recent US rulings, but storage, retention, and any republication of that personal data are separate obligations you own. Treat comment datasets as personal data and minimise what you keep.