TikTok Trending API
TikTok's logged-out For You feed for a region, showing what the platform is pushing to a brand-new visitor right now. Not a ranking anyone can reproduce: TikTok personalises even the anonymous feed, so two calls a second apart return different videos. Calls cost 1 credit each. A cache hit is free, and a failed or empty response is never charged.
Try it
Prefilled with the request that produced the example below. No key yet? Get a free key.
Request
GET
/v1/tiktok/trending| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | Two-letter country code, e.g. US, GB, DEdefaults to US |
| count | number | no | Items per page (default 30, max 30) |
Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).
curl
curl "$API/v1/tiktok/trending?region=US&cache_max_age=7d" \
-H "x-api-key: $KEY"JavaScript
const query = new URLSearchParams({
region: 'US',
cache_max_age: '7d',
});
const response = await fetch(`${API}/v1/tiktok/trending?${query}`, {
headers: { 'x-api-key': KEY },
});
const body = await response.json();
if (!body.success) throw new Error(body.error.code);
// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);Python
import os, httpx
r = httpx.get(
f"{os.environ['API']}/v1/tiktok/trending",
params={
"region": "US",
"cache_max_age": "7d",
},
headers={"x-api-key": os.environ["KEY"]},
timeout=30,
)
body = r.json()
if not body["success"]:
raise RuntimeError(body["error"]["code"])
print(body["data"], body["meta"]["creditsCharged"])Example response
Captured on , with raw removed and lists cut to two items. A live call returns current data.
response
{
"success": true,
"data": {
"items": [
{
"platform": "tiktok",
"id": "7683132722407050509",
"type": "video",
"url": "https://www.tiktok.com/@example_user_1/video/7683132722407050509",
"title": "#leon #asmrnature #foodtiktok #cookingnature #uotdoorcooking ",
"text": "#leon #asmrnature #foodtiktok #cookingnature #uotdoorcooking ",
"authorId": "example-user-1",
"authorHandle": "example_user_1",
"authorName": "Example User 1",
"thumbnailUrl": "https://example.com/media/1.jpg",
"mediaUrls": [
"https://example.com/media/1.jpg"
],
"durationSeconds": 474,
"viewCount": 19800,
"likeCount": 2730,
"commentCount": 42,
"shareCount": 783,
"hashtags": [
"leon",
"asmrnature"
],
"mentions": [],
"isSponsored": false,
"publishedAt": "2026-09-08T11:59:09.000Z",
"fetchedAt": "2026-10-21T01:55:18.973Z"
},
{
"platform": "tiktok",
"id": "7697228747463806228",
"type": "video",
"url": "https://www.tiktok.com/@example_user_2/video/7697228747463806228",
"title": "cả 2 người đều có tài năng #yihengwang #rubikscube #trungquoc ",
"text": "cả 2 người đều có tài năng #yihengwang #rubikscube #trungquoc ",
"authorId": "example-user-2",
"authorHandle": "example_user_2",
"authorName": "Example User 2",
"thumbnailUrl": "https://example.com/media/2.jpg",
"mediaUrls": [
"https://example.com/media/2.jpg"
],
"durationSeconds": 34,
"viewCount": 110500,
"likeCount": 9037,
"commentCount": 129,
"shareCount": 1690,
"hashtags": [
"yihengwang",
"rubikscube"
],
"mentions": [],
"isSponsored": false,
"publishedAt": "2026-10-16T11:38:48.000Z",
"fetchedAt": "2026-10-21T01:55:18.973Z"
}
]
},
"pagination": {
"cursor": null,
"hasMore": false,
"count": 7
},
"meta": {
"platform": "tiktok",
"endpoint": "tiktok.trending",
"creditsCharged": 1,
"cached": false,
"cacheAgeSeconds": null,
"durationMs": 3919,
"requestId": "req_jxm2k2r6wg7aurxebdsl"
}
}Returns
Returns a list of Post in data.items.
Cost and behaviour
| Credits | 1 per live request, 0 on a cache hit |
| Cacheable | yes: cache_max_age accepts a cached copy |
| Batchable | yes: usable as a target in POST /v1/jobs/batch |
| Subscribable | no |
Other TikTok endpoints
- /v1/tiktok/ad-library/ad One TikTok ad
- /v1/tiktok/ad-library/search Search the TikTok Ads Library
- /v1/tiktok/collection/videos Collection videos
- /v1/tiktok/comment-replies Replies to a comment
- /v1/tiktok/comments Comments on a video
- /v1/tiktok/creators/popular Popular creators
- /v1/tiktok/followers Accounts following a creator
- /v1/tiktok/following Accounts a creator follows