TikTok Top ads API
Read the Top Ads list from TikTok's Creative Center for one country: each row is one ad with rank, title, brand_name, industry, objective, ctr_top_percent, like_count and the video link video_url, for $0.79 per 1,000 calls.
- No parameter is required:
countrydefaults to US andtime_windowto30d - One call returns one page, about 20 ads, and
next_page_tokenleads to the next page - Failed calls and empty results are not charged.
API health
- 24h health
- Normal
- Healthy / normal
- Available
Last 24 hours
Last 30 days
1Request
POST /api/v1/social { "platform": "tiktok", "action": "top_ads", "params": {} }2JSON response
{ "results": [ { "next_page_token": string, "rank": number, "title": string, "brand_name": … }, … ] }3Rows
next_page_token rank title brand_name string number string … 4CSV
tiktok-top_ads-sample.csv next_page_token,rank,id,title,url,brand_name,industry,industry_key,objective,objective_key,budget_level,ctr_top_percent,like_count,video_id,duration_sec,duration_seconds,width,height,cover_url,video_url,video_urls,platform
country and time_window) goes in, and the first page of the list comes back. Each ad is one row with rank, title, brand_name, industry, objective, ctr_top_percent, like_count and the video links, listed as a field table and a CSV file.What data you get
Each row is one top ad. This endpoint has no public real sample yet. The table lists the fields, types and meanings that each row returns, with no values.
| Field | Type | Meaning |
|---|---|---|
| next_page_token | string | Page token (hashtag_search / music_search / user_search / sound_videos / comment_replies / shop_category_products / following / shop_products / shop_product_reviews / user_playlists / playlist_videos / user_reposts): pass it back unchanged as page_token on the next request to get the next page; every row of a page carries the same value; valid for 24 hours. Only a page without this field is the last page. |
| rank | number | Rank, starting from 1 (music_chart / shop_hot_products); in search_suggest, the order of the term among the page's related searches. In top_ads, the ad's position on its page, starting from 1 on every page, which is the order TikTok gives. |
| id | string | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| title | string | Title. null when the platform has no titles (for example text-only posts). |
| url | string | Link to the record on the platform. |
| brand_name | — | Brand name of the product (shop_search, shop_category_products, shop_products); absent when no brand is listed for the product. In top_ads, the advertiser's brand name; absent when TikTok shows no brand for the ad. |
| industry | — | Industry of the ad, as written on the Creative Center page, for example Sports & Outdoor (top_ads). |
| industry_key | — | ID of the industry, for example label_28000000000 (top_ads). |
| objective | — | Campaign objective of the ad, as written on the page, for example Conversions, Reach, Traffic, Lead Generation or Video Views (top_ads). |
| objective_key | — | ID of the campaign objective, for example campaign_objective_conversion (top_ads). |
| budget_level | — | Spend level: low, medium or high (top_ads); TikTok gives the level only, not an amount. |
| ctr_top_percent | — | CTR rank band (top_ads): the n in "Top n% CTR" on the Creative Center page; the smaller the number, the higher the ad ranks on click-through rate. It is not the click-through rate itself. |
| like_count | number | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| video_id | string | ID of the video the comment belongs to (comment_replies). In top_ads, the ID of the ad's video file; it is not the ID of a TikTok post and cannot be used to call video. |
| duration_sec | number | Duration in seconds, the same value as duration_seconds (both names are returned): the video's length on video rows, the sound's length on music_search, music_chart and music_detail. In top_ads, the length of the ad video, with decimals. |
| duration_seconds | number | Duration in seconds. null for content that is not video or audio. |
| width | number | Width of the watermark-free video file in pixels (video_download); absent for photo posts. In playlist_videos, user_reposts and user_stories, the width of the video frame. In top_ads, the width of the ad video's frame. |
| height | number | Height of the watermark-free video file in pixels (video_download); absent for photo posts. In playlist_videos, user_reposts and user_stories, the height of the video frame. In top_ads, the height of the ad video's frame. |
| cover_url | — | Link to the post's cover image (photos). In top_ads, the link to the ad video's cover image; it is signed and expires, so download soon if you want to keep it. |
| video_url | string | Watermark-free video file URL (video_download, mp4). No cookie needed and no IP restriction; expires at expires_at; absent for photo posts. In top_ads, the URL of the ad's video file at 720p; it is signed and expires, so download soon if you want to keep it. |
| video_urls | — | File URLs of the ad video at each quality (top_ads): [{quality, url}], with quality such as 720p or 540p. The links are signed and expire, so download soon if you want to keep them. |
| platform | string | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
Use cases
See a country's top ad creatives
Call
top_adswith acountry, then watch each ad fromvideo_url, with itscover_urlandtitlealongside, to study the creatives on the list.Compare countries
Call once per
countrywith the sametime_windowand see which ads and brands lead in each country.Group ads by industry and objective
Group the rows by
industryandobjectiveon your side. The endpoint itself does not filter by either.Find ads with a top CTR rank
Read
ctr_top_percent, where a smaller number means a higher CTR rank, and look atbudget_levelandlike_countnext to it.
Limits and gotchas
- All parameters are optional.
countrydefaults to US andtime_windowto30d;7dand180dare also valid, and any other value is rejected before any charge. - Only 28 countries have a list. A
countrythat is not in the supported list is rejected before any charge. - There is no keyword or filter parameter. One call returns one page, about 20 ads; pass
next_page_tokenback aspage_tokenfor the next page. A differentcountryortime_windowgives a different list. ctr_top_percentis a rank band, not a click-through rate.budget_levelislow,mediumorhigh, with no spend amount.cover_url,video_urlandvideo_urlsare signed links that expire, so download the files soon.video_idis the ID of the ad's video file, not of a TikTok post, and cannot be used to callvideo.
Pricing
You pay $0.000792 per call, not per row. One call returns one page, about 20 ads, and each page is one call. Failed calls and empty results are not charged.
| Calls | Cost |
|---|---|
| 10,000 | $7.92 |
| 100,000 | $79.17 |
| 1,000,000 | $791.67 |
Totals use the list price per call.
Code samples
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "tiktok",
"action": "top_ads",
"params": {}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
API reference
See the parameters, response fields, errors and billing for top_ads, and copy the page or open it as Markdown for an AI assistant.
AI prompt
#Please help me write a data collection script with the EveryInfra TikTok Top ads endpoint (tiktok/top_ads).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to tiktok and action to top_ads, and put the parameters inside params.
- No required parameters.
- Optional parameters:
- country: The country whose Top Ads you want, default US: AE, AR, AU, BR, CA, CO, DE, ES, FR, GB, ID, IT, JP, KR, MX, MY, NL, PH, PK, RO, SA, SE, SG, TH, TR, US, VN or ZA.
- page_token: Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with country and time_window unchanged.
- time_window: The period top_ads ranks over: 7d, 30d (default) or 180d. Other values are declined before you are charged (422, no charge). (allowed: 180d / 30d / 7d)
- Returns a list of records. Main fields of each record: next_page_token (Page token (hashtag_search / music_sear…), rank (Rank, starting from 1 (music_chart / sh…), id, title, url, brand_name (Brand name of the product (shop_search,…), industry (Industry of the ad, as written on the C…), industry_key (ID of the industry, for example label_2…), objective (Campaign objective of the ad, as writte…), objective_key (ID of the campaign objective, for examp…), budget_level (Spend level: low, medium or high (top_a…), ctr_top_percent (CTR rank band (top_ads): the n in "Top…); 21 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=tiktok.
- Example request body:
{
"platform": "tiktok",
"action": "top_ads",
"params": {}
}
- Price: $0.79 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
#| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | tiktok | Platform identifier, fixed value. |
action | body | string | Yes | top_ads | Capability identifier, fixed value. |
country | body.params | string | No | - | The country whose Top Ads you want, default US: AE, AR, AU, BR, CA, CO, DE, ES, FR, GB, ID, IT, JP, KR, MX, MY, NL, PH, PK, RO, SA, SE, SG, TH, TR, US, VN or ZA. Other countries have no list and are declined before you are charged (422, no charge). |
page_token | body.params | string | No | - | Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with country and time_window unchanged. Start at page 1 and fetch the pages one after another, without long gaps. Each page holds about 20 ads and is one call; limit has no effect. TikTok sometimes does not provide later pages; that call returns 503 and is not charged, so retry later with the same page_token. Tokens last 24 hours; the last page has no next_page_token. |
time_window | body.params | string (enum) | No | - | The period top_ads ranks over: 7d, 30d (default) or 180d. Other values are declined before you are charged (422, no charge).Allowed values180d30d7d |
Response example
#{ "id": "req_…", "platform": "tiktok", "action": "top_ads", "results": [ { "next_page_token": …, "rank": …, "id": …, "title": …, "url": …, "brand_name": …, "industry": …, "industry_key": …, "objective": …, "objective_key": …, "budget_level": …, "ctr_top_percent": …, "like_count": …, "video_id": …, "duration_sec": …, "duration_seconds": …, "width": …, "height": …, "cover_url": …, "video_url": …, "video_urls": …, "platform": … } ], "next_page_token": …, "pagination": { … }, "count": …, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
Response fields
#Business data is in results. The table lists the fields a record can contain. Values the platform does not show are never made up.
| Field | Meaning |
|---|---|
next_page_token | Page token (hashtag_search / music_search / user_search / sound_videos / comment_replies / shop_category_products / following / shop_products / shop_product_reviews / user_playlists / playlist_videos / user_reposts): pass it back unchanged as page_token on the next request to get the next page; every row of a page carries the same value; valid for 24 hours. Only a page without this field is the last page. |
rank | Rank, starting from 1 (music_chart / shop_hot_products); in search_suggest, the order of the term among the page's related searches. In top_ads, the ad's position on its page, starting from 1 on every page, which is the order TikTok gives. |
id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
title | Title. null when the platform has no titles (for example text-only posts). |
url | Link to the record on the platform. |
brand_name | Brand name of the product (shop_search, shop_category_products, shop_products); absent when no brand is listed for the product. In top_ads, the advertiser's brand name; absent when TikTok shows no brand for the ad. |
industry | Industry of the ad, as written on the Creative Center page, for example Sports & Outdoor (top_ads). |
industry_key | ID of the industry, for example label_28000000000 (top_ads). |
objective | Campaign objective of the ad, as written on the page, for example Conversions, Reach, Traffic, Lead Generation or Video Views (top_ads). |
objective_key | ID of the campaign objective, for example campaign_objective_conversion (top_ads). |
budget_level | Spend level: low, medium or high (top_ads); TikTok gives the level only, not an amount. |
ctr_top_percent | CTR rank band (top_ads): the n in "Top n% CTR" on the Creative Center page; the smaller the number, the higher the ad ranks on click-through rate. It is not the click-through rate itself. |
like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
video_id | ID of the video the comment belongs to (comment_replies). In top_ads, the ID of the ad's video file; it is not the ID of a TikTok post and cannot be used to call video. |
duration_sec | Duration in seconds, the same value as duration_seconds (both names are returned): the video's length on video rows, the sound's length on music_search, music_chart and music_detail. In top_ads, the length of the ad video, with decimals. |
duration_seconds | Duration in seconds. null for content that is not video or audio. |
width | Width of the watermark-free video file in pixels (video_download); absent for photo posts. In playlist_videos, user_reposts and user_stories, the width of the video frame. In top_ads, the width of the ad video's frame. |
height | Height of the watermark-free video file in pixels (video_download); absent for photo posts. In playlist_videos, user_reposts and user_stories, the height of the video frame. In top_ads, the height of the ad video's frame. |
cover_url | Link to the post's cover image (photos). In top_ads, the link to the ad video's cover image; it is signed and expires, so download soon if you want to keep it. |
video_url | Watermark-free video file URL (video_download, mp4). No cookie needed and no IP restriction; expires at expires_at; absent for photo posts. In top_ads, the URL of the ad's video file at 720p; it is signed and expires, so download soon if you want to keep it. |
video_urls | File URLs of the ad video at each quality (top_ads): [{quality, url}], with quality such as 720p or 540p. The links are signed and expire, so download soon if you want to keep them. |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
Errors and billing
#- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.
FAQ
What does rank mean in the top ads list?
It is the position of the ad on its page, starting from 1 on every page, in the order TikTok gives.
Can I get a second page or more than about 20 ads?
Yes. One call returns one page, about 20 ads. When another page exists, the response includes next_page_token; pass it unchanged as page_token, with the same country and time_window, to get that page. Each page counts as one call. TikTok sometimes does not provide later pages; that call returns 503 and is not charged, and you can retry later with the same page_token or start again from page 1 without page_token. A different country or time_window gives a different list, not more rows of the same one.
How do I read ctr_top_percent?
It is the n in "Top n% CTR" on the Creative Center page. The smaller the number, the higher the ad ranks on click-through rate. It is not the click-through rate itself.
How much does it cost to read the top ads?
It costs $0.000792 per call, or $0.79 per 1,000 calls, billed per call and not per row. Failed calls and empty results are not charged.
Related TikTok endpoints
You can call the other TikTok endpoints with the same key, such as trending_hashtags to read the trending hashtag list or music_chart to read the music chart, both by country.
- Search
search$0.56 per 1,000 callsSearch TikTok by keyword across the video, account or top tab. - Details
profile$0.56 per 1,000 callsLook up a TikTok account by handle. - Videos by user
user_videos$0.56 per 1,000 callsList a TikTok creator's videos with caption, publish time and like, comment, share and view counts. - Video details
video$0.56 per 1,000 callsFetch one TikTok video's caption, author, publish time and like, comment, share and view counts from its URL. - Comments
comments$0.56 per 1,000 callsRead the comments on a TikTok video. - Hashtag
hashtag$0.56 per 1,000 callsBrowse TikTok videos posted under a hashtag. - Followers
followers$0.56 per 1,000 callsCheck a TikTok account's follower, following, post and like totals by handle, with a precision flag for rounded numbers. - Transcript
transcript$0.56 per 1,000 callsExtract the transcript of a TikTok video from its URL. - Shop product search
shop_search$0.56 per 1,000 callsFind TikTok Shop products by keyword. - Shop creator details
shop_creator$0.56 per 1,000 callsSize up a TikTok Shop creator by handle. - Hashtag search
hashtag_search$0.81 per 1,000 callsSearch TikTok hashtags bykeyword. - Music search
music_search$0.81 per 1,000 callsSearch TikTok's sound library bykeyword, such as a song or artist. - Music chart
music_chart$0.81 per 1,000 callsRead a TikTok music chart:top50(default) orviral50. - Account search
user_search$0.56 per 1,000 callsSearch TikTok accounts bykeyword, in the order TikTok search ranks them. - Videos using a sound
sound_videos$0.56 per 1,000 callsList the TikTok videos that use one sound, from itsmusic_idor sound page link. - Comment replies
comment_replies$0.56 per 1,000 callsRead the replies under one comment on a TikTok video, from the videourland the comment'sidreturned bycomments. - Shop best sellers
shop_hot_products$0.81 per 1,000 callsRead the TikTok Shop best-seller list for one market: ID, JP, MX, MY (default), PH, SG, TH or VN. - Shop products by category
shop_category_products$0.81 per 1,000 callsList TikTok Shop products in one category bycategory_id, such as 601450 for beauty and personal care, in a chosen market. - Following
following$0.64 per 1,000 callsList the accounts a TikTok user follows, by handle. - Video download links
video_download$0.64 per 1,000 callsGet the download links for one TikTok video from itsurl, without the watermark. - Live room
live_room$0.81 per 1,000 callsCheck whether a TikTok account is live right now, by handle. - Shop store products
shop_products$0.81 per 1,000 callsList the products of one TikTok Shop store from itsshop_idor store link, in a chosen market. - Shop product reviews
shop_product_reviews$0.76 per 1,000 callsRead buyer reviews of one TikTok Shop product from itsproduct_idor product link. - Shop product detail
shop_product_detail$0.79 per 1,000 callsRead one TikTok Shop product from itsproduct_idor product link andcountry: the title inname,image_urlandimage_urls,priceandoriginal_pricein the localcurrency,skuswith each variant's price and stock,shop,rating_distribution,specs,descriptionand shipping. - Trending hashtags
trending_hashtags$0.81 per 1,000 callsRead the trending hashtags on TikTok for one market over the last 7, 30 or 90 days. - Username to user ID
resolve_user$0.56 per 1,000 callsTurn a TikTokusername(with or without @), a profile link or asec_uidinto the account's numericuser_id, itssec_uid, currentusernameand profileurl. - Link recognition
resolve_links$0.56 per 1,000 callsRead the video ID from one TikTok link inurl, including vm.tiktok.com and vt.tiktok.com share links. - Hashtag detail
hashtag_detail$0.56 per 1,000 callsRead one TikTok hashtag fromhashtag(its name, with or without #, a tag link or the numeric ID):hashtag_id,hashtag_name,url, exactvideo_countandview_count, andis_commercial. - Music detail
music_detail$0.56 per 1,000 callsRead one TikTok sound bymusic_idor music link:title,author_name,album,duration_seconds, how many videos use it (use_count),is_original,is_copyrighted, a cover link and a preview audio link that expires. - Photo post images
photos$0.56 per 1,000 callsGet every image of a TikTok photo post (photo mode or carousel) from itsurl, in the post's order:imageswith each image'surl,widthandheightin pixels, plusimage_urls, the same links as a list. - Profile contact
profile_contact$0.56 per 1,000 callsRead the bio text an account wrote on its own TikTok profile, and the link in it, fromusername(a handle with or without @, a profile link or asec_uid):user_id,sec_uid,username,display_name,url,bioandexternal_url, as written, not reworded or guessed. - Search suggestions
search_suggest$0.56 per 1,000 callsRead the related searches TikTok shows for a search termkeyword(1 to 100 characters). - Account playlists
user_playlists$0.56 per 1,000 callsList the playlists on a TikTok profile fromusername(a handle, profile link orsec_uid), in TikTok's order. - Playlist videos
playlist_videos$0.79 per 1,000 callsList the videos in one TikTok playlist from itsplaylist_idor playlist link, in the playlist's order. - User reposts
user_reposts$0.79 per 1,000 callsList the videos under the Reposts tab of a TikTok profile, byusername, most recent repost first. - Account stories
user_stories$0.88 per 1,000 callsRead the stories a TikTok account has up right now, byusername, oldest first, all in one call.