TikTok Trending Feed API
For You by default; pass orderBy/period/page for Creative Center popular videos (like/hot/comment/repost) with totalCount.
Default: TikTok For You / recommend feed with rank, publishedAt, caption (null when empty), mediaType, durationSeconds, thumbnailUrl, author{}, and engagement{}. mediaType is photo only when the canonical url contains /photo/ (or durationSeconds is null and the payload is an image post) — never because videoUrl is omitted. Session-cookie-bound web URLs (tk=tt_chain_token, or the same check hidden in a base64 policy= param) 403 for callers and are never shipped — when only those exist, videoUrl is omitted and you open the post via url; that row is still a video. author.followers is read from the feed author card when present, then hydrated from /api/user/detail for unique handles still null (8s budget). Photo rows ship images[] + imageCount (numbered-dict slides and bitrate_images included; item/detail when the feed shipped one image). videoUrlExpiresAt / thumbnailUrlExpiresAt are the split CDN windows (~36h on play URLs — the shortest in the catalogue). Envelope matches instagram/trending-reels: platform, country, countryCode, cached, source (for_you | creative_center | cache), totalReturned, requested, hasMore, nextCursor (always null — For You has no stable cursor), truncatedReason (single_page_only when the For You page filled; chart-page on a filled Creative Center page), fetchedAt, timings{path,fetchMs,hydrateMs,totalMs}. hasMore is true with nextCursor null only when truncatedReason names the cap — same rule as truth-social/user-posts. engagement always keys views/likes/comments/shares/saves/downloads plus *IsApproximate on each. Pass orderBy (hot|like|comment|repost — unknown values are 400; vv/views are aliases of hot and the response echoes hot), period (7|30|120), page, or countryCode to switch to the TikTok Creative Center popular-videos chart. A chart miss falls through to For You posts inside the period window, re-sorted by the requested metric (note says so). Hard 110s deadline. A wall with a 6h last-good page is labelled stale 200 at 0 credits; a miss with no snapshot is 502 UPSTREAM_UNAVAILABLE at 0 credits — never a billed 200 we cannot deliver. country / countryCode is the chart market in Creative Center mode; on For You it is a region-availability hint. Flat 2 credits per call.
Request
- Base URL: https://api.captapi.com
- URL: https://api.captapi.com/v1/tiktok/trending-feed
- Auth: one of:
- HTTP bearer
- API key in header X-API-Key
Query parameters
Two-letter ISO country (default US). For You: region-availability hint. Creative Center mode: chart market.
Alias of country. Wins when both are set.
Max items to return (default 20, max 200). Flat 2 credits per call.
Creative Center sort: hot (views), like, comment, or repost. Unknown values are 400. vv/views/plays are aliases of hot — the response echoes the public name. Setting this (or period / page>1) switches from For You to the popular-videos chart. On a For You fallthrough the same sort is applied locally.
Lookback days: 7, 30, or 120 (180→120). Triggers chart mode. Every returned publishedAt is inside this window — a For You fallthrough is filtered the same way.
Creative Center page (default 1). page>1 triggers chart mode.
Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
Response
Success. The data object for this endpoint.
Changes
No recorded changes to this operation across all 3 revisions of this API.