How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

X Users API

Endpoints related to retrieving, managing relationships of Users — 42 operation(s) in the X-published contract.

X Users API is one of 23 APIs that X publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include User. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 44 operations across 38 paths, and defines 124 schemas. It is described by OpenAPI 3.2.0, at version 1.0.

Requests are made against 2 base URLs: https://api.x.com, https://api.x.com/2.

44 operations 38 paths 124 schemas 7 DELETE27 GET10 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.0
Base URL
https://api.x.com
Authentication
HTTP Bearer, OAuth 2.0, HTTP Oauth, HTTP Bearer
Resource Areas
1

Authentication & Security 4

X Users API declares 4 security schemes for authenticating requests. It accepts HTTP bearer tokens (BearerToken). It supports OAuth 2.0 (OAuth2UserToken) using the authorizationCode flow, exposing 26 scopes. It uses HTTP oauth authentication (UserToken). It accepts HTTP bearer tokens (JWT) (BearerAuth).

  • BearerAuth — App-only authentication using an OAuth 2.0 Bearer Token issued by the X Developer Platform, passed via the Authorization header.

Paths & Operations 44

Across 38 paths, the API surfaces 44 operations — 7 DELETE, 27 GET, 10 POST. Each is listed below with its method, path, parameters, and response codes.

Users 44

Endpoints related to retrieving, managing relationships of Users

GET
/2/users
Get Users by IDs
getUsersByIds 4 params → 200default
GET
/2/users/by
Get Users by Usernames
getUsersByUsernames 4 params → 200default
GET
/2/users/by/username/{username}
Get Users by Username
getUsersByUsername 4 params → 200default
GET
/2/users/me
Get Users Me
getUsersMe 3 params → 200default
GET
/2/users/public_keys
Get public keys
getUsersPublicKeys 2 params → 200default
GET
/2/users/reposts_of_me
Get Users Reposts of Me
getUsersRepostsOfMe 8 params → 200default
GET
/2/users/search
Search Users
searchUsers 6 params → 200default
GET
/2/users/{id}
Get Users by ID
getUsersById 4 params → 200default
GET
/2/users/{id}/affiliates
Get Users Affiliates
getUsersAffiliates 6 params → 200default
GET
/2/users/{id}/blocking
Get Users Blocking
getUsersBlocking 6 params → 200default
GET
/2/users/{id}/bookmarks
Get Users Bookmarks
getUsersBookmarks 9 params → 200default
POST
/2/users/{id}/bookmarks
Create Users Bookmark
createUsersBookmark 1 param body → 200default
GET
/2/users/{id}/bookmarks/folders
Get Users Bookmark Folders
getUsersBookmarkFolders 3 params → 200default
POST
/2/users/{id}/bookmarks/folders
Create Bookmark Folder
createUsersBookmarkFolder 1 param body → 201default
GET
/2/users/{id}/bookmarks/folders/{folder_id}
Get Users Bookmarks by Folder ID
getUsersBookmarksByFolderId 4 params → 200default
DELETE
/2/users/{id}/bookmarks/{tweet_id}
Delete Bookmark
deleteUsersBookmark 2 params → 200default
POST
/2/users/{id}/dm/block
Block Users Dms
blockUsersDms 1 param → 200default
POST
/2/users/{id}/dm/unblock
Unblock Users Dms
unblockUsersDms 1 param → 200default
GET
/2/users/{id}/followed_lists
Get Users Followed Lists
getUsersFollowedLists 6 params → 200default
POST
/2/users/{id}/followed_lists
Follow List
followList 1 param body → 200default
DELETE
/2/users/{id}/followed_lists/{list_id}
Unfollow a List
unfollowList 2 params → 200default
GET
/2/users/{id}/followers
Get Users Followers
getUsersFollowers 6 params → 200default
GET
/2/users/{id}/following
Get Users Following
getUsersFollowing 6 params → 200default
POST
/2/users/{id}/following
Follow User
followUser 1 param body → 200default
GET
/2/users/{id}/liked_tweets
Get Users Liked Posts
getUsersLikedPosts 9 params → 200default
POST
/2/users/{id}/likes
Like Post
likePost 1 param body → 200default
DELETE
/2/users/{id}/likes/{tweet_id}
Unlike Post
unlikePost 2 params → 200default
GET
/2/users/{id}/list_memberships
Get Users List Memberships
getUsersListMemberships 6 params → 200default
GET
/2/users/{id}/mentions
Get Users Mentions
getUsersMentions 13 params → 200default
GET
/2/users/{id}/muting
Get Users Muting
getUsersMuting 6 params → 200default
POST
/2/users/{id}/muting
Mute User
muteUser 1 param body → 200default
GET
/2/users/{id}/owned_lists
Get Users Owned Lists
getUsersOwnedLists 6 params → 200default
GET
/2/users/{id}/pinned_lists
Get Users Pinned Lists
getUsersPinnedLists 4 params → 200default
POST
/2/users/{id}/pinned_lists
Pin List
pinList 1 param body → 200default
DELETE
/2/users/{id}/pinned_lists/{list_id}
Unpin a List
unpinList 2 params → 200default
GET
/2/users/{id}/public_keys
Get public keys
getUsersPublicKey 2 params → 200default
POST
/2/users/{id}/retweets
Repost Post
repostPost 1 param body → 200default
DELETE
/2/users/{id}/retweets/{source_tweet_id}
Unrepost Post
unrepostPost 2 params → 200default
GET
/2/users/{id}/timelines/reverse_chronological
Get Users Timeline
getUsersTimeline 14 params → 200default
GET
/2/users/{id}/tweets
Get Users Posts
getUsersPosts 14 params → 200default
DELETE
/2/users/{source_user_id}/following/{target_user_id}
Unfollow User
unfollowUser 2 params → 200default
DELETE
/2/users/{source_user_id}/muting/{target_user_id}
Unmute User
unmuteUser 2 params → 200default
GET
/users/{id}
Look up a user by ID
getUserById 1 param → 200
GET
/users/by/username/{username}
Look up a user by username
getUserByUsername 1 param → 200

Schemas 124

The contract defines 124 schemas that model the data the API accepts and returns. The most detailed are Post (36 properties), User (28 properties), Media (13 properties), NotAuthorizedForFieldProblem (10 properties). Each schema is shown below with its type and property counts.

RepostPostResponse
object
2 properties
FieldHydrationFailureProblem
object
7 properties 4 required
CreateUsersBookmarkResponseData
object
1 property 1 required
DeleteUsersBookmarkResponseData
object
1 property 1 required
UnfollowListResponseData
object
1 property 1 required
PinListResponseData
object
1 property 1 required
Poll
object
5 properties
UnblockUsersDmsResponseData
object
1 property 1 required
UserWithheld
object
Withholding details for withheld content.
2 properties
Error
object
2 properties 2 required
GetUsersFollowersResponse
object
4 properties
ResourceUnavailableProblem
object
6 properties 4 required
UserEntities
object
A list of metadata found in the User's profile description.
2 properties
UnrepostPostResponseData
object
1 property 1 required
CreateUsersBookmarkRequest
object
2 properties 1 required
PostMediaMetadata
array
Metadata for media attached to this Post.
InternalErrorProblem
object
4 properties 3 required
SearchUsersResponse
object
4 properties
RepostPostRequest
object
1 property 1 required
PostEditControls
object
Indicates how much longer (if at all) this Post can be edited.
3 properties
UserAffiliation
object
Metadata about a user's affiliation.
4 properties
Problem
UnfollowUserResponse
object
2 properties
UserSubscription
object
The subscription relationship between this User and you.
1 property 1 required
GetUsersByUsernameResponse
object
3 properties
GetUsersTimelineResponse
object
4 properties
GetUsersFollowingResponse
object
4 properties
GetUsersByIdsResponse
object
3 properties
UnrepostPostResponse
object
2 properties
GetUsersOwnedListsResponse
object
4 properties
PostReferencedPosts
array
A list of Posts this Post refers to. If the Post is a Retweet, Quote or Reply, it includes the referenced Post's type and ID.
BlockUsersDmsResponse
object
2 properties
GetUsersBookmarksResponse
object
4 properties
UnblockUsersDmsResponse
object
2 properties
PostNotePost
object
The full content of the Post, including text beyond 280 characters.
2 properties 1 required
UserId
string
Unique identifier of a User
GetUsersRepostsOfMeResponse
object
4 properties
PostScopes
object
The scopes for this Post.
1 property 1 required
LikePostResponseData
object
1 property 1 required
DisallowedResourceProblem
object
7 properties 3 required
PostSuggestedSourceLinksWithCounts
array
Suggested source URLs for this Post, each with the number of times it was suggested.
GetUsersFollowedListsResponse
object
4 properties
GetUsersPublicKeysResponse
object
2 properties
GetUsersBookmarksByFolderIdResponse
object
2 properties
Topic
object
3 properties
UnmuteUserResponse
object
2 properties
MuteUserResponseData
object
1 property 1 required
PlaceContainedWithin
array
A list of unique identifiers of the Places that contain this place.
MediaPublicMetrics
object
Public engagement metrics for the media at the time of the request.
1 property 1 required
ListMemberCount
integer
The number of members in this List.
ListFollowerCount
integer
The number of users who follow this List.
PublicKeyId
string
Unique identifier of a PublicKey
PostDisplayTextRange
array
The inclusive start and exclusive end indices of the displayable content of the Post.
Expansions
object
6 properties
GetUsersListMembershipsResponse
object
4 properties
ListId
string
Unique identifier of a List
PostGeo
object
The location tagged on the Post, if the user provided one.
2 properties
LikePostResponse
object
2 properties
List
object
8 properties
FollowListRequest
object
1 property 1 required
GetUsersPublicKeyResponse
object
2 properties
PostEntities
object
A list of metadata entities (hashtags, mentions, URLs) found in the Post text.
4 properties
MediaVariants
array
Each media object may have multiple display or playback variants, with different resolutions or formats.
UnfollowUserResponseData
object
1 property 1 required
CreateUsersBookmarkResponse
object
2 properties
NotAuthorizedForFieldProblem
object
10 properties 4 required
PostNoteRequestSuggestions
array
Community-Notes request suggestions for this Post.
MediaPromotedMetrics
object
Promoted nonpublic engagement metrics for the media at the time of the request.
6 properties
GetUsersMeResponse
object
3 properties
GetUsersPinnedListsResponse
object
4 properties
User
object
28 properties
FollowListResponse
object
2 properties
UserPublicMetrics
object
A list of metrics for this User.
6 properties 4 required
UnmuteUserResponseData
object
1 property 1 required
Place
object
8 properties
GetUsersAffiliatesResponse
object
4 properties
GetUsersBookmarkFoldersResponseData
object
2 properties 2 required
UnpinListResponse
object
2 properties
FollowListResponseData
object
1 property 1 required
BlockUsersDmsResponseData
object
1 property 1 required
PublicKey
object
5 properties
GetUsersLikedPostsResponse
object
4 properties
DeleteUsersBookmarkResponse
object
2 properties
PostPublicMetrics
object
Engagement metrics for the Post at the time of the request.
6 properties 6 required
GetUsersMutingResponse
object
4 properties
Media
object
13 properties
PostId
string
Unique identifier of a Post
UnlikePostResponse
object
2 properties
PinListRequest
object
1 property 1 required
MuteUserRequest
object
1 property 1 required
CreateUsersBookmarkFolderRequest
object
1 property 1 required
PostSuggestedSourceLinks
array
URLs suggested as sources for this Post.
NotAuthorizedForResourceProblem
object
9 properties 4 required
FollowUserResponse
object
2 properties
LikePostRequest
object
1 property 1 required
GetUsersPostsResponse
object
4 properties
FollowUserResponseData
object
2 properties 2 required
MediaNonPublicMetrics
object
Nonpublic engagement metrics for the media at the time of the request.
5 properties
GetUsersBookmarkFoldersResponse
object
2 properties
UserConnectionStatus
array
Returns detailed information about the relationship between two users.
PinListResponse
object
2 properties
MuteUserResponse
object
2 properties
Post
object
36 properties
InvalidRequestProblem
object
6 properties 3 required
CreateUsersBookmarkFolderResponseData
object
2 properties 2 required
PostAttachments
object
Specifies the type of attachments (if any) present in this Post.
3 properties
GetUsersBlockingResponse
object
4 properties
PostContextAnnotations
array
Annotations inferred about the Post (domain and entity context).
PollOptions
array
The list of options (choices) available in this poll.
RepostPostResponseData
object
2 properties 2 required
CreateUsersBookmarkFolderResponse
object
2 properties
UnpinListResponseData
object
1 property 1 required
PlaceGeo
object
The geographic location of this place, expressed as a GeoJSON Feature.
3 properties 3 required
GetUsersByIdResponse
object
3 properties
UnfollowListResponse
object
2 properties
UnlikePostResponseData
object
1 property 1 required
PostWithheld
object
Withholding details for withheld content.
3 properties 2 required
MediaOrganicMetrics
object
Organic nonpublic engagement metrics for the media at the time of the request.
6 properties
ResourceNotFoundProblem
object
8 properties 4 required
PostMatchedMediaNotes
array
Community-Notes media matches for this Post.
GetUsersByUsernamesResponse
object
3 properties
FieldUnauthorizedProblem
object
7 properties 4 required
GetUsersMentionsResponse
object
4 properties
FollowUserRequest
object
1 property 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

x-users-api-openapi.yml Raw ↑

Other APIs X publishes across the network.

X Account Activity API
X Account API
X Activity API
X Articles API
X Bots API
X Broadcasts API
X Chat API
X Communities API
X Community Notes API
X Compliance API
X Connections API
X Direct Messages API
Where this information came from

This is an independent, third-party profile of X Users API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.