# TikTok Ads Library Scraper

> TikTok Ads Library Scraper is a paid API for AI agents from api.scrapeforagents.tech, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Scrapes and returns structured public TikTok ad data by keyword, advertiser name, ad ID, country, and date range.

## Facts

- Endpoint: POST https://api.scrapeforagents.tech/v1/tiktok-ads?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tiktok-ads-library-scraper-9dde6aae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7-Ga5GAvtbLJ9PW2z-cxc

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 tiktok-ads-library-scraper-9dde6aae -d '<json body>'
```

Example prompt: Search the TikTok public ad library for ads from 'Nike' in Germany over the last 30 days, sorted by most recent, and return up to 60 ads with full details.

## When to prefer this

Choose this endpoint when you need structured, pay-per-result access to TikTok's public ad library without building your own scraper. Ideal for competitive ad intelligence, brand monitoring, and ad transparency research across European countries. Prefer this over manual browsing of TikTok's Ad Library when you need machine-readable JSON output, filtering by date range and country, or bulk retrieval by ad ID.

## Known failure modes

- No ads found matching query or filters — returns empty items array (not charged)
- Invalid country code returns validation error
- Invalid date format for startDate or endDate
- Ad IDs not found in public library return null fields
- Rate limits or TikTok library access restrictions may reduce results
- maxPages set too low may truncate paginated results

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

Returns a JSON object with a count of matched ads and an array of ad items, each containing fields such as adId, adUrl, adType, status, adTitle, auditStatus, rejectionInfo, and sorAuditStatus. Failed or empty result sets are not charged.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "adIds": {
   "type": "array",
   "description": "Fetch these public ad IDs directly instead of searching."
  },
  "query": {
   "type": "string",
   "description": "Words to find in public ad text or advertiser names."
  },
  "sortBy": {
   "enum": [
    "last_shown_date,desc",
    "last_shown_date,asc",
    "create_time,desc",
    "create_time,asc",
    "impression,desc",
    "impression,asc"
   ],
   "type": "string",
   "default": "last_shown_date,desc",
   "description": "Order of public search results."
  },
  "country": {
   "enum": [
    "GB",
    "AT",
    "BE",
    "BG",
    "CH",
    "CY",
    "CZ",
    "DE",
    "DK",
    "EE",
    "ES",
    "FI",
    "FR",
    "GR",
    "HR",
    "HU",
    "IE",
    "IS",
    "IT",
    "LI",
    "LT",
    "LU",
    "LV",
    "MT",
    "NL",
    "NO",
    "PL",
    "PT",
    "RO",
    "SE",
    "SI",
    "SK",
    "TR",
    "ALL"
   ],
   "type": "string",
   "default": "GB",
   "description": "Country where ads were shown. All requires a search query."
  },
  "endDate": {
   "type": "string",
   "description": "Latest date in YYYY-MM-DD. Defaults to today."
  },
  "maxItems": {
   "type": "integer",
   "default": 60,
   "minimum": 0,
   "description": "Stop after this many unique ads. Zero means no item cap."
  },
  "maxPages": {
   "type": "integer",
   "default": 5,
   "minimum": 0,
   "description": "Maximum search requests, up to 300. The page-based path uses them for date windows."
  },
  "startDate": {
   "type": "string",
   "description": "Earliest first-shown date, in YYYY-MM-DD. Defaults to 30 days ago."
  },
  "quickSearch": {
   "type": "boolean",
   "default": false,
   "description": "Skip ad detail requests. Targeting and advertiser fields may then be empty."
  },
  "advertiserName": {
   "type": "string",
   "description": "Search for ads associated with this advertiser name; takes priority over query."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "adId": null,
    "adUrl": null,
    "adType": null,
    "status": null,
    "adTitle": null,
    "auditStatus": null,
    "rejectionInfo": null,
    "sorAuditStatus": null
   }
  ],
  "product": "tiktok-ads"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tiktok-ads-library-scraper-9dde6aae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.scrapeforagents.tech](https://www.zero.xyz/host/api.scrapeforagents.tech/llms.txt)
