Search TikTok Ad Library ads
tiktok_adLibrary_ads_search_getSearch the public TikTok Ads Library by keyword or advertiser name. Pass sortBy=last-shown for the most recently shown ads first. Optional inputs: query, advertiserName, advertiserBusinessId, country, startDate and 3 more. Returns a list (use cursor when paginated). Costs credits; see meta.creditsCharged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"context": "<context>",
"llm_model": "<llm_model>"
},
"name": "tiktok_adLibrary_ads_search_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Keyword to search the public TikTok Ads Library. | |
| cursor | No | Opaque pagination cursor from a previous response. | |
| sortBy | No | Order of the ads. `last-shown` lists the most recently shown ads first, by the day each ad was last shown: ads of an earlier day keep TikTok's order within that day, and today's ads are sorted by time within each page. When the full order isn't available, each page is still sorted by last-shown time, newest first, but not across pages; ads without a last-shown time come last. Results are TikTok's live data, so an ad shown again while you page can move. A page can be empty while `hasMore` is true; a page with no ads costs no credits. `relevance` (the default) is TikTok's own order for a keyword search. An advertiser search comes newest first either way; pass `last-shown` to have each page sorted when the full order isn't available. | |
| context | Yes | Describe the user's underlying goal in one sentence, not the tool you are calling. | |
| country | No | Country the ad was shown in (its targeting or delivery country, not the advertiser's). Case-insensitive. Omit it, or use `ALL`, for every supported country. The US isn't supported. | |
| endDate | No | Only ads last shown on or before this date (UTC, YYYY-MM-DD, inclusive). Use with `startDate`. | |
| llm_model | Yes | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (for example "claude-opus-4-8" or "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" and do not guess. | |
| startDate | No | Only ads last shown on or after this date (UTC, YYYY-MM-DD). Use with `endDate`. Without both, the search covers the last 30 days. A narrower window means fewer pages to read. | |
| advertiserName | No | Search the public TikTok Ads Library by advertiser name. | |
| conversation_id | No | Echo the conversation_id from the server's previous response. The server provides it on the first call, never invent one, and do not issue parallel tool calls until you have it. | |
| advertiserBusinessId | No | TikTok advertiser business ID, from `advertiserMatches[].businessId` or an ad's `advertiserBusinessId`. Pins an advertiser search to that exact advertiser. Requires `advertiserName`. |