TikTok Topic Classification API. On each item you fetch.
What the item is about, as categories of the IAB Content Taxonomy's top level (most likely first; at most three), each with its probability. Add analysis=topics to any of 25 TikTok endpoints that offer it.
GET /v1/tiktok/post?analysis=topics
One param on the request. Topics on each item.
The TikTok Post API returns each post with analysis.topics beside its fields.
curl -G 'https://socialtap.dev/v1/tiktok/post' \
--data-urlencode 'url=https://www.tiktok.com/@scout2015/video/6718335390845095173' \
--data-urlencode 'analysis=topics' \
-H "x-api-key: $SOCIALTAP_API_KEY"// Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
url: "https://www.tiktok.com/@scout2015/video/6718335390845095173",
analysis: "topics",
});
const res = await fetch(`https://socialtap.dev/v1/tiktok/post?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, meta } = body;
console.log(data, meta.credits_charged);import os
import requests
res = requests.get(
"https://socialtap.dev/v1/tiktok/post",
params={"url": "https://www.tiktok.com/@scout2015/video/6718335390845095173", "analysis": "topics"},
headers={"x-api-key": os.environ["SOCIALTAP_API_KEY"]},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
data, meta = body["data"], body["meta"]
print(data, meta["credits_charged"]){
"topics": [
"automotive"
],
"topics_probability": {
"automotive": 0.65
}
}Values are examples.
GET https://socialtap.dev/v1/tiktok/postDocs What the value means.
The values below that apply, possibly none. topics_probability beside it maps each value returned to how sure it is, from 0 to 1.
| Value | Meaning |
|---|---|
automotive | cars, motorcycles, vehicles |
books_literature | books, writing, poetry |
business_finance | companies, industries, startups, the economy, marketing |
careers | jobs, hiring, workplaces, career advice |
education | schools, learning, courses, exams |
events_attractions | concerts, festivals, conferences, parks, museums |
family_relationships | parenting, dating, marriage, friendship |
fine_art | painting, sculpture, design, photography as art |
food_drink | cooking, recipes, restaurants, drinks |
healthy_living | fitness, nutrition, wellness, mental wellbeing |
hobbies_interests | crafts, collecting, DIY, outdoor hobbies |
home_garden | home improvement, decor, gardening, real estate living |
medical_health | diseases, treatments, doctors, medicine |
movies | films, cinema, actors |
music_audio | music, artists, podcasts, radio |
news_politics | news, politics, elections, government, world events |
personal_finance | saving, investing, crypto, taxes, debt, insurance |
pets | pets and animals |
pop_culture | celebrities, internet culture, memes, gossip |
real_estate | buying, selling and renting property |
religion_spirituality | religion, faith, spirituality, astrology |
science | science, research, space, the environment |
shopping | products, deals, retail, buying advice |
sports | sports, teams, athletes, betting on sports |
style_fashion | fashion, beauty, makeup, skincare |
technology_computing | software, apps, gadgets, AI, programming, the internet |
television | TV shows, streaming series |
travel | trips, destinations, hotels, airlines |
video_gaming | video games, gaming, esports |
Keep only what matches.
On a list, where keeps the items that pass. Every item judged is charged whether or not it passes, so a page can be short.
https://socialtap.dev/v1/tiktok/posts?handle=@khaby.lame&analysis=topics&where=analysis.topics=automotive25 TikTok endpoints offer it.
Each adds the analysis to the posts, profiles, comments, transcripts, web results and ads it returns. Text analyses cost one flat amount per request, or per page on a list, however many you ask for.
-
Post
TikTok Post API
Video or photo post with views, likes and media
1 credit$0.75–$1.97 per 1,000 requestsGET /v1/tiktok/post -
Post
TikTok Posts API
Account videos and photo posts, newest first
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/posts -
Post
TikTok Effect Posts API
Videos and photo posts made with an effect
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/effect_posts -
Post
TikTok Hashtag Posts API
Top videos and photo posts under a hashtag
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/hashtag_posts -
Post
TikTok Liked Posts API
What an account liked, most recent like first
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/liked_posts -
Post
TikTok Place Posts API
Videos and photo posts tagged at a place
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/place_posts -
Post
TikTok Playlist Posts API
Videos in a playlist or collection, in its order
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/playlist_posts -
Post
TikTok Search API
Videos for a keyword, by country
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/search_posts -
Post
TikTok Sound Posts API
Videos and photo posts that use a sound
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/sound_posts -
Post
TikTok Top Videos API
Ranked by country, period and metric
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/top_posts -
Post
TikTok Trending Videos API
What the explore page shows now, by topic
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/trending_posts -
Profile
TikTok Profile API
Exact follower and like counts, bio and country
1 credit$0.75–$1.97 per 1,000 requestsGET /v1/tiktok/profile -
Profile
TikTok Followers API
Followers of an account with exact counts, newest first
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/followers -
Profile
TikTok Following API
Accounts an account follows, with exact counts
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/following -
Comment
TikTok Comment API
Comment or reply with its likes and author
1 credit$0.75–$1.97 per 1,000 requestsGET /v1/tiktok/comment -
Comment
TikTok Comments API
Top-level comments with exact like and reply counts
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/comments -
Comment
TikTok Comment Replies API
Thread under a comment, with likes and authors
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/replies -
Transcript
TikTok Transcript API
Timed transcript from captions or the audio
From 1 credit$0.75–$1.97 per 1,000 requestsGET /v1/tiktok/transcript -
Web result
TikTok Hashtag Search API
Hashtags for a keyword, topic or niche
From 1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/search_hashtags -
Web result
TikTok User Search API
Accounts by keyword, niche or place
From 1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/search_profiles -
Web result
TikTok Sound Search API
Sounds and songs by title, artist or keyword
From 1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/search_sounds -
Web result
TikTok Top Search API
Accounts, videos, hashtags and sounds in one search
From 1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/search_top -
Ad
TikTok Ad Library Ad API
Targeting, reach by country and takedowns
1 credit$0.75–$1.97 per 1,000 requestsGET /v1/tiktok/ad -
Ad
TikTok Ad Library Search API
Ads by keyword or advertiser, with reach
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/search_ads -
Ad
TikTok Top Ads API
Best-performing ads by country, period and industry
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/tiktok/top_ads
| Endpoint | Adds |
|---|---|
| TikTok Post API | +2 credits per request |
| TikTok Posts API | +27 credits per page of 15 |
| TikTok Effect Posts API | +53 credits per page of 30 |
| TikTok Hashtag Posts API | +18 credits per page of 10 |
| TikTok Liked Posts API | +53 credits per page of 30 |
| TikTok Place Posts API | +53 credits per page of 30 |
| TikTok Playlist Posts API | +53 credits per page of 30 |
| TikTok Search API | +53 credits per page of 30 |
| TikTok Sound Posts API | +53 credits per page of 30 |
| TikTok Top Videos API | +35 credits per page of 20 |
| TikTok Trending Videos API | +53 credits per page of 30 |
| TikTok Profile API | +2 credits per request |
| TikTok Followers API | +33 credits per page of 30 |
| TikTok Following API | +33 credits per page of 30 |
| TikTok Comment API | +2 credits per request |
| TikTok Comments API | +80 credits per page of 50 |
| TikTok Comment Replies API | +80 credits per page of 50 |
| TikTok Transcript API | +6 credits per request |
| TikTok Hashtag Search API | +52 credits per page of 50 |
| TikTok User Search API | +52 credits per page of 50 |
| TikTok Sound Search API | +52 credits per page of 50 |
| TikTok Top Search API | +52 credits per page of 50 |
| TikTok Ad Library Ad API | +1 credit per request |
| TikTok Ad Library Search API | +12 credits per page of 12 |
| TikTok Top Ads API | +20 credits per page of 20 |
More analyses on TikTok and beyond.
The same answer on other platforms, and other answers here.
Questions about TikTok topic classification
The analyses guide has the rest.
Which TikTok endpoints offer topic classification?
How much does an analysis cost?
Do I pay when an analysis can't answer?
Can I get only the items that match?
Which languages do analyses answer in?
Can I use my own categories or questions?
Send your first request in a minute.
Get a key, send a link you already have and see what comes back. The same key works on every platform.
- No credit card
- Failed requests are free
- Works on all 319 endpoints