# Telegram Channel Posts (`telegram.channel_posts`)

Latest public posts of a Telegram channel with text, time, views, reactions, media and link previews; pages back by cursor.

Docs: https://primaryapi.com/docs/api-reference/telegram/channel_posts

- Endpoint: `POST https://api.primaryapi.com/v1/run/telegram.channel_posts`
- Category: Social · Platform: `telegram` · Kind: list · Status: live
- Price: 1 credit per call; up to 3 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=telegram.channel_posts`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `handle` | string | yes |  | max 200 chars | Public Telegram channel username, with or without the @ (e.g. "telegram"), or its t.me link. |
| `limit` | integer | no | 20 | 1–20 | Maximum number of results to return (1-20, default 20). |
| `cursor` | string | no |  |  | Opaque pagination cursor: pass the previous response's nextCursor. |

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `channel` | object |  |
| `channel.handle` | string |  |
| `channel.title` | string \| null |  |
| `channel.description` | string \| null |  |
| `channel.avatarUrl` | string \| null |  |
| `channel.verified` | boolean \| null |  |
| `channel.subscribers` | integer \| null | Subscriber count as shown on the page (rounded by Telegram, e.g. 9.22M) |
| `posts` | object[] |  |
| `posts[].id` | string | Message id within the channel |
| `posts[].url` | string | https://t.me/{channel}/{id} |
| `posts[].text` | string \| null |  |
| `posts[].createdUtc` | string \| null | ISO 8601 publish time |
| `posts[].edited` | boolean \| null |  |
| `posts[].views` | integer \| null | View count (Telegram rounds large numbers, e.g. 1.2M) |
| `posts[].type` | enum \| null |  |
| `posts[].author` | string \| null | Post signature, when the channel shows authors |
| `posts[].forwardedFrom` | string \| null |  |
| `posts[].reactions` | object[] |  |
| `posts[].reactions[].emoji` | string \| null | Emoji character (null for custom emoji) |
| `posts[].reactions[].emojiId` | string \| null | Custom emoji id |
| `posts[].reactions[].count` | integer \| null |  |
| `posts[].reactions[].paid` | boolean | Paid (Telegram Stars) reaction |
| `posts[].media` | object[] |  |
| `posts[].media[].type` | enum |  |
| `posts[].media[].url` | string \| null | Media URL (video URLs are short-lived signed links) |
| `posts[].media[].thumbnailUrl` | string \| null |  |
| `posts[].media[].durationSeconds` | integer \| null |  |
| `posts[].mediaUrls` | string[] |  |
| `posts[].image` | string \| null | First photo, video thumbnail or link-preview image |
| `posts[].linkPreviewUrl` | string \| null |  |
| `posts[].linkPreviewTitle` | string \| null |  |
| `posts[].linkPreviewDescription` | string \| null |  |
| `nextCursor` | string \| null |  |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

Pagination: pass the previous response’s `nextCursor` as `cursor` to get the next page; `nextCursor: null` means there are no more results.

## Example request

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/telegram.channel_posts" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle":"telegram","limit":1}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "channel": {
        "handle": "telegram",
        "title": "Telegram News",
        "description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
        "avatarUrl": "https://cdn1.telesco.pe/file/ozk3gsDQaPkKrwnu7UCqIRVQ…hZVFw.jpg",
        "verified": true,
        "subscribers": 9220000
      },
      "posts": [
        {
          "id": "460",
          "url": "https://t.me/telegram/460",
          "text": "For all the info from today's update and a look back at 13 years of Telegram features — check out our blog:\nhttps://telegram.org/blog/welcome-messages-buttons-TG-13\n\nAugust Features\n1 • 2 • 3 • 4 • 5 • More",
          "createdUtc": "2026-08-26T19:12:34.000Z",
          "edited": false,
          "views": 2210000,
          "type": "link",
          "author": null,
          "forwardedFrom": null,
          "reactions": [],
          "media": [],
          "mediaUrls": [],
          "image": "https://cdn4.telesco.pe/file/BoBtl3B-ToA0hiEszrM0v3EU…8wepw.jpg",
          "linkPreviewUrl": "https://telegram.org/blog/welcome-messages-buttons-TG-13",
          "linkPreviewTitle": "Welcome Messages, Buttons in Messages and Signed Gifts",
          "linkPreviewDescription": "Introducing Welcome Messages to greet new members of groups or channels, Buttons in Messages to make any text interactive, Inline Documents in Messages and much more."
        }
      ],
      "nextCursor": "eyJiZWZvcmUiOiI0NjAifQ"
    }
  },
  "provider": "PrimaryAPI",
  "credits": 1,
  "items": 1,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z",
  "nextCursor": null
}
```

## Pricing and reliability

- Usual price: 1 credit per call
- Price ceiling: up to 3 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=telegram.channel_posts`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

One page holds up to 20 posts. Views and counters are rounded by Telegram.

## Legal

Returns public posts that can contain personal data. Callers need a lawful basis under GDPR/CCPA and must honour deletion requests.

