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
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.
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.
Agents
35 ready-to-call endpoints
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
APIs to pair with Twitter / X
Threads API
Posts, replies, reposts, search
YouTube API
Channels, videos, comments, captions, playlists, hashtags, search, trending
Reddit API
Subreddits, posts, comments, feeds, search
Instagram API
Profiles, posts, reels, stories, comments, audio, search
Facebook API
Pages, posts, reels, groups, events, Marketplace, Ad Library
LinkedIn API
People, companies, posts, jobs, ads, search