JustSERPDocs
TikTok

TikTok Ad Library

The ads in TikTok's Ad Library (library.tiktok.com) for a keyword or for one advertiser, 12 to a page, with their dates, creative, estimated audience and, for an ad TikTok has taken down, its rejection notice.

GET
/v1/tiktok/ads-library

The ads in TikTok's Ad Library (library.tiktok.com) for a keyword or for one advertiser, 12 to a page, with their dates, creative, estimated audience and, for an ad TikTok has taken down, its rejection notice. Answered as the document: search_metadata (request_url is the Library's page for the search), search_parameters (with the defaults used), search_information (total_results, which TikTok stops counting at 5,000), ads and pagination.next_page_token. A search with no ads is a 200 with ads: [] and an error sentence. advertiser_token comes from tiktok_ads_library_advertiser_search, from an ad here or from tiktok_ads_library_ad_details. The Library keeps about the last five months; time_period defaults to the last 30 days. No snapshot.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
q?string

The keyword. With advertiser_id it is the advertiser's name.

Length1 <= length <= 200
advertiser_token?string

Ads of one advertiser; bundles its id and name, which TikTok needs together. From the advertiser search, from an ad here or from the ad details. Wins over q.

advertiser_id?string

An advertiser's id; needs the advertiser's name in q. Prefer advertiser_token.

country?string

all or one of AT BE BG HR CY CZ DK EE FI FR DE GR HU IS IE IT LV LI LT LU MT NL NO PL PT RO SK SI ES SE CH TR GB.

Default"all"
time_period?string

YYYY-MM-DD..YYYY-MM-DD, UTC; not before 2022-10-01, not in the future. The Library keeps about the last five months. Default: the last 30 days.

Match^\d{4}-\d{2}-\d{2}\.\.\d{4}-\d{2}-\d{2}$
next_page_token?string

The token an answer gave.

sort_by?string
Default"last_shown_date_newest_to_oldest"
Value in"last_shown_date_newest_to_oldest""last_shown_date_oldest_to_newest""published_date_newest_to_oldest""published_date_oldest_to_newest""unique_users_seen_low_to_high""unique_users_seen_high_to_low"

Response Body

The page of ads, as the document. When the answer could not be parsed, the usual envelope.

application/json
  1. response

The Ad Library search document.

search_metadata?
search_parameters?

The request with the defaults used (country, time_period, sort_by).

search_information?
ads?array<>
pagination?
error?string

Present, with ads: [], when the search found no ads.

[key: string]?any
Example Request
curl -X GET 'https://api.justserp.com/v1/tiktok/ads-library?q=nike&country=DE&time_period=2026-10-01..2026-10-27'
Example Response
{  "search_metadata": {    "id": "string",    "status": "string",    "created_at": "string",    "request_url": "string"  },  "search_parameters": {},  "search_information": {    "total_results": 0  },  "ads": [    {      "position": 0,      "id": "string",      "advertiser": "string",      "advertiser_id": "string",      "advertiser_token": "string",      "title": "string",      "format": "video",      "is_unavailable": true,      "first_shown_datetime": "2019-08-24T14:15:22Z",      "last_shown_datetime": "2019-08-24T14:15:22Z",      "video_link": "string",      "cover_image": "string",      "image_urls": [        "string"      ],      "estimated_audience": "string",      "estimated_audience_min": 0,      "estimated_audience_max": 0,      "spent": "string",      "rejection_info": {        "reasons": [          "string"        ],        "affected_regions": [          "string"        ],        "reporting_source": "string",        "automated_notice": "string",        "hit_illegal_content_reason": 0      }    }  ],  "pagination": {    "next_page_token": "string"  },  "error": "string"}