API Direct
Endpoints
Twitter User Tweets

Twitter User Tweets

GET /v1/twitter/user/tweets
Documentation

Get tweets posted by a specific Twitter/X user. Returns tweet content, engagement metrics, and metadata. Supports pagination to fetch multiple pages of results.

Cost
$0.006 per page
Free tier
50 requests/month

Parameters

username *
Twitter username (without @, max 50 characters)
pages
Number of pages to fetch, 1-10 (default: 1)
get_sentiment
Set to true to add AI emotion analysis (+$0.001/page)

Example Request

curl "https://apidirect.io/v1/twitter/user/tweets?username=elonmusk&pages=2" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "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
}

Your Usage

Free tier this month
Loading...
Recent Activity