Twitter Tweet Details
Get detailed information for a single tweet by its ID. Returns the full tweet content, engagement metrics, author info, and metadata.
Endpoint
GET /v1/twitter/tweet
Price: $0.006 per request Free tier: 50 requests/month
Parameters
| Parameter | Required | Description |
|---|---|---|
tweet_id |
Yes | Numeric tweet ID |
get_sentiment |
No | Set to true to add AI emotion analysis (Plutchik’s Wheel) to each result. Adds +$0.001 per request to the cost. Returns emotion scores, dominant emotion, intensity, and polarity. |
Response Fields
| Field | Type | Description |
|---|---|---|
tweet |
object | Tweet data |
tweet.title |
string | Tweet title (format: @username on X) |
tweet.url |
string | Direct link to the tweet |
tweet.date |
string | Publication date and time |
tweet.author |
string | Twitter username |
tweet.source |
string | "Twitter (X)" |
tweet.domain |
string | "x.com" |
tweet.snippet |
string | Tweet content text |
tweet.likes |
integer | Number of likes |
tweet.retweets |
integer | Number of retweets |
tweet.replies |
integer | Number of replies |
tweet.quotes |
integer | Number of quote tweets |
tweet.bookmarks |
integer | Number of bookmarks |
tweet.views |
integer/null | Number of views |
tweet.author_followers |
integer | Author’s follower count |
tweet.author_verified |
boolean | Whether the author is verified |
tweet.lang |
string | Tweet language code |
tweet.is_reply |
boolean | Whether the tweet is a reply |
tweet.is_quote |
boolean | Whether the tweet is a quote tweet |
tweet.hashtags |
string[] | Hashtags used |
tweet.user_mentions |
string[] | Usernames mentioned |
tweet.sentiment |
object/null | Emotion analysis results. Only present when get_sentiment=true. Returns null if analysis fails. |
tweet.sentiment.emotions |
object | Plutchik emotion scores (0-100) for: joy, trust, fear, surprise, sadness, disgust, anger, anticipation. |
tweet.sentiment.dominant_emotion |
string | The emotion with the highest score. |
tweet.sentiment.emotional_intensity |
integer | Overall emotional intensity on a scale of 0-10. |
tweet.sentiment.polarity |
string | Overall sentiment polarity: positive, negative, or neutral. |
Example Request
cURL
curl "https://apidirect.io/v1/twitter/tweet?tweet_id=1631781099415257088" \
-H "X-API-Key: YOUR_API_KEY"
Python
import requests
response = requests.get(
"https://apidirect.io/v1/twitter/tweet",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"tweet_id": "1631781099415257088"}
)
print(response.json())
Example Response
{
"tweet": {
"title": "@username on X",
"url": "https://twitter.com/username/status/1631781099415257088",
"date": "2024-01-15 14:30:00",
"author": "username",
"source": "Twitter (X)",
"domain": "x.com",
"snippet": "Full tweet content here...",
"likes": 5000,
"retweets": 1200,
"replies": 300,
"quotes": 150,
"bookmarks": 800,
"views": 250000,
"author_followers": 50000,
"author_verified": true,
"lang": "en",
"is_reply": false,
"is_quote": false,
"hashtags": ["tech"],
"user_mentions": [],
"sentiment": {
"emotions": {
"joy": 40,
"trust": 55,
"fear": 0,
"surprise": 10,
"sadness": 0,
"disgust": 0,
"anger": 0,
"anticipation": 30
},
"dominant_emotion": "trust",
"emotional_intensity": 5,
"polarity": "positive"
}
}
}