Skip to content

Get tweets mentioning a user

GET
/twitter/user/mentions
const url = 'https://api.relayxapi.com/twitter/user/mentions?userName=example';
const options = {
method: 'GET',
headers: { 'X-API-Key': '<api-key>' },
};
try {
const res = await fetch(url, options);
const data = await res.json();
console.log(data);
} catch (err) {
console.error(err);
}

Return posts that mention a user, newest first — the account’s inbound conversation.

userName
required
Username
string
cursor
Cursor
string
x-api-key
X-Api-Key
string

Successful Response

Media typeapplication/json
Example
{
"tweets": [
{
"type": "tweet",
"id": "1900000000000000001",
"url": "https://x.com/i/status/1900000000000000001",
"text": "Example post text.",
"retweetCount": 0,
"replyCount": 0,
"likeCount": 0,
"quoteCount": 0,
"viewCount": null,
"bookmarkCount": 0,
"createdAt": "Fri Sep 25 13:49:48 +0000 2026",
"lang": "en",
"isReply": false,
"inReplyToId": null,
"conversationId": "1900000000000000001",
"displayTextRange": null,
"entities": null,
"quoted_tweet": null,
"author": {
"type": "user",
"userName": "example_user7",
"url": "https://x.com/example_user7",
"id": "1000000000000000007",
"name": "Example User 7",
"isBlueVerified": true,
"description": "Example bio.",
"location": "",
"followers": 4760,
"following": 59,
"statusesCount": null,
"createdAt": "Wed Oct 02 13:32:57 +0000 2024",
"profilePicture": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg",
"coverPicture": null,
"canDm": false,
"pinnedTweetIds": [],
"profile_bio": null
}
},
{
"type": "tweet",
"id": "1900000000000000002",
"url": "https://x.com/i/status/1900000000000000002",
"text": "Example post text.",
"retweetCount": 0,
"replyCount": 0,
"likeCount": 1,
"quoteCount": 0,
"viewCount": "5",
"bookmarkCount": 0,
"createdAt": "Fri Sep 25 13:48:41 +0000 2026",
"lang": "fr",
"isReply": false,
"inReplyToId": null,
"conversationId": "1900000000000000002",
"displayTextRange": null,
"entities": null,
"quoted_tweet": null,
"author": {
"type": "user",
"userName": "example_user8",
"url": "https://x.com/example_user8",
"id": "1000000000000000008",
"name": "Example User 8",
"isBlueVerified": true,
"description": "Example bio.",
"location": "",
"followers": 68,
"following": 50,
"statusesCount": null,
"createdAt": "Mon Aug 10 16:32:46 +0000 2026",
"profilePicture": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg",
"coverPicture": null,
"canDm": true,
"pinnedTweetIds": [],
"profile_bio": null
}
}
],
"status": "success",
"message": "",
"has_next_page": true,
"next_cursor": "DAADDAABCgABHTER05VbYGgKAAIdMQfmwpegMgAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUdMRHZ0wAnEAoABh0xEdnS_9jwCwAHAAAA8EVtUEM2d0FBQWZRL2dHSk4wdkdwL0FBQUFCUWRNUW9kNVpiZ0FCMHhEb005VmlFVEhURVFRNWhiTVFjZE1SRjlHSlpRUkIweEVaSnAydUVGSFRFSWRxQmJnSHdkTVFqazVKYVJ6QjB4RU1BeEd5R3dIVEVOc09OYndSNGRNUTltenhkUXVoMHhETThqV3NFS0hURVIwNVZiWUdnZE1RbkJ0aGRBSWgweEIrYkNsNkF5SFRFUHNqOWFnQTRkTVJFcXE1dHdvaDB4REtLa2w1QUxIVEVRUTNWYlVBa2RNUkZ2S0ZaaFFSMHhDL3VjbHJIUQAA"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}