Returns TikTok ads and organic videos from the Public API TikTok library. This namespace is separate from the Meta-only /v1/ads endpoints and is backed by the tiktoks-search Elasticsearch alias.
publicApiBearer Provide a Trendtrack Public API key using Authorization: Bearer <api_key>.
In: header
application/json
application/json
application/json
application/json
application/json
{
"requestId": "req_123",
"data": [
{
"id": "tiktok_7078586231734521093",
"tiktokId": "string",
"type": "ad",
"status": "active",
"isPinned": true,
"publishedAt": "string",
"createdAt": "string",
"updatedAt": "string",
"daysRunning": 0,
"media": {
"type": "video",
"thumbnailUrl": "string",
"mediaUrl": "string",
"videoUrl": "string",
"imageUrls": [
"string"
],
"medias": [
{
"type": "video",
"url": "string",
"order": 0
}
],
"durationSec": 0,
"mediaCount": 0,
"imageCount": 0
},
"content": {
"description": "string",
"language": "string",
"category": "string",
"hashtags": [
"string"
],
"music": {
"id": "string",
"title": "string",
"author": "string"
}
},
"metrics": {
"views": 0,
"likes": 0,
"comments": 0,
"saves": 0,
"shares": 0,
"reposts": 0,
"engagementRate": 0,
"rank": 0,
"rankPercent": 0,
"relevanceScore": 0,
"deltaRank3d": 0,
"deltaRank7d": 0,
"deltaRank14d": 0,
"deltaRank30d": 0
},
"profile": {
"id": "string",
"handle": "string",
"name": "string",
"avatarUrl": "string",
"bio": "string",
"bioUrl": "string",
"accountType": "string",
"secUid": "string",
"followers": 0,
"following": 0,
"totalTikToks": 0,
"newTikToks": 0,
"percentAds": 0,
"views": 0,
"likes": 0,
"pageCreation": "string"
},
"shop": {
"id": "string",
"domain": "string",
"name": "string",
"logoUrl": "string",
"faviconUrl": "string",
"countryCode": "string",
"monthlyVisits": 0,
"trafficGrowth30d": 0,
"productsCount": 0,
"googleCategoryIds": [
0
]
},
"pin": {
"isCurrent": true,
"firstPinnedAt": "string",
"lastPinnedAt": "string",
"lastUnpinnedAt": "string"
},
"pageSnapshot": {
"recordedAt": "string",
"adsCount": 0,
"organicCount": 0,
"totalTikToks": 0,
"dailyViews": 0,
"dailyLikes": 0,
"dailyFollowers": 0
},
"indexedAt": "string"
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 250,
"totalPages": 10
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}Advanced TikTok library query over ES-backed fields only. It intentionally does not use the internal Next /api/tiktok-ads route or per-request Postgres hydration.
publicApiBearer Provide a Trendtrack Public API key using Authorization: Bearer <api_key>.
In: header
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
{
"requestId": "req_123",
"data": [
{
"id": "tiktok_7078586231734521093",
"tiktokId": "string",
"type": "ad",
"status": "active",
"isPinned": true,
"publishedAt": "string",
"createdAt": "string",
"updatedAt": "string",
"daysRunning": 0,
"media": {
"type": "video",
"thumbnailUrl": "string",
"mediaUrl": "string",
"videoUrl": "string",
"imageUrls": [
"string"
],
"medias": [
{
"type": "video",
"url": "string",
"order": 0
}
],
"durationSec": 0,
"mediaCount": 0,
"imageCount": 0
},
"content": {
"description": "string",
"language": "string",
"category": "string",
"hashtags": [
"string"
],
"music": {
"id": "string",
"title": "string",
"author": "string"
}
},
"metrics": {
"views": 0,
"likes": 0,
"comments": 0,
"saves": 0,
"shares": 0,
"reposts": 0,
"engagementRate": 0,
"rank": 0,
"rankPercent": 0,
"relevanceScore": 0,
"deltaRank3d": 0,
"deltaRank7d": 0,
"deltaRank14d": 0,
"deltaRank30d": 0
},
"profile": {
"id": "string",
"handle": "string",
"name": "string",
"avatarUrl": "string",
"bio": "string",
"bioUrl": "string",
"accountType": "string",
"secUid": "string",
"followers": 0,
"following": 0,
"totalTikToks": 0,
"newTikToks": 0,
"percentAds": 0,
"views": 0,
"likes": 0,
"pageCreation": "string"
},
"shop": {
"id": "string",
"domain": "string",
"name": "string",
"logoUrl": "string",
"faviconUrl": "string",
"countryCode": "string",
"monthlyVisits": 0,
"trafficGrowth30d": 0,
"productsCount": 0,
"googleCategoryIds": [
0
]
},
"pin": {
"isCurrent": true,
"firstPinnedAt": "string",
"lastPinnedAt": "string",
"lastUnpinnedAt": "string"
},
"pageSnapshot": {
"recordedAt": "string",
"adsCount": 0,
"organicCount": 0,
"totalTikToks": 0,
"dailyViews": 0,
"dailyLikes": 0,
"dailyFollowers": 0
},
"indexedAt": "string"
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 250,
"totalPages": 10
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}Returns one TikTok library item detail by composite_ad_id, with tiktok_id fallback because tiktok_id is part of the tiktoks-search public ES contract.
publicApiBearer Provide a Trendtrack Public API key using Authorization: Bearer <api_key>.
In: header
application/json
application/json
application/json
application/json
application/json
application/json
{
"requestId": "req_123",
"data": {
"id": "tiktok_7078586231734521093",
"tiktokId": "string",
"type": "ad",
"status": "active",
"isPinned": true,
"publishedAt": "string",
"createdAt": "string",
"updatedAt": "string",
"daysRunning": 0,
"media": {
"type": "video",
"thumbnailUrl": "string",
"mediaUrl": "string",
"videoUrl": "string",
"imageUrls": [
"string"
],
"medias": [
{
"type": "video",
"url": "string",
"order": 0
}
],
"durationSec": 0,
"mediaCount": 0,
"imageCount": 0
},
"content": {
"description": "string",
"language": "string",
"category": "string",
"hashtags": [
"string"
],
"music": {
"id": "string",
"title": "string",
"author": "string"
}
},
"metrics": {
"views": 0,
"likes": 0,
"comments": 0,
"saves": 0,
"shares": 0,
"reposts": 0,
"engagementRate": 0,
"rank": 0,
"rankPercent": 0,
"relevanceScore": 0,
"deltaRank3d": 0,
"deltaRank7d": 0,
"deltaRank14d": 0,
"deltaRank30d": 0
},
"profile": {
"id": "string",
"handle": "string",
"name": "string",
"avatarUrl": "string",
"bio": "string",
"bioUrl": "string",
"accountType": "string",
"secUid": "string",
"followers": 0,
"following": 0,
"totalTikToks": 0,
"newTikToks": 0,
"percentAds": 0,
"views": 0,
"likes": 0,
"pageCreation": "string"
},
"shop": {
"id": "string",
"domain": "string",
"name": "string",
"logoUrl": "string",
"faviconUrl": "string",
"countryCode": "string",
"monthlyVisits": 0,
"trafficGrowth30d": 0,
"productsCount": 0,
"googleCategoryIds": [
0
]
},
"pin": {
"isCurrent": true,
"firstPinnedAt": "string",
"lastPinnedAt": "string",
"lastUnpinnedAt": "string"
},
"pageSnapshot": {
"recordedAt": "string",
"adsCount": 0,
"organicCount": 0,
"totalTikToks": 0,
"dailyViews": 0,
"dailyLikes": 0,
"dailyFollowers": 0
},
"indexedAt": "string",
"links": {
"tiktokUrl": "string",
"profileUrl": "string"
},
"source": {
"network": "string",
"sourceType": "string",
"tiktokPageId": "string",
"websiteId": "string",
"domain": "string"
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}Returns TikTok library items linked to one public shop id using exact ES shop identifiers. This route has a TikTok endpoint key and ads entitlement even though it is nested under /v1/shops.
publicApiBearer Provide a Trendtrack Public API key using Authorization: Bearer <api_key>.
In: header
application/json
application/json
application/json
application/json
application/json
{
"requestId": "req_123",
"data": [
{
"id": "tiktok_7078586231734521093",
"tiktokId": "string",
"type": "ad",
"status": "active",
"isPinned": true,
"publishedAt": "string",
"createdAt": "string",
"updatedAt": "string",
"daysRunning": 0,
"media": {
"type": "video",
"thumbnailUrl": "string",
"mediaUrl": "string",
"videoUrl": "string",
"imageUrls": [
"string"
],
"medias": [
{
"type": "video",
"url": "string",
"order": 0
}
],
"durationSec": 0,
"mediaCount": 0,
"imageCount": 0
},
"content": {
"description": "string",
"language": "string",
"category": "string",
"hashtags": [
"string"
],
"music": {
"id": "string",
"title": "string",
"author": "string"
}
},
"metrics": {
"views": 0,
"likes": 0,
"comments": 0,
"saves": 0,
"shares": 0,
"reposts": 0,
"engagementRate": 0,
"rank": 0,
"rankPercent": 0,
"relevanceScore": 0,
"deltaRank3d": 0,
"deltaRank7d": 0,
"deltaRank14d": 0,
"deltaRank30d": 0
},
"profile": {
"id": "string",
"handle": "string",
"name": "string",
"avatarUrl": "string",
"bio": "string",
"bioUrl": "string",
"accountType": "string",
"secUid": "string",
"followers": 0,
"following": 0,
"totalTikToks": 0,
"newTikToks": 0,
"percentAds": 0,
"views": 0,
"likes": 0,
"pageCreation": "string"
},
"shop": {
"id": "string",
"domain": "string",
"name": "string",
"logoUrl": "string",
"faviconUrl": "string",
"countryCode": "string",
"monthlyVisits": 0,
"trafficGrowth30d": 0,
"productsCount": 0,
"googleCategoryIds": [
0
]
},
"pin": {
"isCurrent": true,
"firstPinnedAt": "string",
"lastPinnedAt": "string",
"lastUnpinnedAt": "string"
},
"pageSnapshot": {
"recordedAt": "string",
"adsCount": 0,
"organicCount": 0,
"totalTikToks": 0,
"dailyViews": 0,
"dailyLikes": 0,
"dailyFollowers": 0
},
"indexedAt": "string"
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 250,
"totalPages": 10
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}{
"error": {
"code": "missing_api_key",
"message": "Provide an API key using Authorization: Bearer <api_key>.",
"requestId": "5d93d8de-0f6d-46a4-bd10-2e519b7e96bc",
"details": {
"validationErrors": [
{
"field": "query-string.limit",
"location": "query-string",
"expected": [
"limit must not be greater than 100"
]
}
]
}
}
}"all""all" | "caption" | "profile" | "hashtag" | "music""all""all" | "ad" | "organic""all""all" | "active" | "inactive""newest""relevance" | "newest" | "updatedAt" | "views" | "likes" | "comments" | "shares" | "saves" | "engagementRate" | "daysRunning" | "followers""desc""asc" | "desc"11 <= value251 <= value <= 50Stable public shop identifier.
"all""all" | "caption" | "profile" | "hashtag" | "music""all""all" | "ad" | "organic""all""all" | "active" | "inactive""newest""relevance" | "newest" | "updatedAt" | "views" | "likes" | "comments" | "shares" | "saves" | "engagementRate" | "daysRunning" | "followers""desc""asc" | "desc"11 <= value251 <= value <= 50curl -X GET "https://api.trendtrack.io/v1/tiktok/library"curl -X POST "https://api.trendtrack.io/v1/tiktok/library/query" \ -H "Content-Type: application/json" \ -d '{ "search": [ "protein gummies" ], "searchArea": "caption", "type": "ad", "status": "active", "minViews": 10000, "sortBy": "views", "order": "desc", "limit": 10 }'curl -X GET "https://api.trendtrack.io/v1/tiktok/library/tiktok_7078586231734521093"curl -X GET "https://api.trendtrack.io/v1/shops/3f8aa146-6f96-46e8-9781-64db5166f9a8/tiktok/library""any""any" | "all""all""all" | "caption" | "profile" | "hashtag" | "music""all""all" | "ad" | "organic""all""all" | "active" | "inactive""yes" | "no""newest""relevance" | "newest" | "updatedAt" | "views" | "likes" | "comments" | "shares" | "saves" | "engagementRate" | "daysRunning" | "followers""desc""asc" | "desc"11 <= value251 <= value <= 50