How to Scrape Tiktok Post Details And Stats
This tutorial shows how to use Tiktok Post Details And Stats API to scrape and crawl structured Tiktok data in real-time.
Get granular TikTok post data including views, shares, saves, and hashtag reach through our API, useful for benchmarking content performance and refining campaign strategy.
Access Tiktok Data in 3 Steps
Start crawling Tiktok post details 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 details data via our REST API!
| 1 | const root = 'https://ensembledata.com/apis' |
| 2 | const endpoint = '/tt/post/info' |
| 3 | const params = { |
| 4 | "url": "https://www.tiktok.com/@daviddobrik/video/7165262254722534698", |
| 5 | "token": "YOUR-TOKEN-HERE", |
| 6 | "new_version": false, |
| 7 | "download_video": false |
| 8 | } |
| 9 | |
| 10 | const queryString = new URLSearchParams(params).toString(); |
| 11 | const url = `${root}${endpoint}?${queryString}`; |
| 12 | |
| 13 | await fetch(url) |
| 14 | .then(response => response.json()) |
| 15 | .then(data => console.log(data)) |
| 16 | .catch(error => console.error(error)); |
| 17 |
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.