Skip to main content

Twitter / X

Base URL: https://drain.lat/api/v1/twitter
First requests may be slower than usual while the scraper initializes.
Fetch a Twitter/X public profile.
GET /api/v1/twitter/profile/:username
username
string
required
The Twitter/X username to look up.
curl "https://drain.lat/api/v1/twitter/profile/elonmusk" \
  -H "x-api-key: YOUR_API_KEY"
name
string
Display name.
username
string
Twitter handle.
bio
string
Profile bio.
followers
string
Follower count (formatted, e.g. 219.4M).
following
string
Following count.
posts
string
Total post count.
verified
boolean
Whether the account is verified.
profileImage
string
Profile image URL.
bannerImage
string
Banner image URL.
location
string
Location listed on profile.
website
string
Website listed on profile.
joinedDate
string
When the account was created.
Response
{
  "name": "Elon Musk",
  "username": "elonmusk",
  "bio": "Mars & Cars, Chips & Doge",
  "followers": "219.4M",
  "following": "1,012",
  "posts": "47.2K",
  "verified": true,
  "profileImage": "https://pbs.twimg.com/profile_images/...",
  "bannerImage": "https://pbs.twimg.com/profile_banners/...",
  "location": "",
  "website": "",
  "joinedDate": "Joined June 2009",
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Get just the key stats for a Twitter user - faster than the full profile.
GET /api/v1/twitter/profile/:username/stats
username
string
required
The Twitter/X username.
curl "https://drain.lat/api/v1/twitter/profile/elonmusk/stats" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "username": "elonmusk",
  "followers": "219.4M",
  "following": "1,012",
  "posts": "47.2K",
  "verified": true,
  "joinedDate": "Joined June 2009",
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Fetch multiple Twitter profiles in a single request.
POST /api/v1/twitter/bulk/profiles
usernames
string[]
required
Array of Twitter usernames to look up. Maximum 5.
curl -X POST "https://drain.lat/api/v1/twitter/bulk/profiles" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"usernames": ["elonmusk", "nasa"]}'
Response
[
  {
    "username": "elonmusk",
    "success": true,
    "data": {
      "name": "Elon Musk",
      "username": "elonmusk",
      "followers": "219.4M",
      "verified": true
    }
  },
  {
    "username": "nasa",
    "success": true,
    "data": {
      "name": "NASA",
      "username": "NASA",
      "followers": "98.2M",
      "verified": true
    }
  }
]
Maximum 5 usernames per request. Profiles are fetched sequentially so larger batches take longer.