Developer tutorial
How to scrape TikTok comments with Python (2026)
This tutorial shows how to scrape TikTok comments in Python using the SocialCrawl API. You get every comment on a video with its text, author, like count, and reply count, paginated by cursor from one GET request, with no TikTok developer account, proxies, or HTML parsing. The code below is runnable as-is, and the response underneath it is a real, unedited call.
Code tested July 2026
How it works
- 1Get a free API keyCreate a SocialCrawl account and copy your API key from the dashboard. Every new account starts with free credits.
- 2Set up PythonInstall the requests library with `pip install requests`.
- 3Call the TikTok Post Comments endpointSend a GET request to /v1/tiktok/post/comments with your API key in the x-api-key header and the `url` parameter.
- 4Read the responseParse the JSON. SocialCrawl returns every comment on a video with its text, author, like count, and reply count, paginated by cursor in one normalized schema, so you write no HTML parsing or proxy code.
The code
A real, unedited response from the request above.
import requests
response = requests.get(
"https://www.socialcrawl.dev/v1/tiktok/post/comments",
headers={"x-api-key": "YOUR_API_KEY"},
params={"url": "https://www.tiktok.com/@stoolpresidente/video/7623818255903329566"},
)
data = response.json()
print(data)[ RESPONSE ]
{
"success": true,
"platform": "tiktok",
"endpoint": "/v1/tiktok/post/comments",
"data": {
"items": [
{
"comment": {
"id": "7623869779602457374",
"url": null,
"parent_id": null,
"post_id": "7623818255903329566",
"text": "Beach gossip in 3 months time",
"author": {
"username": "jw22784",
"display_name": "JW",
"avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/cbec99d66023ddef2902c1111eb046c4~tplv-tiktokx-cropcenter:100:100.jpg?dr=9640&refresh_token=d33f22a6&x-expires=1784592000&x-signature=kxH9DUoL4oXbGUgpxMZywVbSAAI%3D&t=4d5b0474&ps=13740610&shp=30310797&shcp=ff37627b&idc=useast8",
"verified": false
},
"engagement": {
"likes": 12613,
"replies": 25
},
"flags": {
"pinned": false,
"deleted": false
},
"published_at": "2026-04-01T19:08:53.000Z",
"ext": {
"published_at_epoch": 1775070533
}
}
},
{
"comment": {
"id": "7623828115408274207",
"url": null,
"parent_id": null,
"post_id": "7623818255903329566",
"text": "Tea by the Sea 🌊 🫖",
"author": {
"username": "xoxobkp",
"display_name": "Briana P",
"avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/7353158061415989290~tplv-tiktokx-cropcenter:100:100.jpg?dr=9640&refresh_token=cf8384cd&x-expires=1784592000&x-signature=xTo10TE%2FbdLBXD%2BSpQc1h9vncRU%3D&t=4d5b0474&ps=13740610&shp=30310797&shcp=ff37627b&idc=useast8",
"verified": false
},
"engagement": {
"likes": 16270,
"replies": 50
},
"flags": {
"pinned": false,
"deleted": false
},
"published_at": "2026-04-01T16:27:52.000Z",
"ext": {
"published_at_epoch": 1775060872
}
}
}
],
"next_cursor": "20",
"total": 2204,
"dropped": 0
},
"credits_used": 1,
"credits_remaining": 9999,
"request_id": "req_example000000",
"cached": false,
"pagination": {
"next_cursor": "sc.eyJ2IjoyLCJjIjoiMjAiLCJwIjoiY3Vyc29yIn0",
"has_more": true,
"page_size": 20
}
}Prefer another language?
FAQ
Have a question? We got answers
Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.
Contact usDo I need a TikTok developer account to scrape TikTok comments?
No. SocialCrawl handles authentication and proxies upstream, so you never register a TikTok app, manage OAuth tokens, or run your own scrapers. One API key returns TikTok data directly.
What does the TikTok Post Comments endpoint return?
It returns every comment on a video with its text, author, like count, and reply count, paginated by cursor. The response is normalized into SocialCrawl's unified schema, identical in shape across every platform.
How much does it cost to scrape TikTok comments?
Each call costs a small number of credits, and new accounts start with free credits. There are no monthly minimums, so you pay only for the calls you make.
Can I use this Python code in production?
Yes. The snippet on this page is the real request against the live API. For production, add error handling and follow the response cursor to paginate through large result sets.
Ask AI about SocialCrawl
