library.tiktok.com APIlibrary.tiktok.com ↗
Search TikTok's Commercial Content Library by advertiser name or keyword. Get ad targeting, creative format, dates, and audience data via 3 structured endpoints.
curl -X GET 'https://api.parse.bot/scraper/8a656d95-c7a6-406d-b28e-6b6f91cf8493/search_ads?limit=5&query=nike&offset=0®ion=all' \ -H 'X-API-Key: $PARSE_API_KEY'
Search the TikTok Ad Library for ads matching a query (advertiser name or keyword). Returns paginated results with ad metadata. For pagination beyond the first page, pass the search_id from the previous response along with the desired offset.
| Param | Type | Description |
|---|---|---|
| limit | integer | Number of results per page (max 50) |
| queryrequired | string | Search query (advertiser name or keyword) |
| offset | integer | Pagination offset (0-based). Requires search_id from a previous response for values > 0. |
| region | string | Region/country code filter (e.g. 'FR', 'DE', 'GB') or 'all' for all regions. Use get_supported_regions for the full list of accepted codes. |
| sort_by | string | Sort order: 'last_shown_date,desc' or 'last_shown_date,asc' |
| end_time | integer | End of date range as Unix timestamp (seconds). Defaults to now. |
| search_id | string | Search ID returned from a previous search_ads call. Required when offset > 0 to paginate through results. |
| start_time | integer | Start of date range as Unix timestamp (seconds). Defaults to 1 year ago. |
{
"type": "object",
"fields": {
"ads": "array of ad objects with ad_id, advertiser_name, creative_format, first_shown_date, last_shown_date, estimated_audience, video_thumbnail_url, video_url, image_urls",
"limit": "integer current page size",
"query": "string the query used",
"total": "integer total number of matching ads",
"offset": "integer current offset",
"region": "string the region filter used",
"has_more": "boolean indicating if more pages are available",
"search_id": "string identifier for paginating subsequent requests"
},
"sample": {
"data": {
"ads": [
{
"ad_id": "1863836516205570",
"video_url": "https://library.tiktok.com/api/v1/cdn/...",
"image_urls": [],
"advertiser_name": "nikeelopes",
"creative_format": "video",
"last_shown_date": "2026-04-30",
"first_shown_date": "2026-04-30",
"estimated_audience": "1K-10K",
"video_thumbnail_url": "https://p19-common-sign-useastred.tiktokcdn-eu.com/..."
}
],
"limit": 5,
"query": "nike",
"total": 1000,
"offset": 0,
"region": "all",
"has_more": true,
"search_id": "20260501085819807F49204B729F806D0B"
},
"status": "success"
}
}About the library.tiktok.com API
This API provides access to TikTok's Commercial Content Library through 3 endpoints, covering ad search, ad details, and supported regions. The search_ads endpoint returns paginated results including ad IDs, advertiser names, creative format, first and last shown dates, and estimated audience ranges. The get_ad_details endpoint exposes full targeting breakdowns — location, age, gender — plus video URLs and image assets for any specific ad.
Search TikTok Ad Library
The search_ads endpoint accepts a required query string (advertiser name or keyword) and returns an array of ad objects alongside a total count and a has_more flag. Each ad object includes ad_id, advertiser_name, creative_format (video or image), first_shown_date, last_shown_date, and estimated_audience. Results can be filtered by region (using ISO country codes like FR, GB, or DE, or all for global), by date range using Unix timestamps (start_time / end_time), and sorted by last_shown_date ascending or descending.
Pagination
For results beyond the first page, pass the search_id string returned in the initial response along with the desired offset. The search_id ties subsequent requests to the same result set, so omitting it when offset > 0 will not return correct results. Page size is controlled by limit (max 50).
Ad Details and Targeting
The get_ad_details endpoint takes an ad_id (obtained from search_ads) and returns the full ad record: targeting object with locations, age, gender, and audience criteria; video_url; image_urls array; creative_format; and ISO-formatted first_shown_date / last_shown_date. All endpoints accept an optional lang parameter (e.g. en-US, fr-FR) to localize text fields in the response.
Supported Regions
The get_supported_regions endpoint returns the full list of country codes and names accepted by the region filter in search_ads. Coverage is limited to European regions. Each region object contains a code and a localized name, which varies based on the lang parameter supplied.
- Track competitor ad campaigns on TikTok by querying
search_adswith an advertiser name and monitoringfirst_shown_dateandlast_shown_date. - Audit ad targeting strategies by pulling
targetingbreakdowns (age, gender, location) fromget_ad_detailsfor any ad ID. - Build a creative asset archive by collecting
video_urlandimage_urlsreturned byget_ad_detailsacross multiple ad IDs. - Filter ad activity within a specific date window using
start_timeandend_timeUnix timestamps insearch_ads. - Identify which creative formats (video vs. image) are most active for a given advertiser using
creative_formatacross paginated search results. - Enumerate all filterable European markets for a regional ad analysis tool using the
get_supported_regionsendpoint. - Sort ads by recency with
sort_by: last_shown_date,descto surface the newest active creatives for a given keyword.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does TikTok provide an official developer API for its Ad Library?+
What does the `get_ad_details` endpoint return for targeting, and what is not included?+
targeting object with locations, age, gender, and audience criteria, plus video_url, image_urls, estimated_audience, and ISO-formatted impression dates. Detailed budget data, impression counts, and click metrics are not currently returned. The API covers creative and targeting metadata. You can fork it on Parse and revise to add any additional fields if TikTok's library exposes them.Is ad coverage available for regions outside Europe?+
get_supported_regions endpoint returns only European region codes, and the region filter in search_ads is scoped to those same regions. Non-European markets are not covered by the current implementation. You can fork the API on Parse and revise it to add support for additional regions if they become available in TikTok's library.How does pagination work when there are more than 50 results?+
search_ads returns a search_id string. To fetch subsequent pages, pass that search_id together with the desired offset value. Without the search_id, requests with offset > 0 will not correctly continue the same result set. The has_more boolean indicates whether additional pages exist.