A TikTok scraper API turns public TikTok pages into JSON: profiles with follower counts, videos with views, likes and shares, comments, transcripts and hashtag stats. With Social Parse each of those is one GET request with an API key. There's no TikTok login, no headless browser and no proxy pool to run yourself.
Where TikTok's developer APIs fall short
TikTok has several developer APIs, but none is built for reading public data in a product:
- Display API: the profile and videos of a user who signs in to your app with TikTok. Nobody else's.
- Research API: public videos, comments and accounts, but only for approved academic and non-profit researchers, and not for commercial use.
- Commercial Content API: ads and their targeting, for transparency, not organic posts.
If you need public profiles, videos or comments for analytics, creator research or content tools, you read the public pages.
What you can get
| Endpoint | What you get |
|---|---|
| Profile | Name, bio, followers, following, total likes, video count |
| Profile videos | A profile's videos and photo posts, newest first |
| Profile playlists | A profile's playlists |
| Video | Views, likes, comments, shares, saves, sound, hashtags, captions |
| Video comments | A video's comments, and their replies |
| Video transcript | What's said in the video, as text and timed segments |
| Hashtag | A hashtag's video count and total views |
| Search suggestions | The searches TikTok suggests for a keyword |
| Live | A live room's details |
Set your key and base URL:
export API_KEY="your-api-key"
export API_URL="https://api.socialparse.dev"Scrape a TikTok profile
Pass a handle (with or without the @) or the profile's link:
curl -H "x-api-key: $API_KEY" "$API_URL/v1/tiktok/profile?handle=mrbeast"Scrape every video on a profile
Profile videos answers up to 15 videos a page, newest first. Follow
page.next_cursor for more:
import os
import requests
API_URL = os.environ["API_URL"]
HEADERS = {"x-api-key": os.environ["API_KEY"]}
params = {"handle": "mrbeast"}
videos = []
for _ in range(5): # at most 5 pages here: 5 credits
response = requests.get(f"{API_URL}/v1/tiktok/profiles/videos", params=params, headers=HEADERS, timeout=120)
body = response.json()
if not response.ok:
print("stopped:", body["error"]["code"]) # LOGIN_REQUIRED for a private account
break
videos.extend(body["data"])
if not body["page"]["has_more"]:
break
params["cursor"] = body["page"]["next_cursor"]
for video in videos:
print(video["created_at"], video["views"], video["likes"], video["url"])Get one video's stats
curl -H "x-api-key: $API_KEY" "$API_URL/v1/tiktok/videos?url=https://www.tiktok.com/@nike/video/7587811642650545421"Besides the counts (views, likes, comment_count, shares, saves), a video carries its description,
hashtags, mentions, music, duration_seconds, its author's handle and followers, and the captions it has. An
engagement rate is one line from there: (likes + comment_count + shares) / views.
Hashtag stats
curl -H "x-api-key: $API_KEY" "$API_URL/v1/tiktok/hashtags?tag=booktok"The answer has the hashtag's video_count and total views. Fetch it daily and store the numbers to chart a
hashtag's growth.
Keyword ideas from search suggestions
Search suggestions returns what TikTok suggests as someone types, usually 10. It's a quick way to see how people search for a topic:
curl -H "x-api-key: $API_KEY" "$API_URL/v1/tiktok/search/suggestions?q=protein+snacks"Errors you'll see
| Answer | When |
|---|---|
403 LOGIN_REQUIRED | A private account's videos or playlists. Its profile still answers, with private set to true. |
404 NOT_FOUND | The account or video doesn't exist, was removed or made private, or isn't shown in the region. |
429 RATE_LIMITED | Too many calls this minute: wait as long as Retry-After says. |
503 EMPTY_PAGE | A next page came back empty: try again, or start from the first page. |
Errors cost no credits. See Errors.
Build your own TikTok scraper, or use an API?
A scraper of your own has to sign TikTok's requests as its web app does, rotate residential proxies, and keep its parsers in step with pages that change often. The build-or-buy guide walks through the real costs. Social Parse carries that work: when TikTok changes a page, the reader is repaired and your code keeps working.
FAQ
What are the legal limits on TikTok data?
It depends on where you are and what you do with the data, so ask a lawyer about your use case. Social Parse reads only public, logged-out pages, keeps no archive, and its terms rule out surveillance, re-identification and similar uses.
Do I need a TikTok account?
No. Every call reads what a logged-out visitor sees. You only need an API key.
How much does it cost?
One credit per successful call; a page of videos or comments is one call. New accounts get 100 free credits. See pricing.
Can I get a TikTok video's transcript?
Yes, with the transcript endpoint. See the TikTok transcript API guide.
Can I export a video's comments?
Yes. The TikTok comments guide has a script that saves every comment and reply to a CSV.