Docs menu: Users

Users

Read public X profiles, account timelines, followers, following and creator subscriptions.

Endpoints

EndpointReturns and price
GET /v1/users/{username}
Profile by username
Account
· $0.001 per request
GET /v1/users/by-id/{userId}
Profile by ID
Account
· $0.001 per request
GET /v1/users/{username}/about
Account information
Account information
· $0.001 per request
GET /v1/users/{username}/tweets
Posts
Page of posts
· $0.10 per 1,000 records
GET /v1/users/{username}/posts-and-replies
Posts and replies
Page of posts
· $0.10 per 1,000 records
GET /v1/users/{username}/media
Media
Page of posts
· $0.10 per 1,000 records
GET /v1/users/by-id/{userId}/followers
Followers
Page of accounts
· $0.01 per 1,000 accounts
GET /v1/users/by-id/{userId}/verified-followers
Verified followers
Page of accounts
· $0.05 per 1,000 accounts
GET /v1/users/by-id/{userId}/following
Following
Page of accounts
· $0.01 per 1,000 accounts
GET /v1/users/by-id/{userId}/subscriptions
Creator subscriptions
Page of accounts
· $0.01 per 1,000 accounts

All routes take Authorization: Bearer $TWITTERXAPI_KEY and level. Collections return one page; continue with the cursor.

Username or ID

  • Profile and timeline routes take a username without @. Follower, following and subscription routes take the numeric id from a profile.
  • Posts, Posts and replies, and Media read separate tabs of the account.

Download every follower

GET/v1/users/{username}Account

Profile by username

One public account by username.

ParameterInDescription
username required
string
pathUsername without @. Letters, numbers and underscores, up to 30 characters.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Account · Price: $0.001 per request

cURL
curl "https://twitterxapi.com/api/v1/users/marclou" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/by-id/{userId}Account

Profile by ID

One public account by numeric ID. Use it when usernames may have changed.

ParameterInDescription
userId required
numeric string
pathNumeric X user ID. Get it from the id field of a profile.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Account · Price: $0.001 per request

cURL
curl "https://twitterxapi.com/api/v1/users/by-id/2311987360" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/{username}/aboutAccount information

Account information

Transparency details shown on the account's About page, such as the country it is based in, username changes and verification dates when X provides them.

ParameterInDescription
username required
string
pathUsername without @. Letters, numbers and underscores, up to 30 characters.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Account information · Price: $0.001 per request

cURL
curl "https://twitterxapi.com/api/v1/users/marclou/about" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/{username}/tweetsPage of posts

Posts

One page from the account's Posts tab.

ParameterInDescription
username required
string
pathUsername without @. Letters, numbers and underscores, up to 30 characters.
cursor
string
queryValue of pagination.next_cursor from the previous page. Omit for the first page.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Page of posts · Price: $0.10 per 1,000 records

cURL
curl "https://twitterxapi.com/api/v1/users/marclou/tweets" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/{username}/posts-and-repliesPage of posts

Posts and replies

One page from the account's Replies tab, which includes its posts.

ParameterInDescription
username required
string
pathUsername without @. Letters, numbers and underscores, up to 30 characters.
cursor
string
queryValue of pagination.next_cursor from the previous page. Omit for the first page.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Page of posts · Price: $0.10 per 1,000 records

cURL
curl "https://twitterxapi.com/api/v1/users/marclou/posts-and-replies" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/{username}/mediaPage of posts

Media

One page of the account's posts that contain a photo, video or GIF.

ParameterInDescription
username required
string
pathUsername without @. Letters, numbers and underscores, up to 30 characters.
cursor
string
queryValue of pagination.next_cursor from the previous page. Omit for the first page.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Page of posts · Price: $0.10 per 1,000 records

cURL
curl "https://twitterxapi.com/api/v1/users/marclou/media" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/by-id/{userId}/followersPage of accounts

Followers

One page of accounts that follow the user.

ParameterInDescription
userId required
numeric string
pathNumeric X user ID. Get it from the id field of a profile.
cursor
string
queryValue of pagination.next_cursor from the previous page. Omit for the first page.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Page of accounts · Price: $0.01 per 1,000 accounts

cURL
curl "https://twitterxapi.com/api/v1/users/by-id/2311987360/followers" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/by-id/{userId}/verified-followersPage of accounts

Verified followers

One page of the user's verified followers.

ParameterInDescription
userId required
numeric string
pathNumeric X user ID. Get it from the id field of a profile.
cursor
string
queryValue of pagination.next_cursor from the previous page. Omit for the first page.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Page of accounts · Price: $0.05 per 1,000 accounts

cURL
curl "https://twitterxapi.com/api/v1/users/by-id/2311987360/verified-followers" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/by-id/{userId}/followingPage of accounts

Following

One page of accounts the user follows.

ParameterInDescription
userId required
numeric string
pathNumeric X user ID. Get it from the id field of a profile.
cursor
string
queryValue of pagination.next_cursor from the previous page. Omit for the first page.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Page of accounts · Price: $0.01 per 1,000 accounts

cURL
curl "https://twitterxapi.com/api/v1/users/by-id/2311987360/following" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET/v1/users/by-id/{userId}/subscriptionsPage of accounts

Creator subscriptions

One page of creators the user subscribes to.

ParameterInDescription
userId required
numeric string
pathNumeric X user ID. Get it from the id field of a profile.
cursor
string
queryValue of pagination.next_cursor from the previous page. Omit for the first page.
level
raw | moderate | contentful
queryResponse level. Defaults to moderate.

Returns: Page of accounts · Price: $0.01 per 1,000 accounts

cURL
curl "https://twitterxapi.com/api/v1/users/by-id/2311987360/subscriptions" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"