# Truth Social 单条内容 API (truth_social.post)

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

Truth Social 单条内容按帖子链接 `url` 读取一条帖子，返回单个对象：全文 `text` 和语言，点赞、转发、回复三项计数，发布时间，帖子里的 `hashtags` 和 `media`，及作者的用户名、昵称、粉丝数和认证状态。它回答「这条帖子到底写了什么」，适合核对一条被引用的帖子，或者把别处拿到的链接补成结构化数据。

`url` 要传完整的帖子链接，最好带 @作者 路径，例如 https://truthsocial.com/@realDonaldTrump/117006290013696288，这样作者和帖子能一起定位。`id` 和 `post_url` 是兼容写法：单独传帖子 ID 无法可靠推断作者，`post_url` 的优先级低于 `url`。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | post 的完整帖子链接，建议包含 @作者 路径，便于同时定位作者和帖子；不要只传无法识别作者的短链接。 |
| id | not declared | no | not declared | 帖子 ID 的兼容输入，单独使用时无法可靠推断作者；优先用完整 url，不依赖默认作者回落。 |
| post_url | not declared | no | not declared | url 的帖子链接兼容输入，优先级低于 url，不取消公开必填字段。 |

## 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": "post",
  "params": {
    "url": "https://truthsocial.com/@realDonaldTrump/117006290013696288"
  }
}'
```

```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": "post",
        "params": {
            "url": "https://truthsocial.com/@realDonaldTrump/117006290013696288",
        },
    },
    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. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "truth_social",
  "action": "post",
  "results": {
    "id": "117006290013696288",
    "url": "https://truthsocial.com/@realDonaldTrump/117006290013696288",
    "text": "Thank you Abe! President DJT",
    "language": "en",
    "reply_count": 2706,
    "repost_count": 8359,
    "like_count": 30420,
    "author_username": "realDonaldTrump",
    "author_name": "•••",
    "author_id": "•••",
    "author_follower_count": 13079020,
    "author_verified": true,
    "is_reply": false,
    "posted_at": "2026-07-30T01:18:18.306000+00:00",
    "media": [
      {
        "type": "image",
        "url": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/media_attachments/files/117/006/289/878/591/793/original/798c3bda0c3ef894.png",
        "preview_url": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/media_attachments/files/117/006/289/878/591/793/small/798c3bda0c3ef894.png"
      }
    ],
    "platform": "truth_social"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 只有帖子 ID 能读到吗？

不建议只传 ID。`id` 可以传，但单独使用时无法可靠推断作者，也不要依赖默认作者回落。优先传带 @作者 路径的完整链接；`post_url` 同样是兼容输入，优先级低于 `url`，不取消 `url` 作为公开必填字段。

### 单条内容和回复列表、用户内容怎么分工？

用户内容和回复列表按账号批量列出帖子，这一页按链接读一条。三页字段通用；手里只有一条链接时用这一页直接读，不必先找到作者、再到列表里翻。

### 单条内容能看出这条帖子是转发还是回复吗？

能。`is_repost` 为真是转发（ReTruth），`is_reply` 为真是回复；回复帖还带 `reply_to_id` 和 `reply_to_account_id`，指向被回复的内容和账号。`reply_count`、`like_count` 这些计数读不到时给 null，不能按 0 算；`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
