Endpoints
| Endpoint | Returns 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}/aboutAccount information | Account information · $0.001 per request |
GET /v1/users/{username}/tweetsPosts | Page of posts · $0.10 per 1,000 records |
GET /v1/users/{username}/posts-and-repliesPosts and replies | Page of posts · $0.10 per 1,000 records |
GET /v1/users/{username}/mediaMedia | Page of posts · $0.10 per 1,000 records |
GET /v1/users/by-id/{userId}/followersFollowers | Page of accounts · $0.01 per 1,000 accounts |
GET /v1/users/by-id/{userId}/verified-followersVerified followers | Page of accounts · $0.05 per 1,000 accounts |
GET /v1/users/by-id/{userId}/followingFollowing | Page of accounts · $0.01 per 1,000 accounts |
GET /v1/users/by-id/{userId}/subscriptionsCreator 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
idfrom a profile. - Posts, Posts and replies, and Media read separate tabs of the account.
GET/v1/users/{username}Account
Profile by username
One public account by username.
| Parameter | In | Description |
|---|---|---|
username requiredstring | path | Username without @. Letters, numbers and underscores, up to 30 characters. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Account · Price: $0.001 per request
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.
| Parameter | In | Description |
|---|---|---|
userId requirednumeric string | path | Numeric X user ID. Get it from the id field of a profile. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Account · Price: $0.001 per request
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.
| Parameter | In | Description |
|---|---|---|
username requiredstring | path | Username without @. Letters, numbers and underscores, up to 30 characters. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Account information · Price: $0.001 per request
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.
| Parameter | In | Description |
|---|---|---|
username requiredstring | path | Username without @. Letters, numbers and underscores, up to 30 characters. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of posts · Price: $0.10 per 1,000 records
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.
| Parameter | In | Description |
|---|---|---|
username requiredstring | path | Username without @. Letters, numbers and underscores, up to 30 characters. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of posts · Price: $0.10 per 1,000 records
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.
| Parameter | In | Description |
|---|---|---|
username requiredstring | path | Username without @. Letters, numbers and underscores, up to 30 characters. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of posts · Price: $0.10 per 1,000 records
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.
| Parameter | In | Description |
|---|---|---|
userId requirednumeric string | path | Numeric X user ID. Get it from the id field of a profile. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of accounts · Price: $0.01 per 1,000 accounts
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.
| Parameter | In | Description |
|---|---|---|
userId requirednumeric string | path | Numeric X user ID. Get it from the id field of a profile. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of accounts · Price: $0.05 per 1,000 accounts
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.
| Parameter | In | Description |
|---|---|---|
userId requirednumeric string | path | Numeric X user ID. Get it from the id field of a profile. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of accounts · Price: $0.01 per 1,000 accounts
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.
| Parameter | In | Description |
|---|---|---|
userId requirednumeric string | path | Numeric X user ID. Get it from the id field of a profile. |
cursorstring | query | Value of pagination.next_cursor from the previous page. Omit for the first page. |
levelraw | moderate | contentful | query | Response level. Defaults to moderate. |
Returns: Page of accounts · Price: $0.01 per 1,000 accounts
curl "https://twitterxapi.com/api/v1/users/by-id/2311987360/subscriptions" \
-H "Authorization: Bearer $TWITTERXAPI_KEY"