TikTok Ad Library ad details API
One ad from TikTok's European Ads Library: the creative, the advertiser.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
Business id, registry country and the targeting with impressions by region, age and gender, as the library shows them.
You send one of id or url.
Request
Send your key in the x-api-key header.
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,
timeout=60,
)
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": {}
}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=...). |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"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...",
"video_url": "https://library.tiktok.com/api/v1/cdn/1793325957/video/aHR0cHM6Ly92NzcudGlrdG9rY2RuLmNvbS9hNWZiNTFhNzg4ZDJmNWVkMjYxNjU1MTVlOGQ2ODU3NS82YWU0NGZmMC92aWRlby90b3...",
"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..."
],
"width": null,
"height": null
},
"regions": null,
"publisher_platforms": null,
"impressions": {
"lower": 1000,
"upper": 10000,
"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
}
},
"cursor": null,
"has_more": null
}Fields
One Ad in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "ad" | ||
platform | Platform | yes | the ad library's platform |
id | string | yes | |
url | string or null | ||
advertiser | Advertiser or null | ||
status | "active" or "inactive" or "unknown" | ||
started_at | string (ISO 8601 date-time) or null | ||
ended_at | string (ISO 8601 date-time) or null | ||
title | string or null | ||
body | string or null | ||
cta_text | string or null | ||
landing_url | string or null | ||
format | string or null | "image" | "video" | "carousel" | "text" | platform-specific | |
media | Media |
Show the other 5 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
Is there an SDK call for it?
The preview Python client has client.tiktok.ad_library_ad(...) and the TypeScript client client.tiktok.adLibraryAd(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.