tiktok_ads
Search and extract ad listings from TikTok's Ad Library by keyword or advertiser ID, with filters for country, date range, and sort order.
Instructions
Searches and extracts ad listings from TikTok's Ad Library by keyword or advertiser ID, with filtering by country, date range, and sort order. [Credits: 5 API credits per successful request] Notes: query_type=1 (default) pairs with query; query_type=2 pairs with advertiser_id. Pagination is handled via next_page_token echoed in the response. Returns: { code, total, has_more, search_id, next_page_token, ads: [{ id, name, audit_status, type, first_shown_date, last_shown_date, videos: [{video_url, cover_img}], image_urls[], estimated_audience, spent, impression, show_mode, rejection_info, sor_audit_status }] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Keyword to search for on TikTok Ads. Used for keyword search (query_type=1). | |
| country | No | The country to search ads from. (default: all) | |
| sort_by | No | Sort order for results. Allowed values: `last_shown_date_newest_to_oldest` (default), `last_shown_date_oldest_to_newest`, `published_date_newest_to_oldest`, `published_date_oldest_to_newest`, `unique_users_seen_low_to_high`, `unique_users_seen_high_to_low`. (default: last_shown_date_newest_to_oldest) | |
| query_type | No | Type of search: `1` for keyword search (default), `2` for advertiser ID search. (default: 1) | |
| time_period | No | Custom date range in `YYYY-MM-DD..YYYY-MM-DD` format. Defaults to the past 12 months if omitted. | |
| advertiser_id | No | Unique advertiser ID to search for ads from a specific advertiser. Used together with query_type=2. | |
| next_page_token | No | Token used to fetch the next page of results. Use the `next_page_token` value returned in the previous response. |