# 今日头条 账号搜索 API (toutiao.profile_search)

- Canonical page: [https://everyinfra.com/toutiao-api/profile_search](https://everyinfra.com/toutiao-api/profile_search?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "toutiao", "action": "profile_search", "params": {...}}
- Price: $0.000556 per call ($0.56 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

今日头条账号搜索在指定 `user_id` 的主页内按 `keyword` 检索帖子，每条带类型、标题、正文 `text` 和 `content_text`、封面、阅读量和播放量、点赞评论分享数、作者与认证信息、地区和发布时间。它回答「这个头条号有没有发过讲某件事的内容」，适合核查一个账号对某个话题的历史内容，或在监测名单里按品牌词筛账号的帖子。

能力名里有「账号搜索」，但它不是全站搜索，也不能用关键词找账号。`user_id` 要用主页的 token（通常以 MS4w 开头），也可以传完整头条主页链接，昵称和普通短数字 UID 都不行。默认返回 20 条，单次最多 100 条。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| user_id | not declared | yes | not declared | 用户主页的 token/secUid，通常以 MS4w 开头，也可在 user_id 中传完整头条主页 URL；不是昵称或普通短数字 UID。 |
| keyword | not declared | yes | not declared | profile_search 在指定 user_id 的主页内检索帖子；不是今日头条全站搜索。 |
| limit | integer (1–100) | no | 20 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| type | 记录类型，取值随能力而定（如 video / image / text）。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| content_text | 正文文本。 |
| cover | 封面图。 |
| read_count | 阅读量。 |
| play_count | 播放量。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| share_count | 分享/转发数。null 表示不公开，不等于 0。 |
| source | 来源。 |
| author_name | 作者昵称（显示名）。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_verified | 作者是否认证（comments 上是评论者）。 |
| author_auth_info | 认证信息（如「XX领域创作者」；comments 上是评论者的，如「…官方账号」）；没认证时没有，多数评论者没有。 |
| region | 地区。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| duration_sec | platform-native meaning |
| duration_seconds | 时长，单位秒。非视频/音频内容为 null。 |
| image_urls | 图片链接数组，按平台展示顺序；没有图片时不出现这个字段。 |

## 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": "toutiao",
  "action": "profile_search",
  "params": {
    "user_id": "MS4wLjABAAAA3KU9ifwN12G41E6PJRpZgIfzVrXWQ4WPF66ns54c0uw",
    "keyword": "科技"
  }
}'
```

```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": "toutiao",
        "action": "profile_search",
        "params": {
            "user_id": "MS4wLjABAAAA3KU9ifwN12G41E6PJRpZgIfzVrXWQ4WPF66ns54c0uw",
            "keyword": "科技",
        },
    },
    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": "toutiao",
  "action": "profile_search",
  "results": [
    {
      "id": "•••",
      "url": "https://www.toutiao.com/•••",
      "type": "article",
      "read_count": 44,
      "like_count": 0,
      "comment_count": 0,
      "share_count": 0,
      "posted_at": "2026-09-18 18:03",
      "platform": "toutiao"
    },
    {
      "id": "•••",
      "url": "https://www.toutiao.com/•••",
      "type": "article",
      "read_count": 25,
      "like_count": 0,
      "comment_count": 0,
      "share_count": 0,
      "posted_at": "2026-09-23 17:17",
      "platform": "toutiao"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 能用它按关键词找今日头条账号吗？

不能。它只在你指定的那个 `user_id` 的主页内检索帖子，不是今日头条全站搜索。示例里 `user_id` 是账号主页的 token，`keyword` 是 科技，返回的是这个账号主页里含这个词的帖子。

### 它和用户内容那一页怎么选？

要读一个账号发的全部内容，或者按文章、视频、用户动态、短视频这样的栏目筛，用用户内容那一页；要在一个账号里找某个词，用这一页。这一页多一个 `keyword`，没有栏目参数。两页返回的字段完全一样。

### 怎么用结果里的数字判断一条内容的表现？

`read_count` 是阅读量，`play_count` 是播放量，再结合 `like_count`、`comment_count` 和 `share_count` 看互动。这几个互动数为 null 表示平台或接口不公开，不等于 0，比较前要先把 null 单独列出来。

## Also

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