Social platformsLive

Twitter / X API for AI agents

Read public X (Twitter) users, posts, search, trends, lists and communities, plus relationship checks, as unified JSON under /x/....

Using ChatGPT, Claude Code or another client? See the setup steps

Agent workflows

Use Twitter / X records as evidence, not glue code.

UnifAPI keeps the public Twitter / X surface discoverable through MCP and callable over HTTP. Agents can inspect the schema, fetch only the records needed for the task, and return the result with request, pagination, and billing metadata intact.

Use the Twitter / X API to get public users by handle, list followers and following, search posts, and read trends, lists, communities, and follow-relationship checks for market or creator research.

Give KOL pricing and competitive-intelligence agents a stable Twitter / X data contract instead of brittle browser automation.

Batch identities and posts into comparable response shapes for monitoring, enrichment, ranking, or evidence-backed outreach briefs.

Run it

Agents & Skills that use the Twitter / X API

You rarely call an API by hand. These prebuilt agents and skills already read Twitter / X records inside Claude or Codex — start from one of them, or call the endpoints below yourself.

Endpoints

35 ready-to-call endpoints

GET/x/autocomplete$min $0.001

Autocomplete X users, topics, hashtags, and cashtags

Return X search autocomplete suggestions for a partial query, grouped into matching users, topics, hashtags, and cashtags. Useful for type-ahead search, entity discovery, and expanding a seed term into related handles and tags.

Details →
GET/x/communities/{id}$min $0.001

Get X Community by ID

Return a single X Community by its ID, including name, description, member count, and other public metadata. Useful for resolving a Community's profile before pulling its Posts or members.

Details →
GET/x/communities/{id}/about$min $0.001

Get an X Community about timeline

Return the "about" timeline for an X Community — the pinned and descriptive Posts that introduce the group — as a cursor-paginated list. Useful for understanding a Community's purpose and rules before engaging.

Details →
GET/x/communities/{id}/media$min $0.001

Get media Posts from an X Community

Return only the media-bearing Posts (images and video) from an X Community, as a cursor-paginated list. Useful for surfacing the visual content shared within a group.

Details →
GET/x/communities/{id}/member_search$min $0.001

Search members in an X Community

Search within an X Community's membership by query string and return matching members as a cursor-paginated list of profiles. Useful for finding specific people inside a large Community.

Details →
GET/x/communities/{id}/members$min $0.001

Get members of an X Community

Return the accounts that belong to an X Community, as a cursor-paginated list of full profiles. Useful for mapping the membership of a topic-based group.

Details →
GET/x/communities/{id}/moderators$min $0.001

Get moderators of an X Community

Return the moderators of an X Community, as a cursor-paginated list of full profiles. Useful for identifying who governs a group and the key accounts to reach.

Details →
GET/x/communities/{id}/tweets$min $0.001

Get Posts from an X Community

Return the timeline of Posts shared inside an X Community, as a cursor-paginated list. Useful for monitoring discussion within a topic-based group.

Details →
GET/x/communities/search$min $0.001

Search X Communities

Search X Communities by query string and return a cursor-paginated set of matching Communities with their metadata. Useful for discovering active topic-based groups to monitor or analyze.

Details →
GET/x/friendships/show$min $0.001

Check whether one X user follows another

Return the directional follow relationship between two X accounts — whether the source follows the target and vice versa — identified by user IDs or screen names. Useful for verifying connections and detecting one-way follows.

Details →
GET/x/lists/{id}/followers$min $0.001

Get followers/subscribers of an X List

Return the accounts that subscribe to (follow) an X List, as a cursor-paginated list of full profiles. Useful for sizing and analyzing the audience that tracks a curated List.

Details →
GET/x/lists/{id}/members$min $0.001

Get members of an X List

Return the accounts that belong to an X List, as a cursor-paginated list of full profiles. Useful for extracting a curated audience or seed set of accounts around a theme.

Details →
GET/x/lists/{id}/tweets$min $0.001

Get Posts from an X List

Return the combined timeline of Posts from the members of an X List, as a cursor-paginated list. Useful for following a hand-curated set of accounts as a single topical feed.

Details →
GET/x/lists/search$min $0.001

Search X Lists

Search public X Lists by query string and return a cursor-paginated set of matching Lists with their metadata. Useful for discovering curated account collections around a topic, industry, or community.

Details →
GET/x/trends/by/woeid/{woeid}$min $0.001

Get X trends by WOEID

Return the current trending topics for a location identified by its WOEID (Yahoo "Where On Earth" ID), each with its name and, when available, associated Post volume. Useful for region-specific trend tracking and timing content to live conversations.

Details →
GET/x/tweets$min $0.001

Get X Posts by IDs

Batch-fetch up to 100 Posts in one call from a comma-separated list of numeric Post IDs, returning the same full object as the single-Post lookup. Useful for hydrating a set of Posts without one request each.

Details →
GET/x/tweets/{id}$min $0.001

Get X Post by ID

Fetch a single X (Twitter) Post by its numeric ID — the classic get-tweet-by-ID lookup — returning text, author, timestamp, language, and public metrics (likes, reposts, replies, quotes, and views). Useful for hydrating a known Post or checking its current engagement.

Details →
GET/x/tweets/{id}/article$min $0.001

Get the article-style payload for an X Post

Return the long-form X Article payload attached to a Post, including its full text body and authoring metadata. Useful for extracting complete article content from Posts that carry it, rather than only the short Post text.

Details →
GET/x/tweets/{id}/liking_users$min $0.001

Get users who liked an X Post

Return the accounts that liked a given X Post, as a cursor-paginated list of full profiles. Useful for analyzing who engaged with a Post and surfacing an interested audience.

Details →
GET/x/tweets/{id}/quote_tweets$min $0.001

Get quote Posts for an X Post

Return the quote Posts that reference a given X Post, as a cursor-paginated list with author and metrics for each quote. Useful for measuring how a Post is being amplified and what commentary it is attracting.

Details →
GET/x/tweets/{id}/retweeted_by$min $0.001

Get users who reposted an X Post

Return the accounts that reposted (retweeted) a given X Post, as a cursor-paginated list of full profiles. Useful for identifying who amplified a Post and mapping the audience that spread it.

Details →
GET/x/tweets/{id}/translation$min $0.001

Translate an X Post

Return a machine translation of an X Post's text into a target language code (e.g. `zh`, `es`). Useful for monitoring non-native-language conversations and normalizing multilingual Posts into one working language.

Details →
GET/x/tweets/search/recent$min $0.001

Search recent X Posts

Search recent public X Posts matching a query string and return a cursor-paginated list of Posts with author and metrics — a drop-in Twitter search API for tracking keywords, hashtags, cashtags, brand mentions, and breaking conversations in near real time.

Details →
GET/x/users$min $0.001

Get X users by IDs

Batch-resolve up to 100 X accounts in one call from a comma-separated list of numeric user IDs, returning the same profile fields as the single-user lookup. Useful for hydrating profiles behind a list of IDs without one request per account.

Details →
GET/x/users/{id}$min $0.001

Get X user by ID

Resolve a single X (Twitter) account by its numeric user ID and return the full public profile — handle, display name, bio, follower and following counts, verification status, and profile media. Useful when you already hold a stable user ID and need the current profile.

Details →
GET/x/users/{id}/followers$min $0.001

Get an X user's followers

Return a cursor-paginated followers list for a given X (Twitter) user — every account that follows them, with a full profile object per follower. Useful for audience analysis and mapping who follows a brand, creator, or competitor.

Details →
GET/x/users/{id}/followers/ids$min $0.001

Get follower IDs for an X user

Return only the numeric user IDs of an X user's followers as a cursor-paginated list — a lighter, faster payload than full follower profiles. Useful for large-scale audience snapshots and set comparisons such as follower overlap between two accounts.

Details →
GET/x/users/{id}/following$min $0.001

Get users followed by an X user

Return a cursor-paginated following list — the accounts a given X (Twitter) user follows, with full profile objects. Useful for mapping an account's interest graph and the people it pays attention to.

Details →
GET/x/users/{id}/following/ids$min $0.001

Get following IDs for an X user

Return only the numeric user IDs that an X user follows as a cursor-paginated list, without the full profile bodies. Useful for efficiently capturing an account's outbound follow graph for overlap and diffing analysis.

Details →
GET/x/users/{id}/liked_tweets$min $0.001

Get Posts liked by an X user

Return the Posts an X user has liked, as a cursor-paginated list. Useful for understanding an account's interests and engagement signals beyond the content it publishes itself.

Details →
GET/x/users/{id}/profile_translation$min $0.001

Translate an X user profile

Return a machine translation of an X user's profile text (such as the bio) into a target language code. Useful for understanding non-native-language profiles when analyzing international accounts.

Details →
GET/x/users/{id}/tweets$min $0.001

Get Posts authored by an X user

Return a cursor-paginated timeline of Posts authored by an X user, newest first, optionally dropping replies via the `exclude` parameter. Each page carries a cursor for fetching older Posts — useful for profiling an account's content, monitoring an author, or archiving a feed.

Details →
GET/x/users/{id}/verified_followers$min $0.001

Get verified followers for an X user

Return the subset of an X user's followers that carry a verified badge, as a cursor-paginated list of full profiles. Useful for gauging an account's reach among notable or paying accounts.

Details →
GET/x/users/by$min $0.001

Get X users by usernames

Batch-resolve up to 100 X accounts from a comma-separated list of @handles in a single call, returning one profile object per username. Useful for converting a list of handles into user IDs and profile data in one request.

Details →
GET/x/users/by/username/{username}$min $0.001

Get X user by username

Look up an X (Twitter) account by its @handle (without the leading @) and return the full public profile, including the numeric user ID — the standard way to get a Twitter user ID from a username before calling the follower, timeline, and relationship endpoints. Useful as the entry point when you only know a username.

Details →