Search the TikTok Ad Library
curl --request GET \
--url https://scrapebadger.com/v1/tiktok/ads/search \
--header 'x-api-key: <api-key>'import requests
url = "https://scrapebadger.com/v1/tiktok/ads/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/tiktok/ads/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/tiktok/ads/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/tiktok/ads/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/tiktok/ads/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/tiktok/ads/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ads": [
{
"id": "172000000000000",
"name": "Acme GmbH",
"audit_status": "approved",
"type": "video",
"first_shown_date": 1699999999000,
"last_shown_date": 1700999999000,
"videos": [
{
"video_url": "https://library.tiktok.com/ad-video.mp4",
"cover_img": "https://library.tiktok.com/ad-cover.jpeg"
}
]
}
],
"pagination": {
"has_more": true,
"total": 240,
"search_id": "20231114...",
"offset": 0
},
"region": "DE"
}Ads
Search the Ad Library
Search TikTok’s EU Commercial Content (ad transparency) Library by keyword or advertiser id.
GET
/
v1
/
tiktok
/
ads
/
search
Search the TikTok Ad Library
curl --request GET \
--url https://scrapebadger.com/v1/tiktok/ads/search \
--header 'x-api-key: <api-key>'import requests
url = "https://scrapebadger.com/v1/tiktok/ads/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/tiktok/ads/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/tiktok/ads/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/tiktok/ads/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/tiktok/ads/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/tiktok/ads/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ads": [
{
"id": "172000000000000",
"name": "Acme GmbH",
"audit_status": "approved",
"type": "video",
"first_shown_date": 1699999999000,
"last_shown_date": 1700999999000,
"videos": [
{
"video_url": "https://library.tiktok.com/ad-video.mp4",
"cover_img": "https://library.tiktok.com/ad-cover.jpeg"
}
]
}
],
"pagination": {
"has_more": true,
"total": 240,
"search_id": "20231114...",
"offset": 0
},
"region": "DE"
}The TikTok Ad Library is EU-only (EU Digital Services Act ad transparency). Use an EU
region such as DE, FR, IE, or NL. Pass advertiser_id to scope to a single advertiser, or query for a keyword search.Each request costs 5 credits. Failed requests are not charged.
Authorizations
Query Parameters
Keyword to search ads by. Ignored when advertiser_id is set.
Advertiser business id(s) to scope the search to a specific advertiser.
EU region code — the Ad Library is EU-only (e.g. DE, FR, IE, NL).
Look-back window in days for ads shown.
Required range:
1 <= x <= 365Sort order, ',' (e.g. last_shown_date,desc).
Result offset for pagination.
Required range:
x >= 0Opaque search id from a prior page's pagination.search_id, to chain pages.
Maximum number of items to return (1-50).
Required range:
1 <= x <= 50
