Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.drain.lat/llms.txt

Use this file to discover all available pages before exploring further.

GitHub

Base URL: https://drain.lat/api/v1/github All endpoints require the x-api-key header.

GET /profile/:username

Fetch a GitHub user’s public profile. Endpoint
GET /api/v1/github/profile/:username
curl "https://drain.lat/api/v1/github/profile/torvalds" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "id": 1024025,
  "username": "torvalds",
  "displayName": "Linus Torvalds",
  "bio": "Just for fun",
  "company": "Linux Foundation",
  "location": "Portland, OR",
  "email": "",
  "website": "",
  "avatarUrl": "https://avatars.githubusercontent.com/u/1024025",
  "profileUrl": "https://github.com/torvalds",
  "followers": 234000,
  "following": 0,
  "publicRepos": 8,
  "publicGists": 0,
  "created": "2011-09-03T15:26:22Z",
  "updated": "2024-01-01T00:00:00Z",
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Returns public profile data only.

GET /profile/:username/repos

Get a user’s public repositories sorted by last updated. Endpoint
GET /api/v1/github/profile/:username/repos
curl "https://drain.lat/api/v1/github/profile/torvalds/repos" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "username": "torvalds",
  "repos": [
    {
      "id": 2325298,
      "name": "linux",
      "fullName": "torvalds/linux",
      "description": "Linux kernel source tree",
      "language": "C",
      "stars": 180000,
      "forks": 54000,
      "watchers": 180000,
      "isPrivate": false,
      "isFork": false,
      "topics": ["kernel", "linux"],
      "url": "https://github.com/torvalds/linux",
      "created": "2011-09-04T22:48:12Z",
      "updated": "2026-05-05T00:00:00Z"
    }
  ],
  "total": 8,
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Returns up to 30 repositories per request.

GET /profile/:username/followers

Get a user’s GitHub followers. Endpoint
GET /api/v1/github/profile/:username/followers
curl "https://drain.lat/api/v1/github/profile/torvalds/followers" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "username": "torvalds",
  "followers": [
    {
      "id": 583231,
      "username": "octocat",
      "avatarUrl": "https://avatars.githubusercontent.com/u/583231",
      "profileUrl": "https://github.com/octocat"
    }
  ],
  "total": 30,
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Returns up to 30 followers.

GET /profile/:username/following

Get the list of users a GitHub user follows. Endpoint
GET /api/v1/github/profile/:username/following
curl "https://drain.lat/api/v1/github/profile/torvalds/following" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "username": "torvalds",
  "following": [
    {
      "id": 583231,
      "username": "octocat",
      "avatarUrl": "https://avatars.githubusercontent.com/u/583231",
      "profileUrl": "https://github.com/octocat"
    }
  ],
  "total": 0,
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Returns up to 30 results.

GET /profile/:username/orgs

Get the public organizations a GitHub user belongs to. Endpoint
GET /api/v1/github/profile/:username/orgs
curl "https://drain.lat/api/v1/github/profile/torvalds/orgs" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "username": "torvalds",
  "orgs": [
    {
      "id": 1915493,
      "name": "torvalds",
      "description": "",
      "avatarUrl": "https://avatars.githubusercontent.com/u/1915493",
      "url": "https://github.com/torvalds"
    }
  ],
  "total": 1,
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}