# API endpoint reference

39 read endpoints. All are GET requests on https://api.twittrapi.com with the key in the X-API-KEY header, and each call is billed once.

Responses are X's own JSON, passed through (see https://www.twittrapi.com/docs/response-format), or compact JSON with `format=simple` (see https://www.twittrapi.com/docs/simple-format). Endpoints that act on your own X account are under https://www.twittrapi.com/docs/account-actions.

Machine-readable: OpenAPI 3.1 at https://www.twittrapi.com/openapi.json, every endpoint in one file at https://www.twittrapi.com/llms-full.txt.

## Users

Profiles, timelines, followers, following and ID lookups.

- [GET /user/by/username/{username}](https://www.twittrapi.com/docs/reference/user-by-username-username.md): User by username. Profile of one account by handle, including its numeric user ID.
- [GET /user/{userId}](https://www.twittrapi.com/docs/reference/user-userid.md): User by ID. Profile of one account by numeric user ID.
- [GET /user/users/by/ids](https://www.twittrapi.com/docs/reference/user-users-by-ids.md): Users by IDs. Profiles of up to 100 accounts in one call.
- [GET /user/usernames/to/ids](https://www.twittrapi.com/docs/reference/user-usernames-to-ids.md): Usernames to IDs. Numeric user IDs for up to 100 handles in one call.
- [GET /username/to/id/{username}](https://www.twittrapi.com/docs/reference/username-to-id-username.md): Username to ID. Numeric user ID for one handle. Smaller response than the full profile.
- [GET /user/about/{username}](https://www.twittrapi.com/docs/reference/user-about-username.md): About this account. The data behind X's "About this account" panel (account location, join date, username changes and similar).
- [GET /user/{userId}/tweets](https://www.twittrapi.com/docs/reference/user-userid-tweets.md): User tweets. Tweets from a profile timeline (without replies), newest first.
- [GET /user/{userId}/tweetsAndReplies](https://www.twittrapi.com/docs/reference/user-userid-tweetsandreplies.md): User tweets and replies. Tweets and replies from a profile, newest first.
- [GET /user/{userId}/media](https://www.twittrapi.com/docs/reference/user-userid-media.md): User media. Tweets with photos or videos from a profile.
- [GET /user/{userId}/likes](https://www.twittrapi.com/docs/reference/user-userid-likes.md): User likes. Tweets a user has liked.
- [GET /user/{userId}/followers](https://www.twittrapi.com/docs/reference/user-userid-followers.md): Followers. Accounts that follow a user, newest first.
- [GET /user/{userId}/followings](https://www.twittrapi.com/docs/reference/user-userid-followings.md): Following. Accounts a user follows.
- [GET /user/{userId}/verifiedFollowers](https://www.twittrapi.com/docs/reference/user-userid-verifiedfollowers.md): Verified followers. Followers of a user that have a verified (blue) badge.
- [GET /user/{userId}/articles](https://www.twittrapi.com/docs/reference/user-userid-articles.md): User articles. X Articles (long-form posts) published by a user.
- [GET /user/usernames/status](https://www.twittrapi.com/docs/reference/user-usernames-status.md): Account status for many handles. Whether each handle is active, suspended, protected or not found. Up to 500 handles per call.
- [GET /user/friendships/show](https://www.twittrapi.com/docs/reference/user-friendships-show.md): Relationship between two accounts. Whether one account follows another, and the other way round.

## Tweets

A tweet with replies, likers, retweeters and quotes.

- [GET /tweet/{tweetId}](https://www.twittrapi.com/docs/reference/tweet-tweetid.md): Tweet with replies. A tweet with its author, media, counts and the reply thread.
- [GET /simpletweet/{tweetId}](https://www.twittrapi.com/docs/reference/simpletweet-tweetid.md): Single tweet. One tweet by ID, without the reply thread. Smaller than /tweet/{tweetId}.
- [GET /tweet/{tweetId}/article](https://www.twittrapi.com/docs/reference/tweet-tweetid-article.md): Tweet with article content. Like /tweet/{tweetId}, but also asks X for the full content of an X Article attached to the tweet.
- [GET /tweet/{tweetId}/favorites](https://www.twittrapi.com/docs/reference/tweet-tweetid-favorites.md): Users who liked a tweet. Accounts that liked a tweet.
- [GET /tweet/{tweetId}/retweets](https://www.twittrapi.com/docs/reference/tweet-tweetid-retweets.md): Users who retweeted a tweet. Accounts that retweeted a tweet.
- [GET /tweet/{tweetId}/quotes](https://www.twittrapi.com/docs/reference/tweet-tweetid-quotes.md): Quote tweets. Tweets that quote a tweet.

## Search

Search tweets and people with X's search operators.

- [GET /search](https://www.twittrapi.com/docs/reference/search.md): Search tweets. Search tweets or people with the same query syntax as the X search box.

## Lists

Details, tweets, members and followers of public lists.

- [GET /lists/details](https://www.twittrapi.com/docs/reference/lists-details.md): List details. Name, description, owner and member and subscriber counts of a list.
- [GET /lists/tweets](https://www.twittrapi.com/docs/reference/lists-tweets.md): List tweets. Tweets from the members of a list, newest first.
- [GET /lists/members](https://www.twittrapi.com/docs/reference/lists-members.md): List members. Accounts that are members of a list.
- [GET /lists/followers](https://www.twittrapi.com/docs/reference/lists-followers.md): List followers. Accounts that follow (subscribe to) a list.

## Communities

Search communities, read details, members, moderators and tweets.

- [GET /communities/search/{searchTerm}](https://www.twittrapi.com/docs/reference/communities-search-searchterm.md): Search communities. Find X Communities by keyword.
- [GET /communities/{communityId}](https://www.twittrapi.com/docs/reference/communities-communityid.md): Community details. Name, description, rules, member count and admins of a community.
- [GET /communities/{communityId}/tweets](https://www.twittrapi.com/docs/reference/communities-communityid-tweets.md): Community tweets. Tweets posted in a community.
- [GET /communities/{communityId}/members](https://www.twittrapi.com/docs/reference/communities-communityid-members.md): Community members. Members of a community.
- [GET /communities/{communityId}/members/search](https://www.twittrapi.com/docs/reference/communities-communityid-members-search.md): Search community members. Find members of a community whose handle matches a text.
- [GET /communities/{communityId}/moderators](https://www.twittrapi.com/docs/reference/communities-communityid-moderators.md): Community moderators. Moderators and admins of a community.

## Jobs

Search job listings posted on X.

- [GET /jobs/search/{searchTerm}](https://www.twittrapi.com/docs/reference/jobs-search-searchterm.md): Search jobs. Job listings posted on X, by keyword.
- [GET /jobs/{jobId}](https://www.twittrapi.com/docs/reference/jobs-jobid.md): Job details. One job listing by ID.
- [GET /jobs/find-location/{term}](https://www.twittrapi.com/docs/reference/jobs-find-location-term.md): Find job location. Location IDs for the jobLocationId filter of job search. Returns up to 10 matches.

## Trends

Trending topics by location (WOEID).

- [GET /trends/{locationId}](https://www.twittrapi.com/docs/reference/trends-locationid.md): Trends by location. Current trending topics for a place, by WOEID.
- [GET /misc/locations](https://www.twittrapi.com/docs/reference/misc-locations.md): Trend locations. All places X has trends for, with their WOEIDs.

## Misc

Hashflags (hashtags with a custom emoji).

- [GET /misc/emojis](https://www.twittrapi.com/docs/reference/misc-emojis.md): Hashflags. X's hashflags: hashtags that show a custom emoji, with image URLs and active dates.
