twitterapi
v0.1.2Read/write X (Twitter) via twitterapi.io: mentions, thread context, create and delete tweets.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_user_mentions Get user mentions
Fetch tweets mentioning a specific X/Twitter user. Makes a single request per call. The caller handles pagination by passing `cursor` (from a previous `next_cursor`).
| Parameter | Type | Description |
|---|---|---|
user_name * | string | X username, with or without @ |
cursor | string | Pagination cursor from a previous response's next_cursor |
limit | integer | Max tweets to return from this single request (default 50) |
query_type | string | Sort mode (default Latest) |
since_time | string | Start time filter (e.g. 2025-06-01 or ISO datetime) |
until_time | string | End time filter |
get_tweet_thread_context Get tweet thread context
Fetch one page of the conversation thread around a tweet (to find links in context). Returns the original tweet, intermediate replies up the chain, the tweet itself, and its direct replies; each tweet includes `entities.urls` with expanded links. Makes exactly one request per call: pages are uneven (a page may be empty while `has_next_page` is true), so pass `next_cursor` back as `cursor` to fetch the next page.
| Parameter | Type | Description |
|---|---|---|
tweet_id * | string | The tweet ID to get the thread context for |
cursor | string | Pagination cursor from a previous response's next_cursor |
create_tweet Create tweet
Create or reply to a tweet via the v2 endpoint. Uses `login_cookies` built from the account's `auth_token`/`ct0` env vars (requires TWITTERAPI_IO_AUTH_TOKEN, TWITTERAPI_IO_CT0, TWITTERAPI_IO_PROXY).
| Parameter | Type | Description |
|---|---|---|
tweet_text * | string | The text content of the tweet |
attachment_url | string | URL for quote (alternative to quote_tweet_id) |
community_id | string | Post inside a specific community |
is_note_tweet | boolean | Allow >280 chars (Premium accounts) |
media_ids | array | Media IDs from prior /twitter/upload_media_v2 |
quote_tweet_id | string | Tweet ID to quote |
reply_to_tweet_id | string | Tweet ID to reply to (makes this a reply) |
schedule_for | string | ISO-8601 future time e.g. 2026-01-20T10:00:00.000Z |
delete_tweet Delete tweet
Delete a tweet by ID (must be owned by the logged-in account). Uses `login_cookies` built from the account's `auth_token`/`ct0` env vars.
| Parameter | Type | Description |
|---|---|---|
tweet_id * | string | The ID of the tweet to delete |