# 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.

- Page: https://socialtoai.com/docs/api/trending/
- Last updated: 2026-10-17

- POST: `https://api.socialtoai.com/v1/trending`

## Request

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](https://socialtoai.com/x-trending-api.md) | `x.trending` | 6 | – | `board`, `region` | 30 |
| [Reddit](https://socialtoai.com/reddit-trending-api.md) | `reddit.trending` | 2 | – | `board` | 25 |
| [Xiaohongshu](https://socialtoai.com/xiaohongshu-trending-api.md) | `xiaohongshu.trending` | 12 | – | `board` | 20 |
| [Douyin](https://socialtoai.com/douyin-trending-api.md) | `douyin.trending` | 2 | – | `board` | 51 |
| [Weibo](https://socialtoai.com/weibo-trending-api.md) | `weibo.trending` | 2 | – | `board` | 51 |
| [Bilibili](https://socialtoai.com/bilibili-trending-api.md) | `bilibili.trending` | 2 | – | `board` | 50 |
| [Zhihu](https://socialtoai.com/zhihu-trending-api.md) | `zhihu.trending` | 2 | – | `board` | 50 |
| [Kuaishou](https://socialtoai.com/kuaishou-trending-api.md) | `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 | `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**

```
curl https://api.socialtoai.com/v1/trending \
  -H "Authorization: Bearer $SOCIALTOAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "x"
  }'
```

**Python**

```
import os
import requests

response = requests.post(
    "https://api.socialtoai.com/v1/trending",
    headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"},
    json={
        "platform": "x",
    },
)
print(response.json())
```

**Response** (200 OK, 6 credits)

```
{
  "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](https://socialtoai.com/docs/api/response.md) with [`entry:trend`](https://socialtoai.com/docs/api/response.md) and [`content`](https://socialtoai.com/docs/api/response.md) 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](https://socialtoai.com/docs/api/errors.md).
