TikTok Ad Library ad details
Beta GET /v1/tiktok/ad-library/ad
GET /v1/tiktok/ad-library/ad
One ad from TikTok's European Ads Library: the creative, the advertiser (business id, registry country) and the targeting with impressions by region, age and gender, as the library shows them.
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
id | string | one of | Ad id in the library. Also accepted as ad_id, adId. |
url | URL | one of | Ad URL (library.tiktok.com/ads/detail/?ad_id=...). Accepted hosts: library.tiktok.com, tiktok.com. |
Send at least one of id, url. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl -G "https://api.socialscrape.io/v1/tiktok/ad-library/ad" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "id=1879687389944914"import os
import requests
params = {
"id": "1879687389944914",
}
res = requests.get(
"https://api.socialscrape.io/v1/tiktok/ad-library/ad",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/tiktok/ad-library/ad");
url.search = new URLSearchParams({
"id": "1879687389944914"
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape TikTok Ad Library ad details",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/tiktok/ad-library/ad",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "id",
"value": "1879687389944914"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_3459c1698f912ff48eaffd66",
"data": {
"object": "ad",
"platform": "tiktok",
"id": "1879687389944914",
"url": "https://library.tiktok.com/ads/detail/?ad_id=1879687389944914",
"advertiser": {
"object": "advertiser",
"platform": "tiktok",
"id": "6876453732930814722",
"name": "GYMSHARK LTD",
"url": null,
"page_id": null,
"country": null,
"verified": null,
"ad_count": null,
"extra": null
},
"status": "unknown",
"started_at": "2026-10-21T00:00:00Z",
"ended_at": null,
"title": null,
"body": null,
"cta_text": null,
"landing_url": null,
"format": "video",
"media": {
"thumbnail_url": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/oEmm9Mihr4XDjgoIB65BvIwEBfAhiAAHPA11FI~tplv-tiktokx-origin.jpeg?dr=14582&refresh_token=b88f0181&x-expires=1793347200&x-signature=P4xxeIHW0DvN6tY7p6w6zsjhlTQ%3D&t=4d5b0474&ps=1374...",
"video_url": "https://library.tiktok.com/api/v1/cdn/1793325957/video/aHR0cHM6Ly92NzcudGlrdG9rY2RuLmNvbS9hNWZiNTFhNzg4ZDJmNWVkMjYxNjU1MTVlOGQ2ODU3NS82YWU0NGZmMC92aWRlby90b3MvdXNlYXN0MmEvdG9zLXVzZWFzdDJhLXZlLTAwNTFjNzk5LWV1dHRwL29jeEluOEFZcEZlVjhmNHZnZWp2V...",
"audio_url": null,
"image_urls": [
"https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/oEmm9Mihr4XDjgoIB65BvIwEBfAhiAAHPA11FI~tplv-tiktokx-origin.jpeg?dr=14582&refresh_token=b88f0181&x-expires=1793347200&x-signature=P4xxeIHW0DvN6tY7p6w6zsjhlTQ%3D&t=4d5b0474&ps=1374..."
],
"width": null,
"height": null
},
"regions": null,
"publisher_platforms": null,
"impressions": {
"lower": 1000.0,
"upper": 10000.0,
"currency": null
},
"spend": null,
"extra": {
"advertiser_registry_location": "United Kingdom",
"audit_status": "1",
"estimated_audience": "1K-10K",
"impression": 0,
"last_shown_at": "2026-10-28T00:00:00Z",
"show_mode": 1,
"sor_audit_status": "1",
"sponsor": "GYMSHARK LTD",
"targeting": {
"age": [
{
"13-17": false,
"18-24": true,
"25-34": true,
"35-44": false,
"45-54": false,
"55+": false,
"region": "GB"
}
],
"audience": "No",
"gender": [
{
"female": true,
"male": false,
"region": "GB",
"unknown": false
}
],
"location": {
"data": [
{
"breakdowns": [],
"impressions": "4K",
"region": "GB"
}
],
"total_impressions": "1K-10K",
"total_region": 1
},
"target_audience_size": "7.1M-8.7M"
}
}
},
"cursor": null,
"has_more": null
}Response#
A Ad object in data.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Example error:
{
"ok": false,
"error": {
"code": "not_found",
"message": "The platform says this profile, post or item does not exist.",
"retryable": false
},
"credits_charged": 0,
"request_id": "req_b5122697bfb1f6fce3d04c09"
}Related endpoints#
- TikTok profile (
GET /v1/tiktok/profile) - TikTok profile videos (
GET /v1/tiktok/profile/videos) - TikTok collection videos (
GET /v1/tiktok/collection/videos) - TikTok video details (
GET /v1/tiktok/video) - TikTok video transcript (
GET /v1/tiktok/video/transcript) - TikTok video comments (
GET /v1/tiktok/video/comments) - TikTok comment replies (
GET /v1/tiktok/video/comment/replies) - TikTok user search (
GET /v1/tiktok/search/users)