# X (Twitter) 列表里的帖子 API (twitter.list_posts)

- Canonical page: [https://everyinfra.com/twitter-api/list_posts](https://everyinfra.com/twitter-api/list_posts?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "twitter", "action": "list_posts", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of up to 20 per call; the number of rows varies from page to page and a short page is not the end (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page; no next_page_token means the end)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| list_id | not declared | yes | not declared | X 列表（List）的数字编号，即 x.com/i/lists/ 后的数字，也可填列表链接；返回列表成员发的帖子，从新到旧，成员转发的帖子也在内，每页 20 条。列表不存在或是私密列表时返回空结果，不收费。 |
| page_token | not declared | no | not declared | 翻页令牌：把上一次响应里的 next_page_token 原样传回，拿下一页；不传从第一页开始。令牌 24 小时有效，每页算一次调用。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| retweet_count | 转发数。 |
| reply_count | 回复数，通常用于评论的子回复。null 表示不公开。 |
| view_count | 浏览/播放数。null 表示不公开，不等于 0。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_name | 作者昵称（显示名）。 |
| author_url | 作者在原平台的主页链接。 |
| author_follower_count | 作者粉丝数。null 表示不公开。 |
| quote_count | platform-native meaning |
| bookmark_count | 书签（收藏）数。 |
| language | 内容语言代码（如 zh、en），由平台判定，可能不准。 |
| conversation_id | 所属对话串 ID（根推文 ID），同一串的回复据此归在一起。 |
| is_reply | platform-native meaning |
| is_quote | 是否引用推文。 |
| is_repost | platform-native meaning |
| reply_to_id | platform-native meaning |
| reply_to_user_id | 所回复用户的数字 ID。 |
| reply_to | platform-native meaning |
| media | 推文图片 / 视频：type（photo / video / animated_gif）、url（图片或视频封面）、width、height、duration_sec（视频秒数）、video_url（码率最高的 mp4）。 |
| hashtags | 正文里的话题标签数组，按出现顺序；没有时不出现这个字段。 |
| mentions | 正文里 @ 到的用户名。 |
| links | 正文里的外链（展开后的完整网址）。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_avatar_url | 作者头像图片链接（多数平台带签名、会过期）。 |
| author_bio | platform-native meaning |
| author_is_verified | platform-native meaning |
| author_created_at | platform-native meaning |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| reposted_by | 转发这条帖子的账号（用户名）；这一行本身是被转发的原帖。不是转发进来的行没有这个字段。 |
| reposted_at | 转发的时间。不是转发进来的行没有这个字段。 |

## 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": "twitter",
  "action": "list_posts",
  "params": {
    "list_id": "84839422"
  }
}'
```

```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": "twitter",
        "action": "list_posts",
        "params": {
            "list_id": "84839422",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:22:03Z. `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": "twitter",
  "action": "list_posts",
  "results": [
    {
      "id": "•••",
      "url": "https://x.com/santiagomed/status/2123956145698042132",
      "text": "New on the X API: IP allowlisting.\n\nChoose exactly which IP addresses can use your API keys. If a key ever leaks, calls from anywhere else get blocked. One list covers all your apps.\n\nTurn it on in the Developer Console under Settings > IP allowlist.\n\nDocs: https://docs.x.com/fun…",
      "like_count": 47,
      "retweet_count": 5,
      "reply_count": 5,
      "view_count": 2555,
      "posted_at": "2026-11-21T01:46:20+00:00",
      "author_username": "s•••d",
      "author_name": "S•••o",
      "author_url": "https://x.com/•••",
      "author_follower_count": 5530,
      "quote_count": 1,
      "bookmark_count": 13,
      "language": "en",
      "conversation_id": "2123956145698042132",
      "is_reply": false,
      "is_quote": false,
      "is_repost": true,
      "author_id": "•••",
      "author_avatar_url": "https://pbs.twimg.com/•••",
      "author_bio": "•••",
      "author_is_verified": true,
      "platform": "twitter",
      "reposted_by": "XDevelopers",
      "reposted_at": "2026-11-21T01:46:54+00:00"
    },
    {
      "id": "•••",
      "url": "https://x.com/Sports/status/2123943867280241125",
      "text": "BIIIIIIG NIGHT OF BASKETBALL\n\nTime to tap in 👇💥 https://x.com/i/nba?page=home",
      "like_count": 9,
      "retweet_count": 2,
      "reply_count": 2,
      "view_count": 18267,
      "posted_at": "2026-11-21T00:57:33+00:00",
      "author_username": "S•••s",
      "author_name": "S•••s",
      "author_url": "https://x.com/•••",
      "author_follower_count": 13809487,
      "quote_count": 0,
      "bookmark_count": 0,
      "language": "en",
      "conversation_id": "2123943867280241125",
      "is_reply": false,
      "is_quote": false,
      "is_repost": false,
      "links": [
        "https://x.com/i/nba?page=home"
      ],
      "author_id": "•••",
      "author_avatar_url": "https://pbs.twimg.com/•••",
      "author_bio": "•••",
      "author_is_verified": true,
      "platform": "twitter"
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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