Get tweet thread context
GET
/twitter/tweet/thread_context
const url = 'https://api.relayxapi.com/twitter/tweet/thread_context?tweetId=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);}curl --request GET \ --url 'https://api.relayxapi.com/twitter/tweet/thread_context?tweetId=example' \ --header 'X-API-Key: <api-key>'import requests
res = requests.get( "https://api.relayxapi.com/twitter/tweet/thread_context", params={"tweetId": "example"}, headers={"X-API-Key": "<api-key>"},)print(res.json())Return a post together with its ancestors and replies, so you can rebuild the whole conversation thread.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”tweetId
required
Tweetid
string
cursor
Cursor
string
Header Parameters
Section titled “Header Parameters”x-api-key
X-Api-Key
string
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
Example
{ "replies": [ { "type": "tweet", "id": "1900000000000000008", "url": "https://x.com/i/status/1900000000000000008", "text": "Example post text.", "retweetCount": 0, "replyCount": 0, "likeCount": 5, "quoteCount": 0, "viewCount": "902", "bookmarkCount": 0, "createdAt": "Fri Sep 25 00:39:54 +0000 2026", "lang": "en", "isReply": false, "inReplyToId": null, "conversationId": "1900000000000000008", "displayTextRange": null, "entities": null, "quoted_tweet": null, "author": { "type": "user", "userName": "example_user17", "url": "https://x.com/example_user17", "id": "1000000000000000017", "name": "Example User 17", "isBlueVerified": true, "description": "Example bio.", "location": "", "followers": 192711, "following": 604, "statusesCount": null, "createdAt": "Mon Jan 15 18:50:00 +0000 2018", "profilePicture": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg", "coverPicture": null, "canDm": true, "pinnedTweetIds": [], "profile_bio": null } }, { "type": "tweet", "id": "1900000000000000009", "url": "https://x.com/i/status/1900000000000000009", "text": "Example post text.", "retweetCount": 1, "replyCount": 2, "likeCount": 3, "quoteCount": 0, "viewCount": "2872", "bookmarkCount": 0, "createdAt": "Thu Sep 24 22:24:21 +0000 2026", "lang": "en", "isReply": false, "inReplyToId": null, "conversationId": "1900000000000000009", "displayTextRange": null, "entities": null, "quoted_tweet": null, "author": { "type": "user", "userName": "example_user18", "url": "https://x.com/example_user18", "id": "1000000000000000018", "name": "Example User 18", "isBlueVerified": true, "description": "Example bio.", "location": "", "followers": 5242, "following": 4555, "statusesCount": null, "createdAt": "Sat Jan 21 00:51:56 +0000 2017", "profilePicture": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg", "coverPicture": null, "canDm": true, "pinnedTweetIds": [], "profile_bio": null } } ], "has_next_page": false, "next_cursor": "", "status": "success", "message": ""}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}