POST /api/v1/tiktok/trending/feed — 1 credit per page
Get one page of TikTok’s trending (explore) feed: about 30 videos and photo posts, each with its caption, counts, cover, video files, creator and sound. Every request is a new page, and there is no cursor.
Endpoint
Section titled “Endpoint”| Method | Path | Returns |
|---|---|---|
| POST | /api/v1/tiktok/trending/feed |
One page of TikTok’s trending feed |
Request & Response
Section titled “Request & Response”Query parameters
Section titled “Query parameters”Send these in the URL query string. A request body is ignored.
| Name | Type | Required | Description |
|---|---|---|---|
region |
string | Yes | Two ASCII letters, any case. It is checked and then ignored: every request is served from one fixed location, so the feed is the same whichever you send |
trim |
boolean | No | true returns a smaller version of each item: caption, counts, video file, author and links, without the sound, hashtags and sharing settings |
Response body
Section titled “Response body”| Field | Type | Description |
|---|---|---|
success |
boolean | Always true on a 200 |
credits_charged |
integer | Credits this request cost; 0 for a page your key already paid for |
credits_remaining |
integer | Your balance after this request |
cached_at |
string | UTC time of the cached answer. Present only on a cached answer |
aweme_list |
array | The page’s videos and photo posts, in the feed’s order. Never empty on a 200 |
Each item in aweme_list is the same video object the video lookup returns, built the same way: one TikTok did not send is left out, never invented. A photo post carries image_post_info instead of a video. Video links expire, so download what you need to keep.
The feed does not carry everything the video lookup does. These are left out because TikTok’s feed does not send them: the poster’s region, download_count and whatsapp_share_count. About one item in ten has no download_addr.
- There is no cursor and no
has_more. Each request is a new page, and there is no “next page” to ask for. - Ads (about 1 item in 30) stay in the list with
is_ad: true. - A page holds up to about 30 items and can hold fewer. A short page is still a page, and it is charged.
Caching and cost
Section titled “Caching and cost”One feed page is shared by every key for 60 seconds. The feed returns different videos on every fetch, so the cache is not about freshness: it limits the service to about one TikTok fetch a minute however many keys ask. Call once a minute for new videos.
- 1 credit per page, charged only on a
200. - Asking again within the 60 seconds with the same key is free (
credits_charged: 0, withcached_at), and so is a resubmit after a503. - Another key reading a page that was already fetched pays for it.
regionandtrimdo not change the cache entry, so a trimmed and an untrimmed request for the same page share it.
Errors
Section titled “Errors”| Status | When | What to do |
|---|---|---|
400 |
region is missing, not two letters, or trim is not a boolean |
Fix the request |
401 |
No API key, or an unknown one | Check your key |
402 |
Your balance cannot cover this plus your unfinished lookups | Buy credit |
403 |
TikTok refused the lookup (a captcha challenge, an empty answer or a page with nothing in it) | Not charged. Retry after the Retry-After header |
429 |
Rate limit, or too many unfinished lookups | Slow down |
503 |
No answer in time, or the lookup failed on our side | Not charged. Resubmit after the Retry-After header; it is free if the work finished |
There is no 404: a feed has nothing to not find. Every 403 and 503 carries a finishReason.
curl -X POST "https://api.megomi.my.id/api/v1/tiktok/trending/feed?region=US" \ -H "x-api-key: YOUR_API_KEY"const params = new URLSearchParams({ region: "US" });const res = await fetch(`https://api.megomi.my.id/api/v1/tiktok/trending/feed?${params}`, { method: "POST", headers: { "x-api-key": process.env.MEGOMI_API_KEY }, signal: AbortSignal.timeout(60_000),});const data = await res.json();import requests
res = requests.post( "https://api.megomi.my.id/api/v1/tiktok/trending/feed", params={"region": "US"}, headers={"x-api-key": "YOUR_API_KEY"}, timeout=60,)print(res.json())<?php$url = "https://api.megomi.my.id/api/v1/tiktok/trending/feed?" . http_build_query(["region" => "US"]);$ch = curl_init($url);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-api-key: YOUR_API_KEY"]);curl_setopt($ch, CURLOPT_TIMEOUT, 60);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);echo curl_exec($ch);q := url.Values{}q.Set("region", "US")req, _ := http.NewRequest("POST", "https://api.megomi.my.id/api/v1/tiktok/trending/feed?"+q.Encode(), nil)req.Header.Set("x-api-key", "YOUR_API_KEY")client := &http.Client{Timeout: 60 * time.Second}resp, _ := client.Do(req){ "success": true, "credits_charged": 1, "credits_remaining": 999, "aweme_list": [ { "aweme_id": "7690461071047429407", "desc": "Sunrise over the launch pad #space #sunrise", "desc_language": "en", "create_time": 1790575036, "create_time_utc": "2026-09-28T05:57:16.000Z", "statistics": { "aweme_id": "7690461071047429407", "play_count": 18400000, "digg_count": 596600, "comment_count": 4860, "share_count": 61700, "collect_count": 71800, "repost_count": 0 }, "video": { "duration": 133000, "width": 720, "height": 1280, "ratio": "720p", "cover": { "url_list": ["https://cdn.example.com/cover/27810c37"] }, "play_addr": { "uri": "v15044gf0000dat002fog65l3dldnip0", "url_list": ["https://cdn.example.com/urllist/d60df37e"], "width": 720, "height": 1280 } }, "author": { "uid": "6800000000000000001", "unique_id": "creator_1", "nickname": "Creator 1", "sec_uid": "MS4wLjABAAAAexampleSecUid", "follower_count": 57500, "aweme_count": 28 }, "music": { "title": "original sound - creator_1", "author": "Creator 1" }, "is_ad": false } ]}Shortened to one item: a page holds about 30, and each has the video lookup’s whole shape.
{ "status": 400, "title": "Bad Request", "detail": "region is required" }{ "status": 401, "title": "Unauthorized", "detail": "invalid API key" }{ "status": 403, "title": "Forbidden", "detail": "the source's answer did not contain the trending feed, which usually means it is withholding it (a login wall or a soft block); you were not charged", "requestId": "req_9f1kQ3zP7mLxA2dR", "finishReason": "no-item-in-response"}{ "status": 503, "title": "Service Unavailable", "detail": "no data fetched within 45s; you were not charged. The lookup is still running: submitting the same request again shortly may return it from cache, and is never charged twice", "requestId": "req_1qLr6PxV8nWtE3sJ", "finishReason": "no-data-fetched"}