Get Tweet by ID

GET

Get a specific tweet by its ID

GET /api/v1/twitter/tweets/:tweetId

Authorization

X-API-Key
string
required

Parameters

NameTypeRequiredDescription
tweetIdstring
required
The ID of the tweet to retrieve

Example Request

curl -X GET \
"https://api.xscraper.xyz/api/v1/twitter/tweets/1722715025402413077" \
-H "X-API-Key: "

Response

Tweet
application/json
{
  "data": {
    "id": "1722715025402413077",
    "text": "This is a sample tweet",
    "username": "elonmusk",
    "name": "Elon Musk",
    "userId": "44196397",
    "likes": 50000,
    "replies": 5000,
    "retweets": 10000,
    "views": 2000000,
    "timeParsed": "2025-04-18T15:30:00.000Z",
    "hashtags": ["sample", "tweet"],
    "mentions": [],
    "photos": [
      {
        "id": "1722715025402413078",
        "url": "https://pbs.twimg.com/media/sample-image.jpg",
        "alt_text": "Sample image description"
      }
    ],
    "videos": [],
    "urls": [],
    "isReply": false,
    "isRetweet": false,
    "isQuoted": false,
    "html": "

This is a sample tweet

#sample #tweet

" }, "meta": { "statusCode": 200, "timestamp": "2025-04-19T15:49:28.824Z" } }

Error Responses

401 Unauthorized
{
  "statusCode": 401,
  "timestamp": "2025-04-19T15:49:28.824Z",
  "path": "/api/v1/twitter/tweets/1722715025402413077",
  "method": "GET",
  "message": "Invalid or expired API key"
}
404 Not Found
{
  "statusCode": 404,
  "timestamp": "2025-04-19T15:49:28.824Z",
  "path": "/api/v1/twitter/tweets/nonexistenttweetid",
  "method": "GET",
  "message": "Tweet not found"
}