What you get#
Onekey exposes TikTok as 39 endpoints behind one API key: 13 endpoints return one record (data is an object) and 26 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for TikTok also works for the rest of the social networks category.
Endpoints#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
adlibrary_ad | Get a TikTok Ad Library ad. | url, ad_id | 2 | beta needs a pack |
adlibrary_search | Search the TikTok Ad Library. | query, advertiser_name, cursor | 3 | beta needs a pack |
ads_top | Top-performing ads board for a market and time window. | country, period | 3 | beta needs a pack |
collection_videos | List videos in a TikTok collection. | url*, cursor | 2 | beta needs a pack |
comment | Look up one TikTok comment by URL. | comment_url* | 2 | beta needs a pack |
comment_replies | Replies to a TikTok comment. | id*, comment_id*, cursor | 2 | beta may need a pack |
comments | Comments on a TikTok video. | id*, cursor | 2 | beta may need a pack |
effect_videos | List TikTok videos made with an effect. | effect_id*, cursor | 2 | beta needs a pack |
effects | Get TikTok effects by id. | ids* | 2 | beta needs a pack |
followers | Followers of a TikTok user (login-gated on the web: needs a session). | sec_uid*, cursor | 2 | beta may need a pack |
following | Accounts a TikTok user follows (login-gated on the web: needs a session). | sec_uid*, cursor | 2 | beta may need a pack |
hashtag | TikTok hashtag (challenge) details: id, description, video and view counts. | tag* | 1 | beta may need a pack |
hashtag_videos | Videos under a TikTok hashtag (needs the challenge id from tiktok.hashtag). | challenge_id*, cursor | 2 | beta may need a pack |
hashtags_popular | Trending hashtag board for a market and time window. | country, period | 3 | beta needs a pack |
location_posts | List TikTok videos tagged at a place. | location_id*, cursor | 2 | beta needs a pack |
music | TikTok sound/music details: title, artist, duration, video count. | id* | 2 | beta may need a pack |
music_videos | Videos that use a TikTok sound. | id*, cursor | 2 | beta may need a pack |
oembed | TikTok oEmbed for a public video (title, author, thumbnail). | handle*, id* | 1 | beta may need a pack |
playlist_videos | List videos in a TikTok playlist. | playlist_id, url, cursor | 2 | beta needs a pack |
post_transcript | Get TikTok video transcript. | url* | 2 | beta needs a pack |
profile | TikTok user profile: nickname, bio, followers, following, likes, video count, secUid. | handle* | 2 | beta may need a pack |
profile_full | TikTok profile, recent posts, and computed analytics in one call. | handle, user_id | 2 | beta needs a pack |
profile_region | Get TikTok profile region. | handle* | 2 | beta needs a pack |
related | Videos related to a TikTok video. | id* | 2 | beta may need a pack |
search_mentions | Search TikTok videos that mention an account (keyword search for @handle). | handle*, cursor | 2 | beta needs a pack |
search_music | Search TikTok sounds. | query*, cursor | 2 | beta needs a pack |
search_suggestions | Get TikTok search suggestions. | query* | 2 | beta needs a pack |
search_top | TikTok top search results. | query*, cursor | 2 | beta needs a pack |
search_users | Search TikTok users by keyword. | q*, cursor | 2 | beta may need a pack |
search_videos | Search TikTok videos by keyword. | q*, cursor | 2 | beta may need a pack |
trending | TikTok For You / trending feed (anonymous). | - | 2 | beta may need a pack |
user_audience | Get TikTok user audience demographics. | handle* | 2 | beta needs a pack |
user_liked | List the videos a TikTok account has liked. | handle, user_id, cursor | 2 | beta needs a pack |
user_live | Get TikTok user live stream. | handle* | 2 | beta needs a pack |
user_playlists | Playlists (collections) of a TikTok user. | sec_uid* | 2 | beta may need a pack |
user_videos | Recent videos posted by a TikTok user. | sec_uid*, cursor | 2 | beta may need a pack |
video | A single TikTok video: caption, author, plays, likes, comments, shares. | id* | 2 | beta may need a pack |
video_screen_text | Get TikTok video on-screen text. | url* | 2 | beta needs a pack |
videos_popular | Top Videos board for a supported market. | country | 3 | beta needs a pack |
A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.
Make a request#
This calls tiktok.hashtag (1 credit, beta). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
curl "https://api.onekey.dev/v1/tiktok/hashtag?tag=fyp" \
-H "x-api-key: YOUR_API_KEY"Fields you get back#
These unified fields come back from TikTok, with the same names as on every other platform. The count is how many of its 39 mapped endpoints return the field; a field the source lacks is null, never missing. 14 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.
| Field | Type | Endpoints |
|---|---|---|
content.text | string | 27 |
author.username | string | 25 |
engagement.likes | integer | 24 |
media.thumbnailUrl | URL | 22 |
engagement.views | integer | 21 |
content.createdAt | ISO 8601 date | 20 |
author.displayName | string | 19 |
content.id | string | 19 |
engagement.comments | integer | 14 |
author.avatarUrl | URL | 13 |
author.id | string | 13 |
engagement.shares | integer | 12 |
entity.id | string | 9 |
media.durationSeconds | number | 9 |
content.title | string | 8 |
entity.name | string | 7 |
entity.url | URL | 7 |
content.url | URL | 6 |
engagement.bookmarks | integer | 6 |
author.followers | integer | 5 |
author.verified | boolean | 4 |
media.url | URL | 3 |
author.contentCount | integer | 2 |
author.following | integer | 2 |
author.url | URL | 2 |
content.language | string | 2 |
entity.stats.itemCount | integer | 2 |
entity.status | string | 2 |
author.bio | string | 1 |
author.country | string | 1 |
entity.description | string | 1 |
media.audioUrl | URL | 1 |
The full schema is in Unified schema.
Pricing#
TikTok calls cost 1 to 3 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.