TikTok Scraper
Get TikTok Ad Library Ad Library Search
Searches TikTok's public Ads Library using either query for a general search or advertiser_name for advertiser-specific results. Advertiser-name searches resolve the name through TikTok's advertiser typeahead first, then search the selected advertiser entity and return adv_biz_ids on each ad. You can pass adv_biz_ids with advertiser_name to pin the exact advertiser shown in TikTok's See all ads link. TikTok requires the name with the ID and ignores an ID-only search, so provide exactly one of query or advertiser_name. If TikTok has no matching advertiser entity, the API falls back to TikTok's name search. Results are global, sorted by the latest shown date, support cursor pagination, and include a public TikTok Ads Library URL for each ad.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| limitnumber · optional | number | optional | Maximum number of results to return from this request. Leave empty for everything this request returns. This trims the response — it does not fetch more; use the returned cursor for the next batch. The price is the same either way. |
| querystring · optional | string | optional | General ad search. Provide either query or advertiser_name, not both. |
| cursorstring · optional | string | optional | Opaque cursor returned from the previous response. |
| adv_biz_idsstring · optional | string | optional | TikTok advertiser business ID from a See all ads link. Use it with advertiser_name to pin the exact advertiser. Required companion: advertiser_name; ID-only searches return 400 because TikTok ignores the ID without the name. |
| advertiser_namestring · optional | string | optional | Advertiser name to resolve through TikTok's typeahead and search by advertiser entity. Falls back to TikTok's name search when no entity matches. Provide either advertiser_name or query, not both. |
Response schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"ads": {
"type": "array"
},
"total": {
"type": "number"
},
"cursor": {
"type": "string"
},
"source": {
"type": "string"
},
"has_more": {
"type": "boolean"
},
"limitApplied": {
"type": "boolean",
"description": "True when a Limit trimmed the results; there were more in this response."
},
"advertiser_name": {
"type": "string"
},
"advertiser_matches": {
"type": "array"
},
"resolved_advertiser_name": {
"type": "string"
}
},
"additionalProperties": true
}