TikTok Ads Library API

GET   /api/v1/search?engine=tiktok_ads_library
Breaking change
Searching by advertiser_id alone is no longer supported. TikTok's Ads Library API requires both the advertiser's ID and name to filter ads correctly. Pass advertiser_token (recommended) or advertiser_id together with the advertiser's name via q.

The TikTok Ads Library API returns detailed information about TikTok advertisements. Each ad includes the position, unique ID, the date range when it was shown, and a format of video or image. The advertiser name, headline and estimated audience reach are included whenever TikTok reports them. Video ads return video and cover image links, image and carousel ads return image URLs, and some ads return no creative at all.

API Parameters

Search Params

  • Name
    q
    Required
    Optional
    Description

    Defines the keyword for your search. Use this parameter to search for ads containing specific keywords or phrases.

    If you want to search for exact match, use "" to enclose the keyword.

  • Name
    advertiser_token
    Required
    Optional
    Description

    Filters ads by an advertiser. A token that bundles an advertiser's ID and name in a single parameter.

    Can be found in the response of this API, the TikTok Ads Library Advertiser Search API and the TikTok Ads Library Ad Details API. Recommended over advertiser_id, since the TikTok Ads Library needs both the ID and the name to filter ads correctly.

  • Name
    advertiser_id
    Required
    Optional
    Description

    Filters ads by an advertiser. Must be passed alongside the advertiser's name via the q parameter, otherwise the TikTok Ads Library returns unrelated ads. Prefer advertiser_token, which bundles both into one parameter.

    Can be found in the response of this API, the TikTok Ads Library Advertiser Search API and the TikTok Ads Library Ad Details API.

Localization

Filters

  • Name
    time_period
    Required
    Optional
    Description

    Specifies the date range for ads. Use the format YYYY-MM-DD..YYYY-MM-DD to define a custom date range.

    If not specified, defaults to the last year from the current date.

  • Name
    sort_by
    Required
    Optional
    Description

    Specifies the sorting order for ads. Supported values:

    • 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
    If not specified, defaults to last_shown_date_newest_to_oldest.

Pagination

  • Name
    next_page_token
    Required
    Optional
    Description

    A token for fetching the next set of results. You can obtain this token from the next_page_token field in the previous response

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to tiktok_ads_library.

API key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

Zero Data Retention

  • Name
    zero_retention
    Enterprise Only
    Enterprise Only
    Required
    Optional
    Description

    Set this parameter to true to disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.

API Examples

Full Response using q parameter

Full Response using <code>q</code> parameter
GET
https://www.searchapi.org/api/v1/search?engine=tiktok_ads_library&q=apple
Request
import requests

url = "https://www.searchapi.org/api/v1/search"
params = {
  "engine": "tiktok_ads_library",
  "q": "apple"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_BxR6dazVoAVkFbb3Ewvbj9GY",
    "status": "Success",
    "created_at": "2026-09-03T12:12:14Z",
    "request_time_taken": 5.24,
    "parsing_time_taken": 0.07,
    "total_time_taken": 5.31,
    "request_url": "https://library.tiktok.com/ads?region=all&start_time=1756872000000&end_time=1788408000000&sort_type=last_shown_date%2Cdesc&adv_name=apple&adv_biz_ids=&query_type=1",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_BxR6dazVoAVkFbb3Ewvbj9GY.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_BxR6dazVoAVkFbb3Ewvbj9GY"
  },
  "search_parameters": {
    "engine": "tiktok_ads_library",
    "q": "apple",
    "country": "all",
    "time_period": "2025-09-03..2026-09-03",
    "sort_by": "last_shown_date_newest_to_oldest"
  },
  "search_information": {
    "total_results": 5000
  },
  "ads": [
    {
      "position": 1,
      "id": "1851293308357857",
      "title": "Списанная Техника Apple Бесплатно",
      "format": "video",
      "is_unavailable": true,
      "first_shown_datetime": "2025-12-11T19:00:00-05:00",
      "last_shown_datetime": "2025-12-11T19:00:00-05:00",
      "estimated_audience": "0-1K",
      "estimated_audience_min": 0,
      "estimated_audience_max": 1000,
      "rejection_info": {
        "reasons": [
          "Our review shows that your advertising content may violate TikTok's advertising policies by promoting misleading employment or money-making opportunities. This may include unclear job or opportunity descriptions, misleading language about qualification requirements, or instructions for users to communicate outside the platform",
          ...
        ],
        "affected_regions": [
          "DE",
          ...
        ],
        "reporting_source": "We proactively enforce our Advertising Policies through a mix of technology and human moderation. We have detected this policy violation using automated measures.",
        "automated_notice": "we have used automated measures in making this decision.",
        "hit_illegal_content_reason": 0
      }
    },
    ...
  ],
  "pagination": {
    "next_page_token": "eyJzZWFyY2hfaWQiOiJleUpzWVhOMFgzTnZjblFpT2xzeU55NHdOak13T0RRc01UYzFPREkwTURBd01EQXdNRjBzSW01bGVIUmZZM1Z5YzI5eUlqb3hNbjA9Iiwib2Zmc2V0IjoxfQ=="
  }
}

Full Response using advertiser_token parameter

Full Response using <code>advertiser_token</code> parameter
GET
https://www.searchapi.org/api/v1/search?advertiser_token=eyJpZCI6IjY5NTI0MjM2NzE4NTE5MDk4ODkiLCJuYW1lIjoiTElETCBST01BTklBIFNSTCJ9&engine=tiktok_ads_library
Request
import requests

url = "https://www.searchapi.org/api/v1/search"
params = {
  "engine": "tiktok_ads_library",
  "advertiser_token": "eyJpZCI6IjY5NTI0MjM2NzE4NTE5MDk4ODkiLCJuYW1lIjoiTElETCBST01BTklBIFNSTCJ9"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_Rz4KNQmOp60YHvYoyWl8DBvr",
    "status": "Success",
    "created_at": "2026-09-03T12:12:19Z",
    "request_time_taken": 3.92,
    "parsing_time_taken": 0.0,
    "total_time_taken": 3.92,
    "request_url": "https://library.tiktok.com/ads?region=all&start_time=1756872000000&end_time=1788408000000&sort_type=last_shown_date%2Cdesc&adv_name=LIDL+ROMANIA+SRL&adv_biz_ids=6952423671851909889&query_type=2",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_Rz4KNQmOp60YHvYoyWl8DBvr.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_Rz4KNQmOp60YHvYoyWl8DBvr"
  },
  "search_parameters": {
    "engine": "tiktok_ads_library",
    "advertiser_token": "eyJpZCI6IjY5NTI0MjM2NzE4NTE5MDk4ODkiLCJuYW1lIjoiTElETCBST01BTklBIFNSTCJ9",
    "country": "all",
    "time_period": "2025-09-03..2026-09-03",
    "sort_by": "last_shown_date_newest_to_oldest"
  },
  "search_information": {
    "total_results": 1122
  },
  "ads": [
    {
      "position": 1,
      "id": "1875196624813153",
      "advertiser_id": "6952423671851909889",
      "advertiser": "LIDL ROMANIA SRL",
      "advertiser_token": "eyJpZCI6IjY5NTI0MjM2NzE4NTE5MDk4ODkiLCJuYW1lIjoiTElETCBST01BTklBIFNSTCJ9",
      "format": "video",
      "first_shown_datetime": "2026-09-01T20:00:00-04:00",
      "last_shown_datetime": "2026-09-01T20:00:00-04:00",
      "video_link": "https://library.tiktok.com/api/v1/cdn/1788437543/video/aHR0cHM6Ly92NzcudGlrdG9rY2RuLmNvbS83N2Y3NzljMDgxNGJmNWVkZGIwZWFjOWU4YzA0Y2NiYi82YTk5YjhjYS92aWRlby90b3Mvbm8xYS90b3Mtbm8xYS12ZS0wMDY4YzAwMS1uby9vZ0lmV0Z2RkFNZFI5RG96RW9iRklHZ0JPRkVFbHFRa2dRQlZJZi8=/350a5e36-184d-43b8-98c8-32d4d8b25ad5?a=475769&bt=1027&btag=e00090000&bti=PDU2NmYwMy86&ft=.NpOcInz7ThdkYLGXq8Zmo&l=2026090320122342DDAB0F9164732AF07E&mime_type=video_mp4&rc=Omk5NTlmNzVmNWk8Zjg5ZEBpM204cW45cmxwZDMzbzczNUBhYzQwLjUzNl4xL2FiXjZfYSNob2wuMmQ0a15hLS1kMTFzcw%3D%3D&signature=pQbIcXk6lQ3uydoobTrWQFliM3gl8%2BK50kKobLXXVsQ%3D&vvpl=1",
      "cover_image": "https://p16-common-sign.tiktokcdn.com/tos-no1a-p-0037-no/oMGGeLWKFeResQVNVq46AQQqfrQRQ77CGa2nIA~tplv-noop.image?dr=18692&refresh_token=ef100804&x-expires=1788459210&x-signature=j3YBD%2FRwZjQT0DaeBEoKF1yvXbo%3D&t=9276707c&ps=14f1eb3e&shp=9e36835a&shcp=0c75dd76&idc=sg1&VideoID=v24044gl0000daamni7og65k1no5rjk0",
      "estimated_audience": "10K-100K",
      "estimated_audience_min": 10000,
      "estimated_audience_max": 100000
    },
    ...
  ],
  "pagination": {
    "next_page_token": "eyJzZWFyY2hfaWQiOiJleUpzWVhOMFgzTnZjblFpT2xzeE56ZzRNekEzTWpBd01EQXdYU3dpYm1WNGRGOWpkWEp6YjNJaU9qRXlmUT09Iiwib2Zmc2V0IjoxfQ=="
  }
}
Image and Carousel Ads
GET
https://www.searchapi.org/api/v1/search?country=FR&engine=tiktok_ads_library&q=shop
Request
import requests

url = "https://www.searchapi.org/api/v1/search"
params = {
  "engine": "tiktok_ads_library",
  "q": "shop",
  "country": "FR"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_6QNVPZBKo24jcAyp8y471M9O",
    "status": "Success",
    "created_at": "2026-09-03T04:28:28Z",
    "request_time_taken": 3.1,
    "parsing_time_taken": 0.0,
    "total_time_taken": 3.1,
    "request_url": "https://library.tiktok.com/ads?region=FR&start_time=1756872000000&end_time=1788408000000&sort_type=last_shown_date%2Cdesc&adv_name=shop&adv_biz_ids=&query_type=1",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_6QNVPZBKo24jcAyp8y471M9O.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_6QNVPZBKo24jcAyp8y471M9O"
  },
  "search_parameters": {
    "engine": "tiktok_ads_library",
    "q": "shop",
    "country": "FR",
    "time_period": "2025-09-03..2026-09-03",
    "sort_by": "last_shown_date_newest_to_oldest"
  },
  "search_information": {
    "total_results": 5000
  },
  "ads": [
    {
      "position": 1,
      "id": "1873269306091889",
      "advertiser": "ELEGANCIA SHOP",
      "title": "Shop deals now",
      "format": "image",
      "first_shown_datetime": "2026-08-11T20:00:00-04:00",
      "last_shown_datetime": "2026-08-12T20:00:00-04:00",
      "image_urls": [
        "https://p16-common-sign.tiktokcdn.com/tos-no1a-i-t5fjg24jzw-no/9b66b81e0ff445d4875cdf9f08c59ecb~tplv-tiktokx-origin.jpeg?dr=14582&refresh_token=28177010&x-expires=1788429600&x-signature=v%2BzzOqW%2Fe8TNeuTemkpzhcxLY%2BE%3D&t=4d5b0474&ps=13740610&shp=0c75dd76&shcp=9b759fb9&idc=sg1",
        ...
      ],
      "estimated_audience": "0-1K",
      "estimated_audience_min": 0,
      "estimated_audience_max": 1000
    },
    ...
  ],
  "pagination": {
    "next_page_token": "eyJzZWFyY2hfaWQiOiJleUpzWVhOMFgzTnZjblFpT2xzeE55NDNOemcxTnpRc01UYzJNalUyTURBd01EQXdNRjBzSW01bGVIUmZZM1Z5YzI5eUlqb3hNbjA9Iiwib2Zmc2V0IjoxfQ=="
  }
}