POST/v1/data/twitter/tweets
Twitter Tweets
Get recent tweets from a Twitter/X user timeline including engagement metrics, media attachments, hashtags, and URLs.
Target Latency
1.2s - 4.5s
Credits
2 cr/req
Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
| username | string | REQUIRED | Twitter/X username without @ prefix. 1-50 characters. |
| limit | number | optional | Number of tweets to return (1-100). |
cURL Example
curl -X POST "https://api.datablue.dev/v1/data/twitter/tweets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "naval",
"limit": 5
}'System Responses
200 OK
Request processed successfully.
401 UNAUTHORIZED
Missing or invalid API key.
429 RATE LIMIT
System capacity exceeded.
500 SYSTEM FAILURE
Internal core exception.
EXAMPLE RESPONSE
{
"success": true,
"time_taken": 3.47,
"username": "naval",
"count": 5,
"tweets": [
{
"id": "1907654321098765432",
"text": "Specific knowledge is found by pursuing your genuine curiosity rather than whatever is hot right now.",
"created_at": "2026-04-02T14:30:00Z",
"likes": 24000,
"retweets": 4800,
"replies": 320,
"quotes": 180,
"views": 1200000,
"lang": "en",
"url": "https://x.com/naval/status/1907654321098765432",
"author": {
"username": "naval",
"name": "Naval",
"verified": true,
"profile_image_url": "https://pbs.twimg.com/profile_images/naval_400x400.jpg"
},
"media": [],
"hashtags": [],
"urls": []
},
{
"id": "1907543210987654321",
"text": "The most important skill for getting rich is becoming a perpetual learner.",
"created_at": "2026-04-01T18:15:00Z",
"likes": 18500,
"retweets": 3200,
"replies": 210,
"quotes": 95,
"views": 890000,
"lang": "en",
"url": "https://x.com/naval/status/1907543210987654321",
"author": {
"username": "naval",
"name": "Naval",
"verified": true
},
"media": [],
"hashtags": [],
"urls": []
}
]
}