# SocialFetch TikTok Ad Library - Get Ad by ID or URL

> SocialFetch TikTok Ad Library - Get Ad by ID or URL is a paid API for AI agents from api.socialfetch.dev, paid per call via x402, $0.014/call, status unknown (last checked 2026-09-14).

Fetches a single TikTok Ad Library or Top Ads creative by ad ID or public ad URL.

## Facts

- Endpoint: GET https://api.socialfetch.dev/v1/tiktok/ad-library/ads
- Price: $0.014/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/socialfetch-tiktok-ad-library-get-ad-by-id-or-url-d0393330
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kMTc6e1g3DbTGlbkLsCm_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability socialfetch-tiktok-ad-library-get-ad-by-id-or-url-d0393330
```

Example prompt: Can you pull the details and creative for this TikTok Ad Library ad? Here's the URL: https://library.tiktok.com/ads/detail/?ad_id=1234567890

## When to prefer this

Use this endpoint when you need to retrieve details about a specific known TikTok ad by its ID or public URL, particularly from TikTok's Ad Library or Top Ads section. Prefer this over search endpoints when you already have the ad identifier or direct URL and want full creative details rather than a list of results.

## Known failure modes

- Invalid or malformed ad ID returns an error response
- Ad URL not recognized as a TikTok Ad Library or Top Ads URL
- Ad no longer available or removed from TikTok Ad Library
- Missing both adId and url query parameters
- Rate limiting or payment failure for the $0.014 USDC per-call fee

## How this service works

Get a single TikTok Ad Library or Top Ads creative by ad id or public ad URL.

## Output

Returns structured data about a single TikTok ad creative, including ad content, metadata, and associated details sourced from the TikTok Ad Library or Top Ads platform.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string",
       "maxLength": 4096,
       "minLength": 1,
       "description": "Public TikTok Ad Library or Top Ads detail URL for the ad."
      },
      "adId": {
       "type": "string",
       "maxLength": 4096,
       "minLength": 1,
       "description": "TikTok Ad Library or Top Ads ad id."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/socialfetch-tiktok-ad-library-get-ad-by-id-or-url-d0393330/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.socialfetch.dev](https://www.zero.xyz/host/api.socialfetch.dev/llms.txt)
