TikTok Ad Library ad details API
One ad from TikTok's European Ads Library: the creative, the advertiser (business id, registry country) and the targeting with impressions by region, ag...
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
- 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).
1curl -G "https://api.socialscrape.dev/v1/tiktok/ad-library/ad" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode "id=1879687389944914"1import os2import requests34params = {5 "id": "1879687389944914",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/tiktok/ad-library/ad",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11)12body = res.json()1314if body["ok"]:15 print(body["data"])16else:17 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/tiktok/ad-library/ad");2url.search = new URLSearchParams({3 "id": "1879687389944914"4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape TikTok Ad Library ad details",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/tiktok/ad-library/ad",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "id",19 "value": "1879687389944914"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_3459c1698f912ff48eaffd66",8 "data": {9 "object": "ad",10 "platform": "tiktok",11 "id": "1879687389944914",12 "url": "https://library.tiktok.com/ads/detail/?ad_id=1879687389944914",13 "advertiser": {14 "object": "advertiser",15 "platform": "tiktok",16 "id": "6876453732930814722",17 "name": "GYMSHARK LTD",18 "url": null,19 "page_id": null,20 "country": null,21 "verified": null,22 "ad_count": null,23 "extra": null24 },25 "status": "unknown",26 "started_at": "2026-10-21T00:00:00Z",27 "ended_at": null,28 "title": null,29 "body": null,30 "cta_text": null,31 "landing_url": null,32 "format": "video",33 "media": {34 "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...",35 "video_url": "https://library.tiktok.com/api/v1/cdn/1793325957/video/aHR0cHM6Ly92NzcudGlrdG9rY2RuLmNvbS9hNWZiNTFhNzg4ZDJmNWVkMjYxNjU1MTVlOGQ2ODU3NS82YWU0NGZmMC92aWRlby90b3MvdXNlYXN0MmEvdG9zLXVzZWFzdDJhLXZlLTAwNTFjNzk5LWV1dHRwL29jeEluOEFZcEZlVjhmNHZnZWp2V...",36 "audio_url": null,37 "image_urls": [38 "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..."39 ],40 "width": null,41 "height": null42 },43 "regions": null,44 "publisher_platforms": null,45 "impressions": {46 "lower": 1000.0,47 "upper": 10000.0,48 "currency": null49 },50 "spend": null,51 "extra": {52 "advertiser_registry_location": "United Kingdom",53 "audit_status": "1",54 "estimated_audience": "1K-10K",55 "impression": 0,56 "last_shown_at": "2026-10-28T00:00:00Z",57 "show_mode": 1,58 "sor_audit_status": "1",59 "sponsor": "GYMSHARK LTD",60 "targeting": {61 "age": [62 {63 "13-17": false,64 "18-24": true,65 "25-34": true,66 "35-44": false,67 "45-54": false,68 "55+": false,69 "region": "GB"70 }71 ],72 "audience": "No",73 "gender": [74 {75 "female": true,76 "male": false,77 "region": "GB",78 "unknown": false79 }80 ],81 "location": {82 "data": [83 {84 "breakdowns": [],85 "impressions": "4K",86 "region": "GB"87 }88 ],89 "total_impressions": "1K-10K",90 "total_region": 191 },92 "target_audience_size": "7.1M-8.7M"93 }94 }95 },96 "cursor": null,97 "has_more": null98}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:
1{2 "ok": false,3 "error": {4 "code": "not_found",5 "message": "The platform says this profile, post or item does not exist.",6 "retryable": false7 },8 "credits_charged": 0,9 "request_id": "req_b5122697bfb1f6fce3d04c09"10}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)