Skip to main content

Quickstart

Getting an API Key

Sign in at drain.lat/dashboard using Discord. A key is generated automatically on first login. You can view, copy, and regenerate it from the dashboard. No Discord channel or manual request needed.
Keep your key private. Don’t commit it to git or share it publicly.

Make a Request

Grab a GitHub profile to test your key.
curl "https://drain.lat/api/v1/github/profile/torvalds" \
  -H "x-api-key: YOUR_API_KEY"
{
  "id": 1024025,
  "username": "torvalds",
  "displayName": "Linus Torvalds",
  "bio": "Just for fun",
  "company": "Linux Foundation",
  "location": "Portland, OR",
  "followers": 234000,
  "publicRepos": 8,
  "profileUrl": "https://github.com/torvalds",
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}

Auth Header

Every request needs one of these headers:
x-api-key: YOUR_API_KEY
Or alternatively:
Authorization: Bearer YOUR_API_KEY
Missing or wrong key returns:
{
  "error": "Invalid or missing API key"
}