A TikTok API is a REST interface that returns public TikTok data as JSON — user profiles, videos, followers, comments, search results, country-level trending hashtags, live rooms, video downloads, and TikTok Shop products. You send an HTTP GET with an API key and a username, video id, or search keyword; you do not log into TikTok or apply for TikTok for Developers.
This guide covers the APIVex TikTok API (62 endpoints). Every section starts with the direct answer, then the request you actually run.
Last updated: 15 September 2026
Key takeaways
- Base URL:
https://api.apivex.com/tiktok/api/ - Auth header:
x-apivex-key(from the APIVex dashboard) - Profile lookup uses
uniqueId(the @username). Video lists, followers, and liked posts usesecUidfrom that profile response. - Trending, Shop, and live rooms are TikTok-specific. They are the reason this API is not an Instagram clone.
- Official TikTok APIs require app review or the Research API. This is a third-party data API for public pages.
- The same URLs import into Google Sheets through the APIVex add-on.
What data can you get from a TikTok API?
You can read public TikTok objects over HTTPS. You cannot post, like, follow, or log a user in.
| Data | What you get | Typical search this answers |
|---|---|---|
| Users | Bio, avatar, verified flag, follower / following / video / like counts, secUid | "TikTok user profile API", "TikTok follower count API" |
| Videos | Caption, author, music, views, likes, shares, comments | "TikTok video API", "get TikTok post by id" |
| Social graph | Followers, followings, liked posts, reposts, playlists, stories | "TikTok followers API" |
| Comments | Thread + replies on a video | "TikTok comments API" |
| Search | Videos, accounts, general keyword search | "search TikTok videos API" |
| Trending | Hashtags, keywords, songs, creators, ads, top products by country | "TikTok trending hashtags API" |
| Live | Room info, whether a room is live, stream URL | "TikTok live API" |
| Download | Video file / audio from a public video URL | "download TikTok video API" |
| Shop | Product, reviews, seller | "TikTok Shop API" |
| Extra | Music, challenges, effects, collections, gifts, places | "TikTok sound API", "TikTok hashtag challenge API" |
Interactive docs and try-it-out: apivex.com/docs/tiktok.
TikTok API vs official TikTok for Developers
People asking "is there a TikTok API?" usually mean one of two products.
| TikTok for Developers (official) | APIVex TikTok API | |
|---|---|---|
| Purpose | Login, ads, approved display, academic Research API | Read public creator / video / Shop / trend data |
| Access | Developer account, app review, scopes | API key, no TikTok app review |
| Best for | Products that must be official TikTok integrations | Research, dashboards, Sheets, competitor monitoring |
| Not for | Skipping review | Writing to TikTok, private accounts, a contractual SLA with TikTok |
If you need Login Kit or Marketing API, use developers.tiktok.com. If you need a creator's public follower count or US trending hashtags this week, use the requests below.
How to get started
Time: about 5 minutes. You need: an APIVex account and any public TikTok username.
- Sign up at apivex.com and copy your team API key.
- Send
x-apivex-key: YOUR_API_KEYon every request. - Call the profile endpoint with a
uniqueId(no@). - Reuse
secUidfrom that response for posts, followers, and liked videos.
First request (profile)
curl -s "https://api.apivex.com/tiktok/api/user/info?uniqueId=zachking" \
-H "x-apivex-key: YOUR_API_KEY"import requests
r = requests.get(
"https://api.apivex.com/tiktok/api/user/info",
headers={"x-apivex-key": "YOUR_API_KEY"},
params={"uniqueId": "zachking"},
timeout=30,
)
print(r.json())const res = await fetch(
"https://api.apivex.com/tiktok/api/user/info?uniqueId=zachking",
{ headers: { "x-apivex-key": "YOUR_API_KEY" } }
);
console.log(await res.json());zachking is the username the docs playground uses. Swap it for any public account.
The JSON includes display name, bio, avatar, verified status, and stats (followers, following, videos, likes). Copy secUid — the next sections need it.
Common mistakes: sending X-RapidAPI-Key instead of x-apivex-key; putting @ in uniqueId; calling /api/user/posts with a username instead of secUid.
How to get a TikTok user's follower count
Call GET /api/user/info?uniqueId=USERNAME. The follower count is in the profile stats object (followerCount).
Useful variants:
| Endpoint | When to use |
|---|---|
GET /api/user/info?uniqueId=zachking | You have the @username |
GET /api/user/info-by-id?userId=107955 | You have a numeric user id |
GET /api/user/info-with-region?uniqueId=charlidamelio | You want region-aware profile fields |
Related user endpoints (all take secUid unless noted):
GET /api/user/followers?secUid=SEC_UID&count=30&maxCursor=0
GET /api/user/followings?secUid=SEC_UID&count=30&maxCursor=0
GET /api/user/liked-posts?secUid=SEC_UID&count=30&maxCursor=0
GET /api/user/popular-posts?secUid=SEC_UID
GET /api/user/oldest-posts?secUid=SEC_UID
GET /api/user/story?secUid=SEC_UID
GET /api/user/repost?secUid=SEC_UID
GET /api/user/playlist?secUid=SEC_UIDPage followers and followings with maxCursor from the previous response. Start at 0.
How to get a TikTok user's videos
You cannot list videos by username alone. Fetch the profile, read secUid, then:
curl -s "https://api.apivex.com/tiktok/api/user/posts?secUid=SEC_UID&count=30&maxCursor=0" \
-H "x-apivex-key: YOUR_API_KEY"posts = requests.get(
"https://api.apivex.com/tiktok/api/user/posts",
headers={"x-apivex-key": "YOUR_API_KEY"},
params={"secUid": sec_uid, "count": 30, "maxCursor": 0},
timeout=30,
).json()Each item includes view, like, share, and comment counts plus video metadata. Repeat with the returned maxCursor until there is no next page.
For one video you already have an id for:
GET /api/post/detail?videoId=VIDEO_IDThat returns caption, author, music, and engagement.
How to get TikTok comments
GET /api/post/comments?videoId=VIDEO_ID&count=20&cursor=0
GET /api/post/comment/replies?commentId=COMMENT_ID&videoId=VIDEO_ID&count=20&cursor=0Comments paginate with cursor, not maxCursor. Pull the parent thread first, then replies per commentId.
How to search TikTok videos and users
GET /api/search/video?keyword=cooking+recipes&count=20&cursor=0
GET /api/search/account?keyword=fitness&count=20&cursor=0
GET /api/search/general?keyword=tech+reviews&count=20&cursor=0keyword is a URL-encoded query. Use video search for content research, account search for creator discovery, general search when you want a mixed result set.
How to get TikTok trending hashtags by country
GET /api/trending/hashtag?country=US
GET /api/trending/keyword?country=US
GET /api/trending/song?country=US
GET /api/trending/creator?country=US
GET /api/trending/ads?country=US&period=30
GET /api/trending/top-products?country=UScountry is an ISO code (US, GB, ID, BR). Ads accept a period in days. This is the block marketers usually want: weekly content calendars, sound research, and creator scouting without sitting in TikTok Creative Center.
How to download a TikTok video via API
GET /api/download/video?url=https://www.tiktok.com/@user/video/VIDEO_ID
GET /api/download/music?url=https://www.tiktok.com/@user/video/VIDEO_IDPass the public video URL. The video route returns the playable file; the music route returns the audio track. Only use this on content you have the right to store.
How to get TikTok Shop and live data
Shop (ecommerce research):
GET /api/shop/product?productId=PRODUCT_ID
GET /api/shop/product/reviews?productId=PRODUCT_ID
GET /api/shop/seller/info?sellerId=SELLER_IDLive:
GET /api/live/info?roomId=ROOM_ID
GET /api/live/check-alive?roomId=ROOM_ID
GET /api/live/stream?roomId=ROOM_IDYou typically get roomId from a live search or a creator who is currently broadcasting. check-alive is the cheap poll; stream is the playback URL.
Music, challenges, effects, collections, gifts, and places are on the same base URL — see the full reference.
Python example: profile + last 30 videos
import requests
API_KEY = "YOUR_API_KEY"
BASE = "https://api.apivex.com/tiktok/api"
headers = {"x-apivex-key": API_KEY}
profile = requests.get(
f"{BASE}/user/info",
headers=headers,
params={"uniqueId": "zachking"},
timeout=30,
).json()
user = profile["data"]
sec_uid = user.get("user", user).get("secUid")
stats = user.get("stats", {})
print(f"Followers: {stats.get('followerCount')}")
posts = requests.get(
f"{BASE}/user/posts",
headers=headers,
params={"secUid": sec_uid, "count": 30, "maxCursor": 0},
timeout=30,
).json()
print(f"Videos on this page: {len(posts.get('data', {}).get('itemList', posts.get('data', [])))}")Field nesting can wrap under data.user / data.stats. If a key is missing, print profile.keys() and read the live payload in the docs playground.
Import TikTok API data into Google Sheets
Any GET URL on this API can be pasted into the APIVex Google Sheets add-on.
- Install the add-on (tutorial).
- Open a sheet → Extensions → APIVex → Import API.
- Paste a full URL, for example
https://api.apivex.com/tiktok/api/trending/hashtag?country=US - Preview columns, import, optionally schedule a refresh.
Typical Sheets jobs: a daily trending-hashtag tab, a creator roster with follower counts, a Shop-price watch.
Rate limits, errors, and pagination
| Topic | Rule |
|---|---|
| Auth | x-apivex-key on every call. Wrong or missing → 401 / 403. |
| Quotas | Live numbers are on apivex.com/pricing. Free starts at 100 requests/month. |
| User / post lists | maxCursor, start at 0 |
| Comments / search | cursor, start at 0 |
| Unknown user | 404 or status: false — not an empty 200 |
| Cache | Cache profile and trending responses. Do not poll a creator every second. |
This API reads public TikTok pages and app endpoints. TikTok can change, throttle, or block the upstream. You are responsible for how you store and display the data. It is not a substitute for TikTok's official developer terms.
FAQ
What is a TikTok API?
A TikTok API is an HTTP interface that returns TikTok data (profiles, videos, followers, trends, Shop, live) as JSON. Official APIs live on developers.tiktok.com. Third-party APIs such as APIVex wrap public data so you can query it with a key and a username.
How do I get TikTok user data with an API?
GET https://api.apivex.com/tiktok/api/user/info?uniqueId=USERNAME with header x-apivex-key. The body includes bio, avatar, verification, and follower / video counts. Use secUid from that body to list videos and followers.
How do I get a TikTok follower count via API?
Use the profile endpoint above and read followerCount from stats. You do not need TikTok app review for this third-party route.
Is there an unofficial TikTok API?
Yes. Several marketplaces expose public TikTok data without official app review. APIVex's version is https://api.apivex.com/tiktok/api/ with 62 endpoints. Official APIs still exist if you need Login Kit, ads, or a Research agreement.
Can I get TikTok trending hashtags by country?
Yes. GET /api/trending/hashtag?country=US (swap the ISO country). The same family covers keywords, songs, creators, ads, and top Shop products.
Can I download TikTok videos through an API?
Yes, GET /api/download/video?url=TIKTOK_URL returns the video; /api/download/music returns the audio. Only download content you have the right to keep.
Does the TikTok API work in Google Sheets?
Yes. Paste the same URL you would curl into the APIVex Google Sheets add-on and map columns.
TikTok API vs Instagram API — what is different?
Both can do profile, posts, followers, and search. TikTok adds country trending, Shop, live rooms, gifts, and effects. Instagram adds Reels-as-a-surface, stories, locations, and audio pages. See the Instagram API guide for that surface.
Why does listing videos need secUid?
TikTok's post list is keyed by secUid, not the @username. Profile first, then posts. Reuse the same secUid for followers, liked posts, popular posts, and playlists.
Next steps
- Try endpoints in the TikTok API docs
- New to APIVex? Getting started
- Pull the same pattern for Instagram: Instagram API guide
- Plans and quotas: apivex.com/pricing



