# Telegram API
> Read any public Telegram channel in real time — no bot token or key needed. Fetch a channel's info (title, @username, description, subscriber/photo/video/file counts, avatar) together with its latest posts, and page back through older posts. Each post comes with its message id, text (plain + HTML), publish date, view count, author, forward source, permalink and media (photos, videos, voice, documents). Pass channel = the @username (without @); paginate older posts with before=<message id>. Data comes from Telegram's own public channel web preview — live, no cache. 3 endpoints. Built for channel monitoring, social listening and content aggregation. A public-Telegram-channel reader (no private chats; Telegram exposes no public search). No upstream key, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/telegram-api/..."
```

## Pricing
- **Free** (Free) — 3,400 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 66,000 calls/Mo, 8 req/s
- **Pro** ($21/Mo) — 330,000 calls/Mo, 20 req/s
- **Mega** ($49/Mo) — 1,620,000 calls/Mo, 50 req/s

## Endpoints

### Telegram

#### `GET /v1/channel` — Channel info + latest posts

**Parameters:**
- `channel` (query, required, string) — Channel @username (without @) Example: `telegram`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/telegram-api/v1/channel?channel=telegram"
```

**Response:**
```json
{
    "data": {
        "posts": [
            {
                "id": 425,
                "date": "2026-02-10T17:43:45+00:00",
                "html": "<b>New Design.</b> Telegram for Android has a <b>fully redesigned interface </b>that makes navigation and search <b>even quicker</b> and <b>more responsive</b>.<br><br>On iOS, our developers added Liquid Glass to the <b>media viewer</b>, new <b>preview panels</b> for sticker and emoji packs, plus updated <b>context menus</b> in profiles and chats. <br><br>February Features<br><b>1</b> •&nbsp;<a href=\"https://t.me/telegram/426\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm('Open this link?\\n\\n'+this.href);\">2</a> •&nbsp;<a href=\"https://t.me/telegram/427\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm('Open this link?\\n\\n'+this.href);\">3</a> •&nbsp;<a href=\"https://t.me/telegram/428\" target=\"_blank\" rel=\"noopener\" onclick=\"return confirm('Open this link?\\n\\n'+this.href);\">More</a>",
                "link": "https://t.me/telegram/425",
                "post": "telegram/425",
                "text": "New Design. Telegram for Android has a fully redesigned interface that makes navigation and search even quicker and more responsive.On iOS, our developers added Liquid Glass to the media viewer, new preview panels for sticker and emoji packs, plus updated context menus in profiles and chats. February Features1 • 2 • 3 • More",
                "media": [
                 
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/posts` — Channel posts (paginated)

**Parameters:**
- `channel` (query, required, string) — Channel username Example: `durov`
- `before` (query, optional, string) — Message id to page before

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/telegram-api/v1/posts?channel=durov"
```

**Response:**
```json
{
    "data": {
        "count": 19,
        "posts": [
            {
                "id": 503,
                "date": "2026-05-06T15:57:26+00:00",
                "html": "<tg-emoji emoji-id=\"5411520005386806155\"><i class=\"emoji\" style=\"background-image:url('//telegram.org/img/emoji/40/F09F8F81.png')\"><b>🏁</b></i></tg-emoji> TON leads Layer-1 blockchains in finality time. <br><br><tg-emoji emoji-id=\"5375129357373165375\"><i class=\"emoji\" style=\"background-image:url('//telegram.org/img/emoji/40/F09F9497.png')\"><b>🔗</b></i></tg-emoji> Sources: <a href=\"https://telegra.ph/Comparison-of-Layer-1-blockchains-by-finalization-time-05-01\" target=\"_blank\" rel=\"noopener\">https://telegra.ph/Comparison-of-Layer-1-blockchains-by-finalization-time-05-01</a>",
                "link": "https://t.me/durov/503",
                "post": "durov/503",
                "text": "🏁 TON leads Layer-1 blockchains in finality time. 🔗 Sources: https://telegra.ph/Comparison-of-Layer-1-blockchains-by-finalization-time-05-01",
                "media": [
                    {
                        "url": "https://cdn4.telesco.pe/file/85102421eb.mp4?token=Z1f-OsFCTdYP9o2UHCBxhEt4Z5FewJgA6z8eXEVa18Cl57k4LTn92AJy4i26-GSePGF9L7WaCpyeek3bTc2CRoV3yfv7Iij-TiMfpaX61WZJVGG69J9zvkuvYqfm09tmOJnKN4NRK77WZMmRQI6KzZx3UAOCnJKQQX1HyE8hKme_pkkwAIIkfhqugb0CKcDYctRsicQAi-8DuJpioFHxG6EWbYcRqRVsdPPl9UIr9zgBnGEwlWcKVsZaB_VgFx5ARsvcyOxgvFtjAhnIPl0trfh2U45AuKqqdZ5EOC0HDOb-BIqVEmLMgJD7XxX0uIkS0FEAMvk
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/telegram-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream; gateway requires x-api-key",
        "name": "Telegram API",
        "note": "Live, no cache. Public channels only. channel = the @username (without @). Paginate older posts with before=<message id>. No search (Telegram exposes none publicly).",
        "source": "Telegram public channel web preview (t.me/s/<channel>)",
        "endpoints": 3
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:19.768Z",
        "request_id": "726b4220-fee5-45d8-851e-3d70eaa76f40"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/telegram-api
OpenAPI spec: https://www.oanor.com/api/telegram-api/openapi.json
