---
title: "Search TikTok's Ad Library"
method: GET
path: "/tiktok/ads"
tags: ["TikTok"]
---

# Search TikTok's Ad Library

`GET /tiktok/ads`

## Request

- Base URL: `https://api.scrapefield.com/v1`
- URL: `https://api.scrapefield.com/v1/tiktok/ads`
- Auth: one of:
  - HTTP bearer
  - none

Search the ads in TikTok's public Ad Library by keyword: each ad's advertiser, title, industry, when it first and last ran, its video or images, the audience range and impressions, about 12 a page. TikTok's library holds ads shown in Europe. Use this to watch what a brand or a category advertises.

Costs 3 credits, whether the answer is fetched or served from cache. A failed call is refunded automatically.

## Query parameters

- `query` string, required
- `cursor` string
- `fresh` boolean
- `demo` boolean

## Response `200`

The request succeeded.

- object
  - `data` TiktokAd[], required
    - `id` string, required: The Ad Library's id for the ad.
    - `url` string, uri, required: The ad in TikTok's Ad Library.
    - `advertiser` string, nullable, required: The name the ad runs under.
    - `title` string, nullable, required: The ad's title, as the library shows it.
    - `industry` string, nullable, required: As the library files it, e.g. "Apparel & Accessories".
    - `first_shown` string, date-time, nullable, required: When it was first shown, as the library dates it.
    - `last_shown` string, date-time, nullable, required: When it was last shown, as the library dates it.
    - `video_url` string, uri, nullable, required: The ad's video. On TikTok's CDN. TikTok signs the link, and it can stop working within hours, so fetch the file soon. We do not rehost media.
    - `cover_image_url` string, uri, nullable, required: The video's cover image. On TikTok's CDN. TikTok signs the link, and it can stop working within hours, so fetch the file soon. We do not rehost media.
    - `image_urls` string[], required: The ad's images, in order. On TikTok's CDN. TikTok signs the link, and it can stop working within hours, so fetch the file soon. We do not rehost media.
    - `estimated_audience` string, nullable, required: The range the library shows, e.g. "1K-10K".
    - `impressions` integer, nullable, required: How many times it was shown, as the library counts it. `null` where the library leaves it blank.
  - `meta` Meta, required
    - `request_id` string, required: Quote this if you contact support.
    - `credits_charged` integer, required: The endpoint's published cost. 0 for a demo answer, and for a list emptied because everyone in it asked not to be served. A failed call has no `meta`: it answers with an error, and is refunded.
    - `credits_remaining` integer
    - `cached` boolean, required
    - `fetched_at` string, date-time, required: When the data was actually fetched — the original time on a cache hit, so freshness is always visible.
    - `next_cursor` string, nullable, required: Pass as `cursor` for the next page. `null` on the last page. It lasts as long as the answer is cached.
    - `demo` boolean: Present, and true, on a demo answer (`?demo=true` with no key).
    - `note` string: On a demo answer: what it is, and what a live call costs.

## Other responses

- `400`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `401`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `403`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `404`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `429`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `500`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `501`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `502`: Something went wrong. `error.code` is stable; `error.message` says what to do next.

---

[API](https://skmtc.dev/scrapefield/apis/scrapefield-api.md) · [All operations](https://skmtc.dev/scrapefield/apis/scrapefield-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrapefield/apis/scrapefield-api/revisions/cc5961ac63cf?raw)
