X (formerly Twitter) is one of the world's largest real-time social platforms, and its API gives you direct, structured access to public conversations. Search recent posts by keyword, hashtag, or cashtag; fetch @mentions of any account; count how many times a topic has been tweeted over a time window; pull the latest posts from any public timeline; surface trending topics for a specific city or country; look up public user profiles; and fetch per-tweet engagement metrics including impressions, likes, retweets, and replies. OAuth credentials additionally unlock non-public metrics on your own posts and the ability to publish new tweets.
Search recent posts on X using the X API v2
Fetch recent @mentions of a user by username
Get recent tweet volume counts for a search query
Fetch recent posts from a user's timeline by username
Get trending topics for a location by WOEID
Return the authenticated user's profile (requires OAuth user context)
Look up a public user profile by username
Fetch a single tweet with public engagement metrics
Fetch a tweet with extended metrics; OAuth credentials additionally return non_public_metrics and organic_metrics
List recent tweets from a user by their numeric user ID
Publish a new tweet (requires OAuth user context)
Sign up for free to connect X and use its tools in your workflows and prompts.