# Telegram Channel Scraper - No Login, No API Key, Messages (`renzomacar/telegram-channel-scraper`) Actor

Scrape any public Telegram channel with no login and no API key — get every post, view count, media, link and timestamp in clean JSON or Excel. No phone, no account, no token needed. Built for OSINT, market research and competitor tracking. Pay only for what you scrape.

- **URL**: https://apify.com/renzomacar/telegram-channel-scraper.md
- **Developed by:** [Renzo Madueno](https://apify.com/renzomacar) (community)
- **Categories:** News, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Telegram Channel Scraper - Messages, Views, Media, No API Key

Scrape **public Telegram channels** at scale — full message text, view counts, post dates, media (photos, videos, documents, stickers), outbound links, hashtags, link previews, forwards and replies, plus channel metadata (subscriber count, description, photo).

**No API key. No login. No phone number. No MTProto.** This actor reads Telegram's own public web preview, so setup is zero — just give it a channel username.

---

### Why this scraper

Most Telegram scrapers force you through `api_id` / `api_hash` registration, a logged-in phone session, or flaky MTProto libraries that get your account banned. This one doesn't touch any of that. It pulls the **public channel feed** that Telegram already serves to the open web at `t.me/s/{channel}`, so it's:

- **Plug and play** — paste a channel name, hit run. No credentials, ever.
- **Safe** — no account to ban; it never logs in.
- **Cheap & fast** — pure HTTP (no headless browser), so runs cost cents.
- **Rich** — every field Telegram exposes publicly, normalized into clean JSON.
- **Robust** — paginates backwards through history, deduplicates by message id, reports private/nonexistent channels instead of crashing.

---

### Input

```json
{
  "channels": ["durov", "telegram"],
  "maxMessages": 200,
  "searchKeyword": "",
  "dateFrom": "2026-01-01",
  "dateTo": "",
  "includeChannelMetadata": true
}
````

| Field | Type | Description |
|---|---|---|
| `channels` | array | Channel usernames or URLs. Accepts `durov`, `@durov`, or `https://t.me/durov`. |
| `startUrls` | array | Alternative way to pass `t.me` URLs (merged with `channels`). |
| `maxMessages` | integer | Max messages per channel (paginates back through history). Default 100. |
| `searchKeyword` | string | Optional. Keep only messages whose text/hashtags contain this keyword. |
| `dateFrom` / `dateTo` | string | Optional ISO dates (e.g. `2026-01-01`) to bound the time range. Scraping stops early once it pages past `dateFrom`. |
| `includeChannelMetadata` | boolean | Emit a channel-level record (title, description, subscribers, photo). Default true. |
| `proxyConfiguration` | object | Optional. Public pages work without a proxy; enable for very large jobs. |

***

### Output

A **channel** record (one per channel, when metadata is enabled):

```json
{
  "_type": "channel",
  "channel": "durov",
  "title": "Pavel Durov",
  "username": "durov",
  "description": "Founder of Telegram.",
  "photo": "https://cdn4.telesco.pe/file/...jpg",
  "subscribersLabel": "11M",
  "subscriberCount": 11000000,
  "counters": { "subscribers": "11M", "photos": "99", "videos": "45", "links": "189" }
}
```

A **message** record (one per post):

```json
{
  "_type": "message",
  "channel": "durov",
  "messageId": 505,
  "url": "https://t.me/durov/505",
  "text": "🫴 TON is #1 in annual staking rewards among the 50 largest cryptocurrencies. And that's on top of the coin's price growth — which doubled over the past week.",
  "date": "2026-05-08T17:41:53+00:00",
  "viewCount": 3770000,
  "viewsLabel": "3.77M",
  "author": "Pavel Durov",
  "hasMedia": true,
  "media": [
    { "type": "photo", "url": "https://cdn4.telesco.pe/file/...jpg", "link": "https://t.me/durov/505" }
  ],
  "links": null,
  "hashtags": null,
  "linkPreview": {
    "url": "https://telegram.org/blog/...",
    "siteName": "Telegram",
    "title": "Android Redesign, Group Ownership Transfer, Gift Crafting...",
    "description": "This update adds the biggest interface update...",
    "image": "https://cdn4.telesco.pe/file/...jpg"
  },
  "forwardedFrom": null,
  "replyTo": null,
  "isEdited": false
}
```

**Media types** captured: `photo`, `video` (with thumbnail + duration), `voice`, `document` (title + size), `sticker`. View counts are returned both as the raw label (`"3.77M"`) and a parsed integer (`3770000`).

***

### Use cases

- **OSINT & research** — archive and search public channel history, track narratives over time.
- **Crypto monitoring** — watch token/project announcement channels, capture views and engagement signals.
- **News & media monitoring** — pull breaking-news channels into your own dashboards.
- **Sentiment & trend analysis** — feed clean message text into NLP pipelines.
- **Brand & competitor tracking** — monitor what channels post about you or your competitors.
- **Dataset building** — collect labeled, timestamped, view-weighted message corpora.

***

### How pagination works

The actor starts at the channel's latest posts and walks backwards using Telegram's own `?before={message_id}` parameter, deduplicating by message id, until it reaches `maxMessages` (or `dateFrom`, or the start of the channel).

### Errors & reliability

- Private, deleted, or nonexistent channels are **reported, not crashed** — details land in the `FAILURES` key of the run's key-value store.
- If **no** channel yields any data, the run fails loudly (so you never silently pay for an empty dataset).
- Messages are deduplicated, so reruns and overlapping pages won't double-count.

### Pricing (Pay Per Event)

- **Actor start:** $0.005 per run
- **Per message scraped:** $0.002

HTTP-only means runs are cheap and predictable — you pay for data, not for a browser idling.

### Notes

This actor only reads **publicly available** channel content that Telegram serves to anyone on the open web. It cannot access private channels, groups, or any content behind login. Respect Telegram's Terms of Service and applicable laws in your jurisdiction.

***

### Frequently asked questions

**Can I scrape a Telegram channel without an API key or login?**
Yes. This Telegram channel scraper needs no API key, no api\_id / api\_hash, no phone number, no login and no MTProto session. It reads Telegram's public web preview at `t.me/s/{channel}`, so setup is zero. Just paste a channel username and run.

**How do I export Telegram channel messages to JSON, CSV or Excel?**
Every message is normalized into clean JSON, and Apify lets you export the whole dataset to JSON, CSV, Excel or via API in one click. Each record includes message text, view counts, post dates, media URLs, links, hashtags, forwards and replies.

**Can I scrape Telegram message view counts?**
Yes. Each post returns its view count both as the raw label (for example `3.77M`) and as a parsed integer (`3770000`), so you can rank posts by reach and measure engagement over time.

**Can I scrape Telegram media like photos, videos and documents?**
Yes. The scraper captures photos, videos (with thumbnail and duration), voice notes, documents (with title and size) and stickers, returning direct media URLs for each post.

**How do I scrape a Telegram channel by date range?**
Set `dateFrom` and `dateTo` to ISO dates such as `2026-01-01`. The scraper paginates backwards through channel history and stops once it pages past your start date, so you only collect the window you need.

**Will scraping a public Telegram channel get my account banned?**
No. There is no account to ban because the scraper never logs in. It only reads the public channel feed that Telegram already serves to anyone on the open web.

**Can I scrape multiple Telegram channels at once?**
Yes. Pass an array of usernames or `t.me` URLs in `channels` and the actor scrapes them all in a single run, emitting one metadata record and many message records per channel.

**How much does the Telegram channel scraper cost?**
Pricing is pay-per-event: $0.005 per run start plus $0.002 per message scraped. Because it is HTTP-only with no headless browser, runs are cheap and predictable.

# Actor input Schema

## `channels` (type: `array`):

Public Telegram channel usernames or URLs. Accepts 'durov', '@durov', or 'https://t.me/durov'.

## `startUrls` (type: `array`):

Optional list of t.me channel URLs. Merged with 'channels'.

## `maxMessages` (type: `integer`):

Maximum number of messages to scrape per channel (paginates backwards through history).

## `searchKeyword` (type: `string`):

Keep only messages whose text or hashtags contain this keyword (case-insensitive). Leave empty for all messages.

## `dateFrom` (type: `string`):

Only keep messages posted on or after this date. ISO format, e.g. 2026-01-01. Scraping stops early once it pages past this date.

## `dateTo` (type: `string`):

Only keep messages posted on or before this date. ISO format, e.g. 2026-06-01.

## `includeChannelMetadata` (type: `boolean`):

Push a channel-level record (title, description, subscriber count, photo) per channel.

## `proxyConfiguration` (type: `object`):

Optional. Public preview pages work without a proxy, but enable proxies for very large jobs or if rate-limited.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxMessages": 100,
  "includeChannelMetadata": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All result items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "channels": [
        "telegram"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("renzomacar/telegram-channel-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "channels": ["telegram"] }

# Run the Actor and wait for it to finish
run = client.actor("renzomacar/telegram-channel-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "channels": [
    "telegram"
  ]
}' |
apify call renzomacar/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=renzomacar/telegram-channel-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Telegram Channel Scraper - No Login, No API Key, Messages",
        "description": "Scrape any public Telegram channel with no login and no API key — get every post, view count, media, link and timestamp in clean JSON or Excel. No phone, no account, no token needed. Built for OSINT, market research and competitor tracking. Pay only for what you scrape.",
        "version": "0.1",
        "x-build-id": "DzogGffdKCiKl5Gb9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/renzomacar~telegram-channel-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-renzomacar-telegram-channel-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/renzomacar~telegram-channel-scraper/runs": {
            "post": {
                "operationId": "runs-sync-renzomacar-telegram-channel-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/renzomacar~telegram-channel-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-renzomacar-telegram-channel-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "channels": {
                        "title": "Channels",
                        "type": "array",
                        "description": "Public Telegram channel usernames or URLs. Accepts 'durov', '@durov', or 'https://t.me/durov'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Channel URLs (alternative input)",
                        "type": "array",
                        "description": "Optional list of t.me channel URLs. Merged with 'channels'.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxMessages": {
                        "title": "Max messages per channel",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of messages to scrape per channel (paginates backwards through history).",
                        "default": 100
                    },
                    "searchKeyword": {
                        "title": "Keyword filter (optional)",
                        "type": "string",
                        "description": "Keep only messages whose text or hashtags contain this keyword (case-insensitive). Leave empty for all messages."
                    },
                    "dateFrom": {
                        "title": "Date from (optional)",
                        "type": "string",
                        "description": "Only keep messages posted on or after this date. ISO format, e.g. 2026-01-01. Scraping stops early once it pages past this date."
                    },
                    "dateTo": {
                        "title": "Date to (optional)",
                        "type": "string",
                        "description": "Only keep messages posted on or before this date. ISO format, e.g. 2026-06-01."
                    },
                    "includeChannelMetadata": {
                        "title": "Include channel metadata",
                        "type": "boolean",
                        "description": "Push a channel-level record (title, description, subscriber count, photo) per channel.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional. Public preview pages work without a proxy, but enable proxies for very large jobs or if rate-limited.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
