trending
POST /v1/trending is the trending action: what is hot right now. It is offered on 8 platforms (X, Reddit, Xiaohongshu, Douyin, Weibo, Bilibili and 2 more), and the platform is a parameter of the request. One call costs 2 to 12 credits, depending on the platform; a call that fails costs nothing.
https://api.socialtoai.com/v1/trendingRequest
A JSON body. These are the same for every action; the rest depends on the platform, below.
| Name | Type | Where | Required | What it is |
|---|---|---|---|---|
platform | string | body | Yes | The platform to read. One of the platforms this action is offered on. |
max_cost_credits | integer | body | No | The most this call may cost. Over it, the call is refused for free and the answer carries the quote. |
Idempotency-Key | string | header | No | 1 to 255 visible ASCII characters. The same key with the same parameters returns the first result again and is not charged twice. |
Platforms and credits
Each platform takes its own parameters. Its own page has the full parameter and field tables and a request you can change.
| Platform | Price key | Credits | Required | Optional | Per page |
|---|---|---|---|---|---|
| X | x.trending | 6 | – | board, region | 30 |
reddit.trending | 2 | – | board | 25 | |
| Xiaohongshu | xiaohongshu.trending | 12 | – | board | 20 |
| Douyin | douyin.trending | 2 | – | board | 51 |
weibo.trending | 2 | – | board | 51 | |
| Bilibili | bilibili.trending | 2 | – | board | 50 |
| Zhihu | zhihu.trending | 2 | – | board | 50 |
| Kuaishou | kuaishou.trending | 2 | – | – | 60 |
Some platforms have another form of this action, selected by a parameter and priced on its own:
| Platform | Price key | Credits | Selected by |
|---|---|---|---|
reddit.trending:trends | 2 | type=trends | |
| Douyin | douyin.trending:videos | 2 | type=videos |
| Bilibili | bilibili.trending:videos | 2 | type=videos |
Parameters
| Name | Type | What it is | Taken by |
|---|---|---|---|
board | string | Which list: trends is the only one Values vary by platform: trends, popular, searches, inspiration, hot_search, rising, topics, music … | X, Reddit, Xiaohongshu, Douyin, Weibo, Bilibili and Zhihu |
region | string | Which country's trends, by its two-letter code: US, GB, CA, AU, IN, JP, DE, FR, BR or MX; worldwide when left out | X |
Example
X: What is trending now: title, rank and heat.
curl https://api.socialtoai.com/v1/trending \ -H "Authorization: Bearer $SOCIALTOAI_KEY" \ -H "Content-Type: application/json" \ -d '{ "platform": "x" }'import osimport requestsresponse = requests.post( "https://api.socialtoai.com/v1/trending", headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"}, json={ "platform": "x", },)print(response.json()){ "request_id": "req_00000000-0000-4000-8000-000000000001", "schema_version": "v1", "fetched_at": "2026-10-13T03:29:53.000Z", "action": "trending", "platform": "x", "status": "ok", "items": [ { "platform": "x", "id": null, "ref": null, "approx": [], "type": "entry", "entry_type": "trend", "title": "…", "url": null, "rank": 1, "heat": null, "fields": {} } ], "unavailable": ["id", "heat", "url"], "page": { "has_more": false }, "warnings": [], "applied_params": {}, "cost_credits": 6, "billing": { "cost_credits": 6, "balance_credits": 94, "today_spend_credits": 6, "daily_limit_credits": null, "daily_remaining_credits": null, "display": "This call: 6 credits. Balance: 94 credits." }, "replayed": false}Sample data: names, links and text are replaced by placeholders.
What comes back
The envelope with entry:trend and content items. One call returns one page of up to 30 items; each page is its own call. A cursor works for up to 30 minutes.
A failed call costs 0 credits and says why: see Errors.
Last updated: