# X (Twitter) Posts in bulk API (twitter.posts_batch)

- Canonical page: [https://everyinfra.com/en/twitter-api/posts_batch](https://everyinfra.com/en/twitter-api/posts_batch?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "twitter", "action": "posts_batch", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Billing unit: each element in `urls` counts as one call; the number of elements you send sets the charge
- Returns: list
- Mode: sync only; everything it returns (every target of a batch, or every SKU of a product) is read in one call, and "mode": "async" returns 422 before any charge

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| urls | not declared | yes | not declared | The posts to read, as an array of up to 20 entries (not a comma-separated string). Each entry is a post link https://x.com/<username>/status/<ID> or a numeric post ID, and each post can appear only once. Billed per post; posts not found are not charged and are listed in `missed`. |
| limit | integer (1–) | no | not declared | The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| retweet_count | platform-native meaning |
| reply_count | Replies, usually replies to a comment. null means not disclosed. |
| view_count | Views or plays. null means not disclosed, not 0. |
| posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
| author_username | Author's username (@handle), usually usable in URLs. |
| author_name | Author's display name. |
| author_url | Link to the author's profile on the platform. |
| author_follower_count | Author's follower count. null means not disclosed. |
| quote_count | platform-native meaning |
| bookmark_count | platform-native meaning |
| language | Content language code (for example zh, en) as judged by the platform; it can be wrong. |
| conversation_id | platform-native meaning |
| is_reply | platform-native meaning |
| is_quote | platform-native meaning |
| is_repost | platform-native meaning |
| reply_to_id | platform-native meaning |
| reply_to_user_id | platform-native meaning |
| reply_to | platform-native meaning |
| media | platform-native meaning |
| hashtags | Hashtags in the text, in order of appearance; absent when there are none. |
| mentions | platform-native meaning |
| links | platform-native meaning |
| author_id | Author's unique ID on the platform. |
| author_avatar_url | platform-native meaning |
| author_bio | platform-native meaning |
| author_is_verified | platform-native meaning |
| author_created_at | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
| input | platform-native meaning |

## 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": "posts_batch",
  "params": {
    "urls": [
      "https://x.com/NASA/status/2119833829389041896",
      "2113338155088961899"
    ]
  }
}'
```

```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": "posts_batch",
        "params": {
            "urls": [
                "https://x.com/NASA/status/2119833829389041896",
                "2113338155088961899",
            ],
        },
    },
    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": "twitter",
  "action": "posts_batch",
  "results": [
    {
      "id": …,
      "url": …,
      "text": …,
      "like_count": …,
      "retweet_count": …,
      "reply_count": …,
      "view_count": …,
      "posted_at": …,
      "author_username": …,
      "author_name": …,
      "author_url": …,
      "author_follower_count": …,
      "quote_count": …,
      "bookmark_count": …,
      "language": …,
      "conversation_id": …,
      "is_reply": …,
      "is_quote": …,
      "is_repost": …,
      "reply_to_id": …,
      "reply_to_user_id": …,
      "reply_to": …,
      "media": …,
      "hashtags": …,
      "mentions": …,
      "links": …,
      "author_id": …,
      "author_avatar_url": …,
      "author_bio": …,
      "author_is_verified": …,
      "author_created_at": …,
      "platform": …,
      "input": …
    }
  ],
  "count": …,
  "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
