# Truth Social 热榜 API (truth_social.trending)

- Canonical page: [https://everyinfra.com/truth-social-api/trending](https://everyinfra.com/truth-social-api/trending?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "truth_social", "action": "trending", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

Truth Social 热榜不需要任何参数，直接返回平台当前的热门帖子；每条的正文、语言、互动计数、媒体附件、话题标签，连同作者的账号名、粉丝数和认证状态，都在同一行里。它回答「此刻全站在讨论什么」，常用于政治舆情监测、新闻选题，以及跟踪某个议题在这个平台上的热度。接进舆情系统时，它更适合当发现入口：先在榜上看到苗头，再去用户内容或单条内容那一页追细节。

热榜反映的是调用那一刻的状态，想看热点怎么变化，需要按固定间隔反复读取并存档；`is_repost`、`is_reply` 可以把原帖、转发和回复分开。排序规则没有公开，覆盖面是否全球、完整或严格实时也无从证明，写结论时注明这是某个时刻的平台快照。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=truth_social&action=trending

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| limit | integer (1–100) | no | 20 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| language | 内容语言代码（如 zh、en），由平台判定，可能不准。 |
| reply_count | 回复数，通常用于评论的子回复。null 表示不公开。 |
| repost_count | 转发数（区别于引用转发）。null 表示不公开。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_name | 作者昵称（显示名）。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_follower_count | 作者粉丝数。null 表示不公开。 |
| author_verified | 作者是否已认证。 |
| reply_to_id | 被回复的内容 ID。 |
| reply_to_account_id | 被回复账号的 ID。 |
| is_reply | 该条是否为回复。 |
| is_repost | 该条是否为转发（ReTruth）。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| media | 附带的媒体内容。 |
| hashtags | 话题标签。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "truth_social",
  "action": "trending",
  "params": {}
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "truth_social",
        "action": "trending",
        "params": {},
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "truth_social",
  "action": "trending",
  "results": [
    {
      "id": "•••",
      "url": "https://truthsocial.com/@•••/117336883864922392",
      "text": "Keep the lights on, sideline Big Brother: Trump EPA rollback could save ratepayers $310 billion: https://justthenews.com/government/federal-agencies/trumps-epa-gets-action-roots-out-30-billion-waste-fraud-and-abuse",
      "language": "en",
      "reply_count": 22,
      "repost_count": 65,
      "like_count": 201,
      "author_username": "•••",
      "author_name": "•••",
      "author_id": "•••",
      "author_follower_count": 13079020,
      "author_verified": true,
      "is_reply": false,
      "is_repost": false,
      "posted_at": "2026-09-26T10:32:40.145000+00:00",
      "platform": "truth_social"
    },
    {
      "id": "•••",
      "url": "https://truthsocial.com/@•••/117336881513699850",
      "text": "Feds arrest, indict hundreds in Trump voter fraud crackdown: 'Catching it all over the country': https://justthenews.com/politics-policy/elections/feds-have-arrested-indicted-hundreds-voter-fraud-crackdown-catching-it",
      "language": "en",
      "reply_count": 25,
      "repost_count": 73,
      "like_count": 235,
      "author_username": "•••",
      "author_name": "•••",
      "author_id": "•••",
      "author_follower_count": 13079020,
      "author_verified": true,
      "is_reply": false,
      "is_repost": false,
      "posted_at": "2026-09-26T10:32:04.269000+00:00",
      "platform": "truth_social"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 热榜和用户内容分别适合回答什么问题？

热榜从平台出发，看全站正在热的帖子，作者是谁事先不知道；用户内容从一个账号出发，只看这个人发了什么。热榜不收任何参数，没法按话题或账号过滤，要缩小范围只能读回来以后按话题标签或作者账号名自己筛。两页返回的字段完全相同，换数据源不用改解析代码。追热点用热榜，盯特定人物用用户内容。常见的搭法是热榜负责发现新面孔和新议题，锁定的账号再交给用户内容长期跟。

### 反复上榜的账号，怎么从热榜里挑出来？

统计一段时间内多次上榜的 `author_username`，再结合 `author_follower_count` 和 `author_verified` 看影响力。归并作者时认准作者 ID，别按显示名合并；一条帖子在几次读取里都出现，用 `id` 去重，否则长期挂榜的帖子会被算成多次上榜。反复上榜、粉丝却不多的账号，值得单独留意；把这些账号名交给用户内容，还能补齐它们没上榜的那些发言。

### 想跟踪一个话题在热榜上的起落，怎么做？

定时读取热榜，统计带某个话题标签（看 `hashtags`）或含某个关键词的帖子有几条、`like_count` 和 `repost_count` 合计多少，画成时间曲线。热榜只给当下，曲线要靠自己存档累积。按 `language` 分开计数，能看出议题在不同语种帖子里的热度；语言由平台判定，可能不准。每次读取时刻减去 `posted_at`，就是帖子被读到时已发出多久，能看出上榜的多是新帖还是老帖。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=truth_social
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
