X (Twitter)
communityAccess real-time information, trending topics, news, and public conversations on the X platform.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
GET
/api/v2/trends/currentRetrieve the current trending topics or 'Happening now' items.
Parameters
locationstring (optional) — geographic location for trendsoptionalReturns
List of trending topics with associated metadata.GET
/api/v2/tweets/search/allSearch for posts (tweets) based on keywords, users, or hashtags.
Parameters
querystring (required) — the search termrequiredmax_resultsinteger (optional) — number of results to returnoptionalReturns
A list of matching posts and associated user information.GET
/api/v2/users/:id/tweetsFetch the most recent posts from a specific user's timeline.
Parameters
idstring (required) — the user IDrequiredtweet_fieldsstring (optional) — fields to include in the tweet objectsoptionalReturns
The latest tweets posted by the specified user.GET
/api/v2/users/by/username/:usernameRetrieve detailed profile information for a specific user.
Parameters
usernamestring (required) — the user's screen namerequiredReturns
Detailed user object including bio, follower count, etc.