TikTok Ad Library ad details API

One ad from TikTok's European Ads Library: the creative, the advertiser.

GETapi.socialscrape.io/v1/tiktok/ad-library/ad
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
curl -G "https://api.socialscrape.io/v1/tiktok/ad-library/ad" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode 'id=1879687389944914'
Python
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"])
TypeScript
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);
}
n8n
{
  "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

NameTypeRequiredDescription
idstringone ofAd id in the library. Also accepted as ad_id, adId.
urlurlone ofAd 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.

Status 200Sample
{
  "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.

FieldTypeAlwaysNotes
object"ad"
platformPlatformyesthe ad library's platform
idstringyes
urlstring or null
advertiserAdvertiser or null
status"active" or "inactive" or "unknown"
started_atstring (ISO 8601 date-time) or null
ended_atstring (ISO 8601 date-time) or null
titlestring or null
bodystring or null
cta_textstring or null
landing_urlstring or null
formatstring or null"image" | "video" | "carousel" | "text" | platform-specific
mediaMedia
Show the other 5 fields
FieldTypeAlwaysNotes
regionsstring[] or null
publisher_platformsstring[] or nullwhere it ran: facebook, instagram, ...
impressionsRange or null
spendRange or null
extraobject or null

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.

Build on social data early.

Developers and agent builders get the first keys.

Get early access