curl --request POST \
--url https://app.sideshift.app/api/v1/scrape/tiktok/ads \
--header 'Content-Type: application/json' \
--data '
{
"country_code": "US",
"period": 7
}
'import requests
url = "https://app.sideshift.app/api/v1/scrape/tiktok/ads"
payload = {
"country_code": "US",
"period": 7
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({country_code: 'US', period: 7})
};
fetch('https://app.sideshift.app/api/v1/scrape/tiktok/ads', 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://app.sideshift.app/api/v1/scrape/tiktok/ads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country_code' => 'US',
'period' => 7
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sideshift.app/api/v1/scrape/tiktok/ads"
payload := strings.NewReader("{\n \"country_code\": \"US\",\n \"period\": 7\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sideshift.app/api/v1/scrape/tiktok/ads")
.header("Content-Type", "application/json")
.body("{\n \"country_code\": \"US\",\n \"period\": 7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/v1/scrape/tiktok/ads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"country_code\": \"US\",\n \"period\": 7\n}"
response = http.request(request)
puts response.read_body{
"data": {
"cursor": null,
"has_more": false,
"page": 1,
"page_size": 20,
"total": 20,
"ads": [
{
"ad_id": "7668163246391033864",
"brand_name": null,
"comment_count": null,
"cost_level": 0,
"countries": null,
"ctr": 0.93,
"has_summary": null,
"has_voice_over": null,
"highlight_text": null,
"industry_key": "label_23116000000",
"is_search_ad": true,
"keywords": null,
"landing_page": null,
"like_count": 978,
"objective_key": "campaign_objective_reach",
"objectives": null,
"share_count": null,
"source": null,
"source_key": null,
"title": "Yas Nomura | My Ultimate Live Guitar | Donner Live Asia Tour 🎸Learn more about HLX-500 Headless Guitar:https://www.donnermusic.com/en-US/buy/8669872324746 -------------------------------------- 🎸CREATE THE MOMENT #yasnomura #DonnerLive #donnerliveasiatour #donnerlivejapan…",
"video": {
"cover_url": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-37c799-sg/ocxiAUIW5AAUzt4gBEmulG9JPUFnqlqBEqali~tplv-noop.image",
"duration_seconds": 93.376,
"height": 1024,
"video_id": "v12025gd0000d9lb757og65pl1ih8m20",
"video_link": "https://v16m-default.tiktokcdn.com/f403a79d2c5c86547c4dc598a7ca6437/6a76baff/video/tos/alisg/tos-alisg-ve-37c799-sg/oAA4RoEiUUm5tIRCAzElaqiQBqFoGEWUilPgq/",
"width": 576,
"video_links_by_quality": {
"720p": "https://v16m-default.tiktokcdn.com/f403a79d2c5c86547c4dc598a7ca6437/6a76baff/video/tos/alisg/tos-alisg-ve-37c799-sg/oAA4RoEiUUm5tIRCAzElaqiQBqFoGEWUilPgq/"
}
}
}
]
},
"request_id": "req_8f3c9a2b1d4e6f70",
"upstream_calls": 1,
"meta": {
"credits_charged": 1,
"credits_remaining": 9998
}
}{
"error": "INVALID_INPUT",
"message": "Invalid request body.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UNAUTHORIZED",
"message": "Invalid scraper API key.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INSUFFICIENT_SCRAPER_CREDITS",
"message": "Insufficient scraper credits.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "RESOURCE_NOT_FOUND",
"message": "Requested resource not found or unavailable.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "PAYLOAD_TOO_LARGE",
"message": "Request body must be 32KB or smaller.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "SCRAPER_RATE_LIMITED",
"message": "Scraper API rate limit exceeded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INTERNAL_ERROR",
"message": "Request failed. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_ERROR",
"message": "Data source failed. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_TIMEOUT",
"message": "Data source timed out. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}TikTok’s Top Ads library — the best-performing public ads. Platform field names are preserved inside data. Billing: 1 SideShift credit per completed lookup.
curl --request POST \
--url https://app.sideshift.app/api/v1/scrape/tiktok/ads \
--header 'Content-Type: application/json' \
--data '
{
"country_code": "US",
"period": 7
}
'import requests
url = "https://app.sideshift.app/api/v1/scrape/tiktok/ads"
payload = {
"country_code": "US",
"period": 7
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({country_code: 'US', period: 7})
};
fetch('https://app.sideshift.app/api/v1/scrape/tiktok/ads', 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://app.sideshift.app/api/v1/scrape/tiktok/ads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country_code' => 'US',
'period' => 7
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sideshift.app/api/v1/scrape/tiktok/ads"
payload := strings.NewReader("{\n \"country_code\": \"US\",\n \"period\": 7\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sideshift.app/api/v1/scrape/tiktok/ads")
.header("Content-Type", "application/json")
.body("{\n \"country_code\": \"US\",\n \"period\": 7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/v1/scrape/tiktok/ads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"country_code\": \"US\",\n \"period\": 7\n}"
response = http.request(request)
puts response.read_body{
"data": {
"cursor": null,
"has_more": false,
"page": 1,
"page_size": 20,
"total": 20,
"ads": [
{
"ad_id": "7668163246391033864",
"brand_name": null,
"comment_count": null,
"cost_level": 0,
"countries": null,
"ctr": 0.93,
"has_summary": null,
"has_voice_over": null,
"highlight_text": null,
"industry_key": "label_23116000000",
"is_search_ad": true,
"keywords": null,
"landing_page": null,
"like_count": 978,
"objective_key": "campaign_objective_reach",
"objectives": null,
"share_count": null,
"source": null,
"source_key": null,
"title": "Yas Nomura | My Ultimate Live Guitar | Donner Live Asia Tour 🎸Learn more about HLX-500 Headless Guitar:https://www.donnermusic.com/en-US/buy/8669872324746 -------------------------------------- 🎸CREATE THE MOMENT #yasnomura #DonnerLive #donnerliveasiatour #donnerlivejapan…",
"video": {
"cover_url": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-37c799-sg/ocxiAUIW5AAUzt4gBEmulG9JPUFnqlqBEqali~tplv-noop.image",
"duration_seconds": 93.376,
"height": 1024,
"video_id": "v12025gd0000d9lb757og65pl1ih8m20",
"video_link": "https://v16m-default.tiktokcdn.com/f403a79d2c5c86547c4dc598a7ca6437/6a76baff/video/tos/alisg/tos-alisg-ve-37c799-sg/oAA4RoEiUUm5tIRCAzElaqiQBqFoGEWUilPgq/",
"width": 576,
"video_links_by_quality": {
"720p": "https://v16m-default.tiktokcdn.com/f403a79d2c5c86547c4dc598a7ca6437/6a76baff/video/tos/alisg/tos-alisg-ve-37c799-sg/oAA4RoEiUUm5tIRCAzElaqiQBqFoGEWUilPgq/"
}
}
}
]
},
"request_id": "req_8f3c9a2b1d4e6f70",
"upstream_calls": 1,
"meta": {
"credits_charged": 1,
"credits_remaining": 9998
}
}{
"error": "INVALID_INPUT",
"message": "Invalid request body.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UNAUTHORIZED",
"message": "Invalid scraper API key.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INSUFFICIENT_SCRAPER_CREDITS",
"message": "Insufficient scraper credits.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "RESOURCE_NOT_FOUND",
"message": "Requested resource not found or unavailable.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "PAYLOAD_TOO_LARGE",
"message": "Request body must be 32KB or smaller.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "SCRAPER_RATE_LIMITED",
"message": "Scraper API rate limit exceeded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INTERNAL_ERROR",
"message": "Request failed. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_ERROR",
"message": "Data source failed. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_TIMEOUT",
"message": "Data source timed out. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}Body
1-indexed result page
Pagination cursor — echo back the cursor from the previous response. Omit it for the first page.. Equivalent to page (this library pages by number); when both are sent, cursor wins.
Ads per page (max 20; higher values are silently clamped)
Look-back window in days: 7, 30 or 180
Comma-separated ISO-2 markets (e.g. 'US,CA')
Comma-separated language codes (e.g. 'en,de')
Ranking metric: 'impression' (reach), 'ctr', 'like', 'cvr', 'play_6s_rate', 'play_2s_rate'
Comma-separated industry codes (e.g. '28000000000,24000000000')
'1' Spark Ads, '2' non-Spark Ads
Comma-separated campaign objectives: 1 traffic, 2 app installs, 3 conversions, 4 video views, 5 reach, 8 lead generation, 15 product sales
Like percentile band: '1' top 1–20%, '2' 21–40%, '3' 41–60%, '4' 61–80%, '5' 81–100%
Free-text keyword to search the ads library
Response
Completed lookup. 1 SideShift credit.
TikTok platform data payload. Field names and nesting are preserved.
Show child attributes
Show child attributes
SideShift request id. Include it in support requests.
Number of data-source lookups performed.
1 Per-request credit accounting (also surfaced in the X-Scraper-Credits-* response headers).
Show child attributes
Show child attributes