Skip to content

Get a user's tweet+reply timeline

GET
/twitter/user/tweet_timeline
const url = 'https://api.relayxapi.com/twitter/user/tweet_timeline?userId=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 a user’s full timeline including replies — the same mix the profile’s posts-and-replies tab shows.

userId
required
Userid
string
cursor
Cursor
string
includeReplies
Includereplies
boolean
default: true
includeParentTweet
Includeparenttweet
boolean
x-api-key
X-Api-Key
string

Successful Response

Media typeapplication/json
Example
{
"tweets": [
{
"type": "tweet",
"id": "1900000000000000003",
"url": "https://x.com/i/status/1900000000000000003",
"text": "Example post text.",
"retweetCount": 2,
"replyCount": 2,
"likeCount": 40,
"quoteCount": 0,
"viewCount": "3796",
"bookmarkCount": 1,
"createdAt": "Thu Sep 24 00:53:30 +0000 2026",
"lang": "en",
"isReply": false,
"inReplyToId": null,
"conversationId": "1900000000000000003",
"displayTextRange": null,
"entities": null,
"quoted_tweet": null,
"author": {
"type": "user",
"userName": "example_user10",
"url": "https://x.com/example_user10",
"id": "1000000000000000010",
"name": "Example User 10",
"isBlueVerified": false,
"description": "Example bio.",
"location": "",
"followers": 845,
"following": 99,
"statusesCount": null,
"createdAt": "Wed Jan 27 14:48:03 +0000 2010",
"profilePicture": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg",
"coverPicture": null,
"canDm": false,
"pinnedTweetIds": [],
"profile_bio": null
}
},
{
"type": "tweet",
"id": "2103215186870239252",
"url": "https://x.com/i/status/2103215186870239252",
"text": "@example_user Beautiful!",
"retweetCount": 1,
"replyCount": 1,
"likeCount": 16,
"quoteCount": 0,
"viewCount": "2847",
"bookmarkCount": 0,
"createdAt": "Thu Sep 24 20:09:11 +0000 2026",
"lang": "en",
"isReply": false,
"inReplyToId": null,
"conversationId": null,
"displayTextRange": [
16,
26
],
"entities": {
"hashtags": [],
"symbols": [],
"urls": [],
"user_mentions": [
{
"id_str": "190000001",
"indices": [
0,
15
],
"name": "Example User",
"screen_name": "example_user"
}
],
"media": []
},
"quoted_tweet": null,
"author": {
"type": "user",
"userName": "NASA",
"url": "https://x.com/NASA",
"id": "11348282",
"name": "NASA",
"isBlueVerified": true,
"description": "Making the seemingly impossible, possible. ✨",
"location": null,
"followers": 92374422,
"following": 117,
"statusesCount": null,
"createdAt": "Wed Dec 19 20:20:32 +0000 2007",
"profilePicture": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
"coverPicture": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"canDm": false,
"pinnedTweetIds": [],
"profile_bio": {
"description": "Making the seemingly impossible, possible. ✨",
"entities": {
"description": {}
}
}
}
}
],
"status": "success",
"message": "",
"has_next_page": true,
"next_cursor": "DAABCgABHTER3Wo__-oKAAIdD33tMtdhsggAAwAAAAIAAA"
}

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"
}
]
}