# Get channel and posts

Returns a public channel's header (title, `username`, description, counters) and up to 20 posts (text, media, view count, timestamp, forward/reply info). Requires `channel`. Optional `before` or `after` page the stream; the two cannot be combined. Unknown or private channels return `data: null`.

- Platform: Telegram
- Request: `GET https://api.toolzerhub.com/v1/telegram/channel`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/telegram/get-telegram-channel

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `channel` | query | yes | string | Public channel username, e.g. telegram. Accepts @telegram, t.me/telegram or a post link. Private channels, groups and unknown names return data: null. |
| `before` | query | no | integer | Return the 20 messages older than this message number — a cursor into a stream, not a page index. Use the LOWEST message number on the page you just read, not the highest; next_before in each response already has this value, so you never need to compute it. Cannot be combined with after. |
| `after` | query | no | integer | Return the 20 messages newer than this message number — the mirror of before. Use next_after from the previous response, or a stored newest_message_number to catch up on what's new since. Cannot be combined with before. |

## Example request

```bash
curl "https://api.toolzerhub.com/v1/telegram/channel?channel=<channel>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
