# glim.sh Telegram Channel & Post Fetcher

> glim.sh Telegram Channel & Post Fetcher is a paid API for AI agents from glim.sh, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Fetch posts from a public Telegram channel with optional search and pagination, or fetch a single post along with its discussion comments

## Facts

- Endpoint: POST https://glim.sh/api/v1/telegram/get
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glim-sh-telegram-channel-post-fetcher-664f2852
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ckFdQ5F91QNhRpdk57VO-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability glim-sh-telegram-channel-post-fetcher-664f2852 -d '<json body>'
```

Example prompt: Pull the last 30 posts from the Telegram channel @durov, and search within them for anything mentioning 'privacy' — include any discussion comments on matching posts.

## When to prefer this

Use this endpoint when you need to read posts from a public Telegram channel, paginate through its history, search within a channel's messages, or retrieve a single post with its discussion thread. Prefer this over generic web scraping when the target is specifically a Telegram channel or post URL and you need structured message data with metadata.

## Known failure modes

- Channel is private or does not exist — returns error indicating inaccessible resource
- Invalid ref format (not a valid handle, t.me URL, or post URL) — returns validation error
- limit out of range (outside 1-100) — returns validation error
- Post ID not found within the channel — returns not found error
- Rate limit exceeded — returns 429 or payment-related error
- Network timeout fetching channel data from Telegram

## How this service works

Fetch a public Telegram channel's posts (with optional in-channel search and history pagination) or a single post with its discussion comments

## Output

Returns a list of posts from the specified public Telegram channel, each containing message content, metadata (IDs, timestamps), and optionally discussion comments. When a search query is provided, only matching posts are returned. Supports forward and backward pagination via before/after message IDs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ref": {
   "type": "string",
   "maxLength": 2048,
   "minLength": 1,
   "description": "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."
  },
  "after": {
   "type": "string",
   "maxLength": 20,
   "description": "Return posts newer than this message id"
  },
  "limit": {
   "type": "integer",
   "default": 20,
   "maximum": 100,
   "minimum": 1,
   "description": "Max posts for channel refs (walks history pages as needed)"
  },
  "query": {
   "type": "string",
   "maxLength": 500,
   "description": "Search within the channel's full history (channel refs only)"
  },
  "before": {
   "type": "string",
   "maxLength": 20,
   "description": "Return posts older than this message id (pagination cursor from next_cursor)"
  },
  "comment": {
   "type": "string",
   "maxLength": 20,
   "description": "Post refs: center the comment window on this comment id (walks older comments)"
  },
  "include_comments": {
   "type": "boolean",
   "default": true,
   "description": "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kind": "channel",
  "posts": [
   {
    "id": "durov/530",
    "text": "...",
    "views": 4060000
   }
  ],
  "channel": {
   "handle": "durov",
   "subscribers": 11700000
  },
  "has_more": true,
  "next_cursor": "510"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glim-sh-telegram-channel-post-fetcher-664f2852/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from glim.sh](https://www.zero.xyz/host/glim.sh/llms.txt)
