TikTok Ad Library
GET /v1/ad-library/tiktok/ad-details

TikTok Ad Details API

One TikTok Commercial Content Library ad by ID — calendar-day dates, always 2 credits.

2 credits per request
TL;DR
One TikTok Commercial Content Library ad by ID — calendar-day dates, always 2 credits. The TikTok Ad Details API (TikTok Ad Library) is a single authenticated GET request to /v1/ad-library/tiktok/ad-details that responds with clean JSON and costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.

What is the TikTok Ad Details API?

Paste a TikTok Ad Library URL or ad ID and get that creative as clean JSON with the same uniform key set as /tiktok/search (null when withheld) plus calendar-day YYYY-MM-DD firstShown/lastShown (search omits those). platform=tiktok, library=dsa, media[] objects {url,type,expiresAt} — expiresAt is x-expires / VExpiration / expire= to the second, or null when the URL is unsigned (never midnight-of-fetch). impressions from Unique users seen when disclosed, spend only when shipped. advertiser is always {id,name,url,logo,location} — name is a human label, never a bare numeric id. Always 2 credits on success — native and Apify fallback share one price (no 2-vs-5 surprise). Response includes fetchPath: "native" | "fallback" so you can see which path ran. Default country GB (EU-led library).

What you get

  • ID lookup with search-parity fields (including impressions)
  • Uniform null keys + advertiser{id,name,url,logo,location}
  • Calendar-day YYYY-MM-DD firstShown / lastShown
  • Always 2 credits; fetchPath native|fallback

Try it

Open in Playground

Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).

Parameters

Sign in to run live
curl "https://api.captapi.com/v1/ad-library/tiktok/ad-details?url=https%3A%2F%2Flibrary.tiktok.com%2Fads%2Fdetail%2F%3Fad_id%3D1872034324356433" \
  -H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."

Edit the parameters and the code updates instantly. Switch languages and hit copy.

Example response

{
  "success": true,
  "data": {
    "platform": "tiktok_ad_library",
    "id": "1872034324356433",
    "url": "https://library.tiktok.com/ads/detail/?ad_id=1872034324356433",
    "text": "#gandurilemele #foryoupage❤️❤️ Buna dimineața tuturor!Zi binecuvântata tuturor!🙏🙏🙏",
    "adFormat": "video",
    "firstShown": "07/29/2026",
    "lastShown": "07/29/2026",
    "advertiser": {
      "name": "alyalina535"
    },
    "media": [
      "https://library.tiktok.com/api/v1/cdn/1785356384/video/aHR0cHM6Ly92NzcudGlrdG9rY2RuLmNvbS8zYTU3ZmRiZjYzZGIzYjY5Nzc1NzA5ZjQ0ZTMwOGZkNC82YTZhYjUwZS92aWRlby90b3MvdXNlYXN0MmEvdG9zLXVzZWFzdDJhLXZlLTAwNjgtZXV0dHAvbzRJMXRCVHdBNUVFNlEzMW01emlpY1NNSUE0ZjlLQW53b0JMQ2sv/7467d396-0387-4b9f-90c7-2d2cd26db171?a=475769&bt=1049&btag=e00090000&bti=PDU2NmYwMy86&ft=.NpOcInz7ThRcbuGXq8Zmo&l=20260730041944142876664F10EA1EB193&mime_type=video_mp4&rc=NWZoZWU8ZDM6NDU3OGk6ZEBpM3Q0aHM5cjxsPDMzZjczNUA2YWM2MF9eXmExMWBeYDFgYSNnMjNmMmRzcGdhLS1kMTNzcw%3D%3D&signature=Qzo7c7UEa5N40yYL1KKsuy%2BR%2BCnqSwFptCMo9QOZPtQ%3D&vvpl=1"
    ]
  }
}

Billing metadata is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.

Response structure

A successful call returns success and a data object with the following fields:

Top-level fields

  • platformPlatform identifier for this response (matches the endpoint's platform).
  • idStable platform ID for the item.
  • urlCanonical URL of the item.
  • textText content.
  • adFormatFormat of the ad creative.
  • firstShownCalendar day the ad was first shown (YYYY-MM-DD). TikTok publishes day granularity — not a UTC midnight instant and not MM/DD/YYYY.
  • lastShownCalendar day the ad was last shown (YYYY-MM-DD). Same day-granularity rule as firstShown.
  • mediaArray of {url, type, expiresAt}. expiresAt is a signed-CDN parse (x-expires / VExpiration / expire=) to the second, or null when the URL has no expiry param. The /api/v1/cdn/{unix}/ path segment is not an expiry. width/height/durationSeconds are omitted — TikTok DSA has not been observed to publish them.

Advertiser

The advertiser object contains:

  • nameName of this advertiser item.

Parameters

NameTypeRequiredDescription
urlstringYesTikTok Ad Library URL or ad ID. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble.
countrystringNoTwo-letter ISO country code. Default GB.
cachebooleanNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.

Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh.

Using an AI agent? This endpoint is the MCP tool tiktok_ad_library_ad_details via @captapi/mcp. Set it up →

How it works

  1. 1. Sign up — get 100 free credits, no card required.
  2. 2. Create a key from your dashboard.
  3. 3. Send one request to /v1/ad-library/tiktok/ad-details and parse the JSON response.

Use cases

Analytics

Track views, likes, and engagement over time.

Competitor Monitoring

Benchmark the performance of other creators.

Dashboards

Power reporting and BI with real metadata.

Content Curation

Filter and rank videos by performance.

Frequently asked questions

What does the TikTok Ad Details API do?+

The TikTok Ad Details API lets you fetch full metadata and key stats from a public TikTok Ad Library ad using one GET request to /v1/ad-library/tiktok/ad-details. It returns clean JSON — no OAuth or infrastructure setup required.

How many credits does the TikTok Ad Details API cost?+

Each successful call costs 2 credits. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.

Do I need a TikTok Ad Library API key or OAuth?+

No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.

Why was expiresAt already in the past on a live video?+

That was a fabricated midnight. We used to treat /api/v1/cdn/{unix}/ as an expiry and floor it to 00:00:00Z. expiresAt is now parsed from VExpiration, x-expires, or expire= to the second. When none of those params exist — typical for library.tiktok.com — the key is null. A null means "no signed expiry", not "already dead".

What format are firstShown and lastShown?+

Calendar-day YYYY-MM-DD, same as Facebook ad-details. TikTok publishes day granularity. We do not emit MM/DD/YYYY display strings or T00:00:00.000Z instants.

Is the TikTok Ad Details API suitable for production use?+

Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.

More TikTok Ad Library APIs

Ready to use the TikTok Ad Details API?

Sign up, grab your key, and make your first call in 60 seconds.

TikTok Ad Details API | Captapi — Captapi