TikTok Ad Library ad details API
  1. Docs
  2. TikTok
  3. TikTok Ad Library ad details API

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_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
idstringone ofAd id in the library. Also accepted as ad_id, adId.
urlURLone ofAd 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: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • 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"

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

200 OKSample response
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.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
unsupported_url400noThe URL is not one this endpoint accepts (wrong platform or form).
not_found404noThe 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}