# Truth Social 主页或对象详情 API (truth_social.profile)

- Canonical page: [https://everyinfra.com/truth-social-api/profile](https://everyinfra.com/truth-social-api/profile?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "truth_social", "action": "profile", "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 主页或对象详情按 `username` 读取一个账号的公开资料，返回一条记录：`user_id`、用户名、显示名、简介、所在地、粉丝数、关注数、发帖数、是否认证、是否私密、头像、头图和账号创建时间。它回答「这是个什么账号、受众多大、注册多久了」，适合研究者、记者和媒体监测人员在跟踪或引用一个账号的发言前，先确认身份和受众规模。

`username` 是必填项，每次请求都要明确写出目标账号，开头带不带 @ 都可以。`location` 按主页上的写法原样返回，`bio` 可能含换行和 emoji。粉丝、关注、发帖数为 null 表示没有公开，`is_verified` 为 null 表示无法判定，都不等于 0 或未认证。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | Truth Social 用户短名，可带 @；user_posts 读取其帖子，replies 读取该作者发出的回复，不是读取别人对某帖的评论。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| user_id | 用户在原平台的唯一 ID。 |
| username | 用户名（@handle）。 |
| display_name | 显示名，可能与 username 不同。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| url | 该记录在原平台上的可访问链接。 |
| external_url | 账号资料里填写的个人网站链接。 |
| location | 地理位置描述，原文透传，格式随平台而异。 |
| follower_count | 粉丝数。null 表示不公开，不等于 0。 |
| following_count | 关注数。null 表示不公开，不等于 0。 |
| post_count | 发布内容总数。null 表示不公开，不等于 0。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| is_private | 账号是否设为私密。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| header_url | 主页头图。 |
| created_at | 创建时间，格式同 posted_at。 |
| 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": "profile",
  "params": {
    "username": "<TRUTH_SOCIAL_USERNAME>"
  }
}'
```

```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": "profile",
        "params": {
            "username": "<TRUTH_SOCIAL_USERNAME>",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "truth_social",
  "action": "profile",
  "results": {
    "user_id": …,
    "username": …,
    "display_name": …,
    "bio": …,
    "url": …,
    "external_url": …,
    "location": …,
    "follower_count": …,
    "following_count": …,
    "post_count": …,
    "is_verified": …,
    "is_private": …,
    "avatar_url": …,
    "header_url": …,
    "created_at": …,
    "platform": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `username` 应该填什么？

填账号的用户名，也就是主页和主页链接里 @ 后面那一串，开头的 @ 可带可不带。不要填显示名，它可能和用户名不同；结果里 `display_name` 是显示名，`username` 是你查询的用户名。

### 怎么读这个账号的帖子和回复？

用同一个用户名调 Truth Social 用户内容，读它发布的帖子；调 Truth Social 回复列表，读这个账号自己发出的回复，不是别人对某条帖子的评论。两者的 `username` 写法和这里相同。

### `is_private` 为真意味着什么？

`is_private` 为真表示账号设成了私密，帖子不对外公开，能读到的可能只有这份主页资料。安排帖子采集前先看这个字段，把私密账号单独列出，不要记成从不发帖的账号。

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