Users
User Mentions
Fetch recent tweets that mention a Twitter user via API. $0.001 per call, ~20 tweets per call — just $0.05 per 1,000 mentions. GetXAPI user mentions endpoint.
GET
/twitter/user/mentionsThis endpoint costs $0.001 per API call and returns ~20 tweets per page.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userName | string | Yes | Screen name (without @) — fetches tweets that mention this user |
cursor | string | No | Pagination cursor from previous response |
Notes
- Returns tweets that mention
@userName(authored by other users), most recent first. - Tweet objects have the same shape as
/twitter/user/tweets(includesentities,media,author, etc.). - Pagination via
next_cursoruntilhas_moreisfalse.
Response (200)
{
"userName": "elonmusk",
"tweet_count": 20,
"has_more": true,
"next_cursor": "DAADDAABCgABH...",
"tweets": [
{
"type": "tweet",
"id": "2047800000000000000",
"url": "https://x.com/someuser/status/2047800000000000000",
"twitterUrl": "https://twitter.com/someuser/status/2047800000000000000",
"text": "@elonmusk thanks for the update",
"source": "Twitter Web App",
"retweetCount": 0,
"replyCount": 1,
"likeCount": 4,
"quoteCount": 0,
"viewCount": 120,
"createdAt": "Fri Apr 25 12:34:56 +0000 2026",
"lang": "en",
"bookmarkCount": 0,
"isReply": false,
"inReplyToId": null,
"conversationId": "2047800000000000000",
"media": [],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{ "id_str": "44196397", "indices": [0, 9], "name": "Elon Musk", "screen_name": "elonmusk" }
]
},
"author": {
"type": "user",
"userName": "someuser",
"url": "https://x.com/someuser",
"id": "1234567890",
"name": "Some User",
"isVerified": false,
"isBlueVerified": false,
"profilePicture": "https://pbs.twimg.com/profile_images/.../abc_normal.jpg",
"followers": 412,
"following": 188,
"createdAt": "Tue Jan 04 11:12:13 +0000 2022"
},
"quoted_tweet": null
}
]
}Error Responses
400 - Missing param
{
"error": "Missing required query param: userName"
}Example
# Fresh
curl -H "Authorization: Bearer API_KEY" \
"https://api.getxapi.com/twitter/user/mentions?userName=elonmusk"
# With pagination
curl -H "Authorization: Bearer API_KEY" \
"https://api.getxapi.com/twitter/user/mentions?userName=elonmusk&cursor=DAADDAABCgABH..."User Tweets and Replies
Fetch tweets and replies posted by a Twitter user via API. $0.001 per call, ~20 results per call. GetXAPI tweets and replies endpoint.
User Likes
Fetch a Twitter user's liked tweets via API. $0.001 per call, ~20 tweets per call — just $0.05 per 1,000 tweets. GetXAPI user likes endpoint.