# Telegram

Public Telegram channels without an account or API key — channel discovery, live posts with views and reactions, full-history search inside a channel, and discussion-thread comments.

## Tools & pricing

- `glim_telegram_search` / `POST /api/v1/telegram/search` — $0.01 per call. Discovers channels by name or topic plus indexed public post pages. Telegram has no global full-text search — use this to find the right channel, then search inside it.
- `glim_telegram_get` / `POST /api/v1/telegram/get` — $0.005 per call. A channel ref (`@handle` or t.me URL) returns channel info + recent posts; add `query` to search the channel's full history, or page with `before`. A post ref (`t.me/<channel>/<id>`) returns the post plus its discussion comments.

## Example

**request**

```
curl -X POST https://glim.sh/api/v1/telegram/get \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref":"durov","limit":1}'
```

**response (real call, trimmed)**

```
{
  "kind": "channel",
  "channel": {
    "handle": "durov",
    "title": "Pavel Durov",
    "description": "Founder of Telegram.",
    "subscribers": 11300000,
    "verified": true,
    "url": "https://t.me/durov"
  },
  "posts": [
    {
      "id": "durov/540",
      "url": "https://t.me/durov/540",
      "author": "Pavel Durov",
      "text": "🇺🇿 The 2026 International Olympiad in Informatics starts today in Tashkent…",
      "date": "2026-08-10T09:29:58+00:00",
      "views": 902000,
      "reactions": [{ "emoji_id": "5373223594484587136", "count": 25100 }],
      "media": [{ "type": "photo", "url": "https://cdn4.telesco.pe/file/…" }]
    }
  ],
  "post_count": 1,
  "has_more": true,
  "next_cursor": "540"
}
```

## Good to know

- Covers public channels only — private or invite-only channels and groups return `404`.
- Comments are available when the channel's discussion group is publicly exposed; Telegram serves the most recent window, and older comments page via `comment=<oldest returned id>`.
- Media URLs are short-lived CDN links — download promptly if you need the asset.
- In-channel `query` search covers the channel's full history, not just recent posts.

## Prompts to try

- "Find Telegram channels about local jobs in Kyiv and pull the latest posts from the biggest one."
- "Search this channel's history for posts mentioning our product and summarize the reactions."

---

## All docs pages


**Get started**

- [Introduction](https://glim.sh/docs.md?page=introduction)
- [MCP quickstart](https://glim.sh/docs.md?page=quickstart)
- [REST API quickstart](https://glim.sh/docs.md?page=quickstart-rest)
- [JavaScript quickstart](https://glim.sh/docs.md?page=quickstart-js)
- [Python quickstart](https://glim.sh/docs.md?page=quickstart-python)
- [Payments & auth](https://glim.sh/docs.md?page=payments)

**Tools**

- [Twitter / X](https://glim.sh/docs.md?page=twitter)
- [Reddit](https://glim.sh/docs.md?page=reddit)
- [Web](https://glim.sh/docs.md?page=web)
- [GitHub](https://glim.sh/docs.md?page=github)
- [Amazon](https://glim.sh/docs.md?page=amazon)
- [YouTube](https://glim.sh/docs.md?page=youtube)
- [Telegram](https://glim.sh/docs.md?page=telegram)

**Reference**

- [Changelog](https://glim.sh/docs.md?page=changelog)
- [API reference](https://glim.sh/docs-openapi)
- [OpenAPI spec](https://glim.sh/openapi.json)
