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

# Telegram

> Fetch public Telegram channel and group profiles.

# Telegram

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

<AccordionGroup>
  <Accordion title="GET /profile/:username" icon="user">
    Fetch a public Telegram channel or group profile. Works with or without `@`.

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

    <ParamField path="username" type="string" required>
      Telegram username. The `@` prefix is optional.
    </ParamField>

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

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/telegram/profile/durov", {
        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/telegram/profile/durov",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="username" type="string">Telegram username.</ResponseField>
    <ResponseField name="title" type="string">Channel or group title.</ResponseField>
    <ResponseField name="description" type="string">Channel description/bio.</ResponseField>
    <ResponseField name="avatarUrl" type="string">Avatar image URL.</ResponseField>
    <ResponseField name="members" type="number">Member/subscriber count.</ResponseField>
    <ResponseField name="isChannel" type="boolean">Whether this is a channel (vs group).</ResponseField>
    <ResponseField name="isBot" type="boolean">Whether this is a bot account.</ResponseField>
    <ResponseField name="profileUrl" type="string">Link to the Telegram profile.</ResponseField>

    ```json Response theme={null}
    {
      "username": "durov",
      "title": "Pavel Durov",
      "description": "Telegram founder. Thoughts on technology, freedom, and the future.",
      "avatarUrl": "https://cdn4.telegram-cdn.org/file/...",
      "members": 982400,
      "isChannel": true,
      "isBot": false,
      "profileUrl": "https://t.me/durov",
      "scrapedAt": "2026-05-05T12:00:00.000Z"
    }
    ```

    <Note>Only works for public channels and groups. Private accounts return an error.</Note>
  </Accordion>
</AccordionGroup>
