How to Scrape Tiktok Post Comments
This tutorial shows how to use Tiktok Post Comments API to scrape and crawl structured Tiktok data in real-time.
Extract TikTok comment sections in bulk including usernames, comment text, timestamps, and reply threads through our API, great for brand monitoring and community trend analysis.
Access Tiktok Data in 3 Steps
Start crawling Tiktok post comments data. Follow these steps to extract social media data in minutes.
Create Your Account
Go to our registration page and make an account. It's free, no credit card, and you get credits right away to play around with.
Verify Your Email Address
You'll get a verification email, click the link in it. Once that's done, you can grab your API token from the dashboard.
Make Your First API Call
Copy the code snippet below, swap in your API key, and run it. You'll get Tiktok data back as JSON within a few seconds.
Code Sample
Here's a JavaScript example to get you going. Swap out the token and you're good, works the same way in any language that can make HTTP requests. Start collecting post comments data via our REST API!
| 1 | const root = 'https://ensembledata.com/apis' |
| 2 | const endpoint = '/tt/post/comments' |
| 3 | const params = { |
| 4 | "aweme_id": "7348608161672187167", |
| 5 | "cursor": 0, |
| 6 | "token": "YOUR-TOKEN-HERE" |
| 7 | } |
| 8 | |
| 9 | const queryString = new URLSearchParams(params).toString(); |
| 10 | const url = `${root}${endpoint}?${queryString}`; |
| 11 | |
| 12 | await fetch(url) |
| 13 | .then(response => response.json()) |
| 14 | .then(data => console.log(data)) |
| 15 | .catch(error => console.error(error)); |
| 16 |
Parameters
Example Response
Explore the fields returned by this endpoint. Click a row to expand nested objects and arrays, hover a value to copy it, or use "Expand all" to see everything at once.
dataobject3 fields
commentsarray1 item ยท schema from #0 1 item
userobject116 fields
avatar_largerobject4 fields
url_listarray2 items ยท schema from #0 2 items
avatar_thumbobject4 fields
url_listarray2 items ยท schema from #0 2 items
avatar_mediumobject4 fields
url_listarray2 items ยท schema from #0 2 items
geofencingarray0 items
video_iconobject4 fields
url_listarray0 items
cover_urlarray1 item ยท schema from #0 1 item
url_listarray1 item ยท schema from #0 1 item
avatar_168x168object4 fields
url_listarray2 items ยท schema from #0 2 items
avatar_300x300object4 fields
url_listarray2 items ยท schema from #0 2 items
special_accountobject1 field
text_extraarray0 items
share_infoobject4 fields
aclobject2 fields
Response Codes
Status codes this endpoint can return, so you can handle errors before they surprise you in production.
API Pricing
Fetch Tiktok Data at Scale
Pull TikTok comment data in real time including text, replies, and timestamps and feed it directly into your sentiment or engagement tracking pipeline.
Full Comment Data
Get commenter usernames, text, timestamps, and like counts per comment.
Reply Threads
Reconstruct nested reply conversations under any public TikTok video.
Sentiment Ready
Feed clean comment text straight into sentiment analysis pipelines.