# Twitter / X API (/api/x)



Public-data Twitter / X endpoints.

## When To Use This API [#when-to-use-this-api]

The Twitter / X API is for agent workflows that need public, platform-native data without writing a custom collector for every task. Use it when a prompt needs evidence from live social records, when a Skill needs repeatable enrichment, or when product code needs the same contract an agent discovered through MCP.

This section lists 35 live Twitter / X operations from the canonical OpenAPI spec. Each operation page documents the route, method, parameters, response envelope, pagination behavior when available, and the error vocabulary shared across UnifAPI.

* Fetch public X users, posts, lists, communities, trends, search results, and relationship checks.
* Give market, KOL, and competitive-intelligence agents a stable Twitter / X data contract.
* Batch public identities and posts into comparable response shapes for ranking, monitoring, or enrichment.

## Agent Contract Notes [#agent-contract-notes]

Agents usually discover these endpoints with the hosted UnifAPI MCP server, inspect the operation schema, then call only the records needed for the current task. Developers can call the same endpoints over HTTP with an API key, which makes the path from exploratory agent run to production integration direct.

Every successful response uses a stable envelope with a request id, data payload, optional pagination cursor, and billing metadata. Errors use the same closed vocabulary across platforms, so retry logic, user-facing explanations, and cost reporting can stay consistent even when a workflow spans multiple public-data sources.

When you are choosing an operation, start from the public identifier the user already has: a profile username, post id, channel id, subreddit name, search term, or URL-derived slug. Prefer the narrowest endpoint that answers the question, then expand only when the agent needs more evidence. This keeps record usage predictable, makes citations easier to explain, and avoids turning a focused research task into an expensive crawl.

## Operations [#operations]

### Autocomplete [#autocomplete]

* [`GET /x/autocomplete`](/api/x/autocomplete/get) — Autocomplete X users, topics, hashtags, and cashtags

### Communities [#communities]

* [`GET /x/communities/{id}/about`](/api/x/communities/id/about/get) — Get an X Community about timeline
* [`GET /x/communities/{id}/media`](/api/x/communities/id/media/get) — Get media Posts from an X Community
* [`GET /x/communities/{id}/member_search`](/api/x/communities/id/member_search/get) — Search members in an X Community
* [`GET /x/communities/{id}/members`](/api/x/communities/id/members/get) — Get members of an X Community
* [`GET /x/communities/{id}/moderators`](/api/x/communities/id/moderators/get) — Get moderators of an X Community
* [`GET /x/communities/{id}`](/api/x/communities/id/get) — Get X Community by ID
* [`GET /x/communities/{id}/tweets`](/api/x/communities/id/tweets/get) — Get Posts from an X Community
* [`GET /x/communities/search`](/api/x/communities/search/get) — Search X Communities

### Friendships [#friendships]

* [`GET /x/friendships/show`](/api/x/friendships/show/get) — Check whether one X user follows another

### Lists [#lists]

* [`GET /x/lists/{id}/followers`](/api/x/lists/id/followers/get) — Get followers/subscribers of an X List
* [`GET /x/lists/{id}/members`](/api/x/lists/id/members/get) — Get members of an X List
* [`GET /x/lists/{id}/tweets`](/api/x/lists/id/tweets/get) — Get Posts from an X List
* [`GET /x/lists/search`](/api/x/lists/search/get) — Search X Lists

### Trends [#trends]

* [`GET /x/trends/by/woeid/{woeid}`](/api/x/trends/by/woeid/woeid/get) — Get X trends by WOEID

### Tweets [#tweets]

* [`GET /x/tweets/{id}/article`](/api/x/tweets/id/article/get) — Get the article-style payload for an X Post
* [`GET /x/tweets/{id}/liking_users`](/api/x/tweets/id/liking_users/get) — Get users who liked an X Post
* [`GET /x/tweets/{id}/quote_tweets`](/api/x/tweets/id/quote_tweets/get) — Get quote Posts for an X Post
* [`GET /x/tweets/{id}/retweeted_by`](/api/x/tweets/id/retweeted_by/get) — Get users who reposted an X Post
* [`GET /x/tweets/{id}`](/api/x/tweets/id/get) — Get X Post by ID
* [`GET /x/tweets/{id}/translation`](/api/x/tweets/id/translation/get) — Translate an X Post
* [`GET /x/tweets`](/api/x/tweets/get) — Get X Posts by IDs
* [`GET /x/tweets/search/recent`](/api/x/tweets/search/recent/get) — Search recent X Posts

### Users [#users]

* [`GET /x/users/{id}/followers/ids`](/api/x/users/id/followers/ids/get) — Get follower IDs for an X user
* [`GET /x/users/{id}/followers`](/api/x/users/id/followers/get) — Get an X user's followers
* [`GET /x/users/{id}/following/ids`](/api/x/users/id/following/ids/get) — Get following IDs for an X user
* [`GET /x/users/{id}/following`](/api/x/users/id/following/get) — Get users followed by an X user
* [`GET /x/users/{id}/liked_tweets`](/api/x/users/id/liked_tweets/get) — Get Posts liked by an X user
* [`GET /x/users/{id}/profile_translation`](/api/x/users/id/profile_translation/get) — Translate an X user profile
* [`GET /x/users/{id}`](/api/x/users/id/get) — Get X user by ID
* [`GET /x/users/{id}/tweets`](/api/x/users/id/tweets/get) — Get Posts authored by an X user
* [`GET /x/users/{id}/verified_followers`](/api/x/users/id/verified_followers/get) — Get verified followers for an X user
* [`GET /x/users/by`](/api/x/users/by/get) — Get X users by usernames
* [`GET /x/users/by/username/{username}`](/api/x/users/by/username/username/get) — Get X user by username
* [`GET /x/users`](/api/x/users/get) — Get X users by IDs
