# Channel

> A public channel's name, bio, photo, exact subscriber count and media counts.

- **Request:** `GET https://api.lurkapi.com/v1/telegram/channel`
- **Auth:** `x-api-key` header ([get a free key](https://lurkapi.com/login?next=/dashboard))
- **Cost:** 1 credit per call. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)).
- **MCP tool:** `telegram_channel` on `https://api.lurkapi.com/mcp`
- **Freshness:** responses are cached for up to 1 hour
- **Try it live:** https://lurkapi.com/docs/telegram/channel#try (no signup)
- **Platform:** [Telegram](https://lurkapi.com/docs/telegram.md) (t.me)
- **Web page:** https://lurkapi.com/docs/telegram/channel

## When to use this

Use it to size up or track a channel: `subscribers` is exact, straight from the channel's t.me page. `counters` (photos, videos, files, links) are rounded by Telegram.

Channels that turned their web preview off still return their name, bio and subscribers, with `previewEnabled: false` and `counters: null`; their posts can't be read.

Unknown usernames, and usernames that belong to a person, bot or group, return 404 `not_found`.

## Parameters

All parameters go in the query string.

| Name | Type | Required | Default | Allowed values | Description | Example |
| --- | --- | --- | --- | --- | --- | --- |
| `handle` | string | yes |  |  | The channel's username, with or without @ (e.g. `telegram`), or its t.me link. | `telegram` |

## Example request

Replace `YOUR_API_KEY` with your key, or set `LURKAPI_KEY` for the code. [Get a free key](https://lurkapi.com/login?next=/dashboard).

curl:

```bash
curl "https://api.lurkapi.com/v1/telegram/channel?handle=telegram" \
  -H "x-api-key: YOUR_API_KEY"
```

JavaScript:

```js
const params = new URLSearchParams({
  handle: "telegram",
});
const res = await fetch(`https://api.lurkapi.com/v1/telegram/channel?${params}`, {
  headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://api.lurkapi.com/v1/telegram/channel",
    params={
        "handle": "telegram",
    },
    headers={"x-api-key": os.environ["LURKAPI_KEY"]},
    timeout=60,
)
data = res.json()
if not data["success"]:
    raise RuntimeError(f"{data['code']}: {data['error']}")
print(data)
```

## Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in `…`.

200 OK (application/json):

```json
{
  "success": true,
  "credits_remaining": 999968,
  "credits_charged": 1,
  "username": "telegram",
  "title": "Telegram News",
  "description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
  "photoUrl": "https://cdn1.telesco.pe/file/RVgtx-SeGUFdb1FvECn6bWCxrbnYjx6wIA-zmZ9aUbT…",
  "verified": true,
  "subscribers": 9432976,
  "counters": {
    "photos": 16,
    "videos": 228,
    "files": null,
    "links": 378
  },
  "previewEnabled": true,
  "url": "https://t.me/telegram"
}
```

## Response fields

Every field of a successful response. `[]` marks a list: `a[].b` is the `b` of each item in `a`. **nullable** fields can be `null`; **optional** fields can be missing.

| Field | Type | Description |
| --- | --- | --- |
| `success` | `true` | Always true here; errors have `success: false`. |
| `credits_remaining` | `number` | Your balance after this call. On anonymous playground calls: free tries left today. |
| `credits_charged` | `number` | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| `username` | `string` | Username without @, as the channel writes it, e.g. `telegram`. |
| `title` | `string` | Channel name, e.g. "Telegram News". |
| `description` | `string`, nullable | The channel's bio, plain text; null if empty. |
| `photoUrl` | `string`, nullable | Channel photo URL, temporary; null if none. |
| `verified` | `boolean` | Has Telegram's verified badge. |
| `subscribers` | `number`, nullable | Exact subscriber count; null if Telegram doesn't show it. |
| `counters` | `object`, nullable | Media counts from the channel's web preview; null when the preview is off. |
| `counters.photos` | `number`, nullable | Photos posted, as a number. Telegram rounds it ("1.2K" → 1200); null if not shown. |
| `counters.videos` | `number`, nullable | Videos posted, as a number. Telegram rounds it ("1.2K" → 1200); null if not shown. |
| `counters.files` | `number`, nullable | Files posted, as a number. Telegram rounds it ("1.2K" → 1200); null if not shown. |
| `counters.links` | `number`, nullable | Links posted, as a number. Telegram rounds it ("1.2K" → 1200); null if not shown. |
| `previewEnabled` | `boolean` | The channel's web preview is on, so channel posts and post can read it. |
| `url` | `string` | The channel on t.me. |

## Caching and freshness

Responses are cached for up to 1 hour, so a repeat call within that window can return the same data. It still costs 1 credit.

## Errors

Errors return `{ success: false, error, code, docs }` with the HTTP status below. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)). [All error codes](https://lurkapi.com/docs.md#errors).

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `missing_api_key` | No API key. Send it in the `x-api-key` header. |
| 401 | `invalid_api_key` | The key is unknown or was revoked. |
| 402 | `insufficient_credits` | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 404 | `not_found` | The endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked. |
| 405 | `method_not_allowed` | Endpoints take GET with query params. |
| 429 | `rate_limited` | Too many calls at once. Wait for the `retry-after` seconds, then retry. |
| 500 | `internal_error` | Something broke on our side. Retry; 5xx errors are free. |
| 502 | `upstream_error` | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | `upstream_busy` | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | `upstream_timeout` | The platform took over 30 seconds to answer. Retry; timeouts are free. |

## Use it in Claude

Once LurkAPI is [connected to Claude](https://lurkapi.com/docs.md#claude), this endpoint is the `telegram_channel` tool. Ask in plain English, for example:

Ask Claude:

```text
Use LurkAPI's telegram_channel with handle "telegram" and summarize what you find.
```

Claude calls `telegram_channel` with arguments like these, and each call costs 1 credit:

Tool arguments:

```json
{
  "handle": "telegram"
}
```

Tool results skip nulls and empty lists to save tokens.

---

Previous: [Post](https://lurkapi.com/docs/truthsocial/post.md) · Next: [Channel posts](https://lurkapi.com/docs/telegram/channel-posts.md)
