Get tweets posted by a specific Twitter/X user. Returns tweet content, engagement metrics, and metadata. Supports pagination to fetch multiple pages of results.
curl "https://apidirect.io/v1/twitter/user/tweets?username=elonmusk&pages=2" \
-H "X-API-Key: YOUR_API_KEY"
{
"tweets": [
{
"title": "@elonmusk on X",
"url": "https://twitter.com/elonmusk/status/...",
"date": "2024-03-01 18:30:00",
"author": "elonmusk",
"source": "Twitter (X)",
"domain": "x.com",
"snippet": "Tweet content here...",
"likes": 50000,
"retweets": 8000,
"replies": 12000,
"quotes": 3000,
"bookmarks": 2000,
"views": 5000000,
"author_followers": 235918920,
"author_verified": true,
"lang": "en",
"is_reply": false,
"is_quote": false,
"hashtags": [],
"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"
}
}
],
"username": "elonmusk",
"pages": 2,
"count": 40
}