Get tweets by ids
GET
/twitter/tweets
const url = 'https://api.relayxapi.com/twitter/tweets?tweet_ids=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/tweets?tweet_ids=example' \ --header 'X-API-Key: <api-key>'import requests
res = requests.get( "https://api.relayxapi.com/twitter/tweets", params={"tweet_ids": "example"}, headers={"X-API-Key": "<api-key>"},)print(res.json())Hydrate many post ids into full post objects in one call, including author, metrics and media.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”tweet_ids
required
Tweet Ids
Comma-separated tweet ids
string
Comma-separated tweet ids
Header Parameters
Section titled “Header Parameters”x-api-key
X-Api-Key
string
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
Example
{ "status": "success", "message": "", "tweets": [ { "type": "tweet", "id": "2103243305685225779", "url": "https://x.com/i/status/2103243305685225779", "text": "Welcome to the Artemis Accords, Côte d'Ivoire 🇨🇮\n \nCôte d'Ivoire is the 75th country to sign the Artemis Accords. In doing so, they commit to a common set of principles for a safe, peaceful, and prosperous future in space. https://t.co/lT9f9Kooo2 https://t.co/9Wf1T1ndGz", "retweetCount": 281, "replyCount": 109, "likeCount": 2490, "quoteCount": 24, "viewCount": "665904", "bookmarkCount": 190, "createdAt": "Thu Sep 24 22:00:55 +0000 2026", "lang": "en", "isReply": false, "inReplyToId": null, "conversationId": null, "displayTextRange": [ 0, 246 ], "entities": { "hashtags": [], "symbols": [], "urls": [ { "display_url": "go.nasa.gov/3V1mgyS", "expanded_url": "https://go.nasa.gov/3V1mgyS", "indices": [ 223, 246 ], "url": "https://t.co/lT9f9Kooo2" } ], "user_mentions": [], "media": [ { "display_url": "pic.x.com/9Wf1T1ndGz", "expanded_url": "https://x.com/NASA/status/2103243305685225779/photo/1", "features": {}, "id_str": "2103243297779003393", "indices": [ 247, 270 ], "media_results": { "id": "QXBpTWVkaWFSZXN1bHRzOgwAAQoAAR0wOKLIVrABCgACHTA4pJ+WETMAAA==", "result": { "__typename": "ApiMedia", "id": "QXBpTWVkaWE6DAABCgABHTA4oshWsAEKAAIdMDikn5YRMwAA", "media_availability_v2": { "status": "Available" }, "media_id": "2103243297779003393", "media_info": { "__typename": "ApiImage", "alt_text": "A graphic featuring the names and flags of the countries which have signed the Artemis Accords. \"ARTEMIS ACCORDS\" is written at the top.", "color_info": { "palette": [ { "percentage": 71.19, "rgb": { "blue": 22, "green": 11, "red": 4 } }, { "percentage": 3.19, "rgb": { "blue": 215, "green": 209, "red": 211 } } ] }, "original_img_height": 3375, "original_img_url": "https://pbs.twimg.com/media/HTA4oshWsAEdzZL.jpg", "original_img_width": 6000 } } }, "url": "https://t.co/9Wf1T1ndGz" } ] }, "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": {} } } } } ]}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" } ]}