---
title: "Fetch a public Telegram channel's posts or a post with comments"
method: POST
path: "/api/v1/telegram/get"
tags: ["Telegram"]
---

# Fetch a public Telegram channel's posts or a post with comments

`POST /api/v1/telegram/get`

## Request

- Base URL: `https://glim.sh`
- URL: `https://glim.sh/api/v1/telegram/get`
- Auth: one of:
  - none
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in query parameter `apiKey`

Channel refs (@handle, handle, t.me URL) return channel info + recent posts newest-first (views, reactions, media, polls, link previews); pass query to search within the channel's history and page with before=<next_cursor>. Post refs (t.me/<channel>/<id>) return the post plus its most recent discussion comments. Media URLs are Telegram CDN links that expire within hours. Public channels with a web preview only.

## Request body

- object
  - `ref` string, required: Public channel ref (@handle, handle, or t.me URL) returns the channel feed; a post ref (t.me/<channel>/<id> or '<channel>/<id>') returns that post with its discussion comments.
  - `query` string: Search within the channel's full history (channel refs only)
  - `before` string: Return posts older than this message id (pagination cursor from next_cursor)
  - `after` string: Return posts newer than this message id
  - `limit` integer: Max posts for channel refs (walks history pages as needed)
  - `include_comments` boolean: Post refs: include discussion comments. Telegram's public embed serves a small window of the most recent comments; walk older ones by re-calling with comment=<oldest returned comment id>. Availability varies by channel - many discussion groups are not exposed on the public web preview.
  - `comment` string: Post refs: center the comment window on this comment id (walks older comments)

## Response `200`

Telegram resource

- object

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `404`: Not Found
- `502`: Upstream Error

---

[API](https://skmtc.dev/glim/apis/glim-sh.md) · [All operations](https://skmtc.dev/glim/apis/glim-sh/llms.txt) · [OpenAPI document](https://skmtc.dev/glim/apis/glim-sh/revisions/0094e5226d73?raw)
