> ## 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.

# Roblox

> Fetch public Roblox profiles, games, and friends lists.

# Roblox

**Base URL:** `https://drain.lat/api/v1/roblox`

<AccordionGroup>
  <Accordion title="GET /profile/:username" icon="user">
    Fetch a public Roblox user's profile including follower counts, avatar, and account info.

    ```
    GET /api/v1/roblox/profile/:username
    ```

    <ParamField path="username" type="string" required>
      The Roblox username to look up.
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/roblox/profile/Builderman" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/roblox/profile/Builderman", {
        headers: { "x-api-key": "YOUR_API_KEY" }
      });
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/roblox/profile/Builderman",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="id" type="number">Roblox user ID.</ResponseField>
    <ResponseField name="username" type="string">Roblox username.</ResponseField>
    <ResponseField name="displayName" type="string">Display name shown on profile.</ResponseField>
    <ResponseField name="bio" type="string">Profile bio/description.</ResponseField>
    <ResponseField name="isBanned" type="boolean">Whether the account is banned.</ResponseField>
    <ResponseField name="created" type="string">Account creation date (ISO 8601).</ResponseField>
    <ResponseField name="friends" type="number">Number of friends.</ResponseField>
    <ResponseField name="followers" type="number">Number of followers.</ResponseField>
    <ResponseField name="following" type="number">Number of accounts followed.</ResponseField>
    <ResponseField name="avatarUrl" type="string">URL to the user's avatar image.</ResponseField>
    <ResponseField name="profileUrl" type="string">Link to the Roblox profile page.</ResponseField>
    <ResponseField name="scrapedAt" type="string">Timestamp of when the data was fetched.</ResponseField>

    ```json Response theme={null}
    {
      "id": 3,
      "username": "Builderman",
      "displayName": "Builderman",
      "bio": "Welcome to Roblox!",
      "isBanned": false,
      "created": "2006-02-27T21:06:40.3Z",
      "friends": 20,
      "followers": 78432,
      "following": 1,
      "avatarUrl": "https://tr.rbxcdn.com/...",
      "profileUrl": "https://www.roblox.com/users/3/profile",
      "scrapedAt": "2026-05-05T12:00:00.000Z"
    }
    ```
  </Accordion>

  <Accordion title="GET /profile/:username/games" icon="gamepad">
    Get the public games created by a Roblox user.

    ```
    GET /api/v1/roblox/profile/:username/games
    ```

    <ParamField path="username" type="string" required>
      The Roblox username.
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/roblox/profile/Builderman/games" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/roblox/profile/Builderman/games", {
        headers: { "x-api-key": "YOUR_API_KEY" }
      });
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/roblox/profile/Builderman/games",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="userId" type="number">Roblox user ID.</ResponseField>
    <ResponseField name="username" type="string">Roblox username.</ResponseField>

    <ResponseField name="games" type="array">
      <Expandable title="game object">
        <ResponseField name="id" type="number">Game ID.</ResponseField>
        <ResponseField name="name" type="string">Game name.</ResponseField>
        <ResponseField name="description" type="string">Game description.</ResponseField>
        <ResponseField name="plays" type="number">Total play count.</ResponseField>
        <ResponseField name="favoritedCount" type="number">Number of times favorited.</ResponseField>
        <ResponseField name="created" type="string">Game creation date.</ResponseField>
        <ResponseField name="updated" type="string">Last updated date.</ResponseField>
        <ResponseField name="url" type="string">Link to the game page.</ResponseField>
      </Expandable>
    </ResponseField>

    ```json Response theme={null}
    {
      "userId": 3,
      "username": "Builderman",
      "games": [
        {
          "id": 1818,
          "name": "Classic: Crossroads",
          "description": "The classic Roblox game.",
          "plays": 12043210,
          "favoritedCount": 45231,
          "created": "2007-05-01T00:00:00Z",
          "updated": "2023-01-01T00:00:00Z",
          "url": "https://www.roblox.com/games/1818"
        }
      ],
      "scrapedAt": "2026-05-05T12:00:00.000Z"
    }
    ```

    <Note>Only returns public games. Private games are not included.</Note>
  </Accordion>

  <Accordion title="GET /profile/:username/friends" icon="users">
    Get a user's Roblox friends list.

    ```
    GET /api/v1/roblox/profile/:username/friends
    ```

    <ParamField path="username" type="string" required>
      The Roblox username.
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/roblox/profile/Builderman/friends" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/roblox/profile/Builderman/friends", {
        headers: { "x-api-key": "YOUR_API_KEY" }
      });
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/roblox/profile/Builderman/friends",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="userId" type="number">Roblox user ID.</ResponseField>
    <ResponseField name="username" type="string">Roblox username.</ResponseField>

    <ResponseField name="friends" type="array">
      <Expandable title="friend object">
        <ResponseField name="id" type="number">Friend's user ID.</ResponseField>
        <ResponseField name="username" type="string">Friend's username.</ResponseField>
        <ResponseField name="displayName" type="string">Friend's display name.</ResponseField>
        <ResponseField name="profileUrl" type="string">Link to friend's profile.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="number">Total number of friends returned.</ResponseField>

    ```json Response theme={null}
    {
      "userId": 3,
      "username": "Builderman",
      "friends": [
        {
          "id": 12345,
          "username": "Player1",
          "displayName": "Player One",
          "profileUrl": "https://www.roblox.com/users/12345/profile"
        }
      ],
      "total": 1,
      "scrapedAt": "2026-05-05T12:00:00.000Z"
    }
    ```

    <Warning>
      As of May 2026, Roblox removed unauthenticated access to follower/following lists. This endpoint may return an error for some accounts depending on their privacy settings.
    </Warning>
  </Accordion>

  <Accordion title="GET /profile/:username/badges" icon="award">
    Get badges earned by a Roblox user.

    ```
    GET /api/v1/roblox/profile/:username/badges
    ```

    <ParamField path="username" type="string" required>
      The Roblox username.
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/roblox/profile/Roblox/badges" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/roblox/profile/Roblox/badges", {
        headers: { "x-api-key": "YOUR_API_KEY" }
      });
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/roblox/profile/Roblox/badges",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="userId" type="number">Roblox user ID.</ResponseField>
    <ResponseField name="username" type="string">Roblox username.</ResponseField>

    <ResponseField name="badges" type="array">
      <Expandable title="badge object">
        <ResponseField name="id" type="number">Badge ID.</ResponseField>
        <ResponseField name="name" type="string">Badge name.</ResponseField>
        <ResponseField name="description" type="string">Badge description.</ResponseField>
        <ResponseField name="imageUrl" type="string">Badge image URL.</ResponseField>
        <ResponseField name="enabled" type="boolean">Whether the badge is enabled/visible.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="number">Total badges returned.</ResponseField>

    ```json Response theme={null}
    {
      "userId": 1,
      "username": "Roblox",
      "badges": [
        {
          "id": 2124445684,
          "name": "Welcome To Bloxburg",
          "description": "You visited Bloxburg!",
          "imageUrl": "https://www.roblox.com/asset-thumbnail/image?assetId=...",
          "enabled": true
        }
      ],
      "total": 12,
      "scrapedAt": "2026-05-08T10:00:00.000Z"
    }
    ```
  </Accordion>

  <Accordion title="GET /profile/:username/groups" icon="people-group">
    Get the groups a Roblox user belongs to, including their role.

    ```
    GET /api/v1/roblox/profile/:username/groups
    ```

    <ParamField path="username" type="string" required>
      The Roblox username.
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/roblox/profile/Roblox/groups" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/roblox/profile/Roblox/groups", {
        headers: { "x-api-key": "YOUR_API_KEY" }
      });
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/roblox/profile/Roblox/groups",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="userId" type="number">Roblox user ID.</ResponseField>
    <ResponseField name="username" type="string">Roblox username.</ResponseField>

    <ResponseField name="groups" type="array">
      <Expandable title="group object">
        <ResponseField name="id" type="number">Group ID.</ResponseField>
        <ResponseField name="name" type="string">Group name.</ResponseField>
        <ResponseField name="description" type="string">Group description.</ResponseField>
        <ResponseField name="memberCount" type="number">Total member count.</ResponseField>
        <ResponseField name="role" type="string">User's role name in the group.</ResponseField>
        <ResponseField name="rank" type="number">User's rank number (0-255).</ResponseField>
        <ResponseField name="isOwner" type="boolean">Whether the user owns the group.</ResponseField>
        <ResponseField name="url" type="string">Link to the group page.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="number">Total groups returned.</ResponseField>

    ```json Response theme={null}
    {
      "userId": 1,
      "username": "Roblox",
      "groups": [
        {
          "id": 1200769,
          "name": "Roblox",
          "description": "Official Roblox group.",
          "memberCount": 8200000,
          "role": "Owner",
          "rank": 255,
          "isOwner": true,
          "url": "https://www.roblox.com/groups/1200769"
        }
      ],
      "total": 3,
      "scrapedAt": "2026-05-08T10:00:00.000Z"
    }
    ```
  </Accordion>
</AccordionGroup>
