tx twitterxapi.com docs

API reference

Users

Profiles, timelines, followers, following, and subscriptions.

GET

Profile by username

/v1/users/{username}

Get one public account by username.

curl "https://twitterxapi.com/api/v1/users/marclou?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Profile by ID

/v1/users/by-id/{userId}

Get one public account by its numeric X ID.

curl "https://twitterxapi.com/api/v1/users/by-id/44196397?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Account information

/v1/users/{username}/about

Get location, username changes, verification dates, and public transparency fields.

curl "https://twitterxapi.com/api/v1/users/marclou/about?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Posts

/v1/users/{username}/tweets?cursor={cursor}

Get one page from an account's Posts tab.

curl "https://twitterxapi.com/api/v1/users/marclou/tweets?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Posts and replies

/v1/users/{username}/posts-and-replies?cursor={cursor}

Get one page from an account's Replies tab, including its posts.

curl "https://twitterxapi.com/api/v1/users/marclou/posts-and-replies?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Media

/v1/users/{username}/media?cursor={cursor}

Get one page of posts containing a photo, video, or animated image.

curl "https://twitterxapi.com/api/v1/users/marclou/media?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Followers

/v1/users/by-id/{userId}/followers?cursor={cursor}

Get one page of accounts that follow the user.

curl "https://twitterxapi.com/api/v1/users/by-id/44196397/followers?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Verified followers

/v1/users/by-id/{userId}/verified-followers?cursor={cursor}

Get one page of the user's verified followers.

curl "https://twitterxapi.com/api/v1/users/by-id/44196397/verified-followers?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Following

/v1/users/by-id/{userId}/following?cursor={cursor}

Get one page of accounts the user follows.

curl "https://twitterxapi.com/api/v1/users/by-id/44196397/following?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"
GET

Creator subscriptions

/v1/users/by-id/{userId}/subscriptions?cursor={cursor}

Get one page of the user's creator subscriptions.

curl "https://twitterxapi.com/api/v1/users/by-id/44196397/subscriptions?level=moderate" \
  -H "Authorization: Bearer $TWITTERXAPI_KEY"