# X (Twitter) Thread API (twitter.thread)

- Canonical page: https://everyinfra.com/en/twitter-api/thread
- Endpoint: POST /api/v1/social with {"platform": "twitter", "action": "thread", "params": {...}}
- Price: $0.002153 per call ($2.15 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 100, max 100 per call
- 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=thread

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | Link to any post in the thread, https://x.com/<username>/status/<ID>, or the numeric post ID. |
| id | not declared | no | not declared | Compatibility input: the numeric post ID; `url` takes precedence. |
| limit | integer (1–100) | no | 100 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## 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 |
| reply_to_id | platform-native meaning |
| source | platform-native meaning |
| media | 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_following_count | platform-native meaning |
| author_created_at | platform-native meaning |
| author_banner_url | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example 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": "twitter",
  "action": "thread",
  "params": {
    "url": "https://x.com/NASA/status/2082555075759685670"
  }
}'
```

```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": "thread",
        "params": {
            "url": "https://x.com/NASA/status/2082555075759685670",
        },
    },
    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": "thread",
  "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": …,
      "reply_to_id": …,
      "source": …,
      "media": …,
      "author_id": …,
      "author_avatar_url": …,
      "author_bio": …,
      "author_is_verified": …,
      "author_following_count": …,
      "author_created_at": …,
      "author_banner_url": …,
      "platform": …
    }
  ],
  "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
