# Telegram Channel Scraper: posts, views, reactions and media (`pikoulas/telegram`) Actor

Scrape public Telegram channels: posts with text, links, views, reactions, photos, videos, polls, forwards and replies, by date range or keyword. Channel details with exact subscriber counts. No login, no API keys, no browser.

- **URL**: https://apify.com/pikoulas/telegram.md
- **Developed by:** [Spyridon Pikoulas](https://apify.com/pikoulas) (community)
- **Categories:** Social media, News, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 posts

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Telegram Channel Scraper

Scrape public Telegram channels from their web preview:

- **Channels:** the posts of any public channel, given as a username, @name or t.me link, newest
  first. Keep only posts between two dates; the run jumps straight to the older date without
  reading everything after it.
- **Post links:** single posts, t.me/durov/528.
- **Search:** posts matching a keyword, from Telegram's own search within each channel.
- **Channel details:** title, description, exact subscriber count, photo, video, file and link
  counts, avatar and verified badge.

Every post comes with its text, links, hashtags, views, reactions with their counts, author
signature, forwarded-from and reply-to, and its media: photos, videos, round videos, voice
messages, GIFs, files, stickers, polls with their results, and link previews.

It needs no login, no phone number and no API keys, and no browser, so it is fast: 500 posts from
one channel took 10 seconds. It costs **$0.50 per 1,000 posts**, and **$1 per 1,000 channels**.

### What people use it for

- **News and OSINT monitoring:** new posts from a list of channels, day by day.
- **Crypto and market signals:** announcements and calls from trading and project channels, with
  their reach.
- **AI and LLM pipelines:** clean post text with its links, for summaries, RAG and sentiment.
- **Lead generation and influencer research:** channels in a niche with their subscriber counts.
- **Engagement analysis:** which posts get the most views and reactions.

### How to scrape Telegram channels

1. Click **Try for free**; Apify's free plan covers a first run.
2. Enter **Channels or posts** (`durov`, `@telegram` or a `t.me` link), and how many posts you want per channel.
3. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or read them through
   the API.

An input with more options:

```json
{
  "channels": ["durov", "@telegram", "https://t.me/apod_telegram", "https://t.me/durov/528"],
  "maxPostsPerChannel": 100,
  "postedAfter": "2026-01-01",
  "postedBefore": "2026-06-30",
  "searchQuery": "",
  "includeChannelInfo": true
}
```

### Output

A post:

```json
{
  "type": "post",
  "channel": "apod_telegram",
  "channelTitle": "NASA's Astronomy Picture of the Day",
  "id": 17112,
  "url": "https://t.me/apod_telegram/17112",
  "date": "2026-09-26T04:29:58+00:00",
  "edited": false,
  "text": "2026 September 26\n\nMirrored Meteor and Milky Way\nImage Credit & Copyright: Jeff Dai (TWAN)\n\nOn August 15, this perseid meteor streaked through night skies over …",
  "links": [
    {"text": "2026 September 26", "url": "https://apod.nasa.gov/apod/ap260926.html"},
    {"text": "Jeff Dai", "url": "https://twanight.org/profile/jeff-dai/"}
  ],
  "hashtags": [],
  "views": 2010,
  "reactions": [
    {"emoji": "❤", "count": 47},
    {"emoji": "👍", "count": 3},
    {"emoji": "🔥", "count": 2}
  ],
  "reactionsTotal": 54,
  "author": null,
  "forwardedFrom": null,
  "replyTo": null,
  "viaBot": null,
  "media": [
    {"type": "photo", "url": "https://cdn4.telesco.pe/file/Wh3TENe-Zb69….jpg", "postUrl": "https://t.me/apod_telegram/17112"}
  ],
  "poll": null,
  "linkPreview": null,
  "buttons": []
}
```

A video in `media` has its `url`, `thumbnail` and `duration` in seconds; round videos and voice
messages too. A forward has `forwardedFrom: {"name", "url", "author"}`, a reply
`replyTo: {"url", "channel", "id", "author", "text"}`, and a poll its question, type, options with
percentages, and voters.

A channel:

```json
{
  "type": "channel",
  "username": "apod_telegram",
  "url": "https://t.me/apod_telegram",
  "title": "NASA's Astronomy Picture of the Day",
  "description": "To find and view past APODs, tap here:\nt.me/apodQA/3\n\nNASA's APOD presence in Telegram: …",
  "subscribers": 35201,
  "photos": 11100,
  "videos": 409,
  "files": 5,
  "links": 11500,
  "avatarUrl": "https://cdn4.telesco.pe/file/N3IFfJvbZAK5….jpg",
  "verified": true,
  "hasPreview": true
}
```

### Use it as an API

One call runs it and returns the results as JSON (for runs under 5 minutes; longer ones start a
run and read its dataset). Apify's Python and JavaScript clients, and its Make, Zapier and n8n
integrations, work the same way.

```bash
curl -X POST "https://api.apify.com/v2/acts/pikoulas~telegram/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channels": ["durov", "telegram"], "maxPostsPerChannel": 20}'
```

AI agents can call it as a tool through Apify's MCP server: `https://mcp.apify.com?tools=pikoulas/telegram`.

### How much does it cost to scrape Telegram channels?

You pay **$0.0005 per post**, which is $0.50 per 1,000, and **$0.001 per channel**. Runs that go
through Apify's residential proxy also pay its traffic, $0.0012 per 100 KB; a post takes about
1.5 KB. There are no monthly fees.

### Good to know

- Only public channels with a web preview (t.me/s/name) can be read. Groups, private channels and
  channels Telegram doesn't preview (some are blocked in some countries) are skipped with a
  warning.
- Telegram's search gives only the newest 20 or so matches in each channel. For older posts, use
  the dates instead.
- `views`, reaction counts and the media counts are the rounded numbers Telegram shows ("18.9M");
  `subscribers` is exact.
- Custom emoji reactions have no character, only their `customEmojiId`. Paid star reactions are
  `{"emoji": "⭐", "paid": true}`.
- Videos too big for the web preview have `tooBig: true` and a thumbnail, but no `url`. Files have
  their name and size, but no download link.

### FAQ

#### Is it legal to scrape Telegram?

It collects only what Telegram shows publicly, without logging in. Scraping public data is
generally legal, but personal data is protected by laws such as the GDPR and the CCPA, and
Telegram's terms may limit how you use what you collect. If you're unsure, ask a lawyer;
Apify's [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/) is a good start.

#### Something missing or not working?

Open an issue on the **Issues** tab with the input you used, or ask there for a field you need.

# Actor input Schema

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

Public channels as usernames, @names or links: durov, @telegram, https://t.me/durov. A post link, https://t.me/durov/528, gives that one post.

## `maxPostsPerChannel` (type: `integer`):

How many posts per channel, newest first.

## `postedAfter` (type: `string`):

Only posts from this date on (YYYY-MM-DD, UTC).

## `postedBefore` (type: `string`):

Only posts up to this date, that day included (YYYY-MM-DD, UTC). The run jumps straight to it, without reading the newer posts.

## `searchQuery` (type: `string`):

Only posts matching this keyword, from Telegram's own search in each channel. It gives the newest 20 or so matches per channel.

## `includeChannelInfo` (type: `boolean`):

Adds one item per channel with its title, description, exact subscriber count, photo, video and link counts, avatar and verified badge.

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

Not needed for most runs. If Telegram refuses the run's IP, it switches to Apify's residential proxy by itself.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxPostsPerChannel": 20,
  "includeChannelInfo": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

No description

## `channels` (type: `string`):

No description

# 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": [
        "durov",
        "telegram"
    ],
    "maxPostsPerChannel": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("pikoulas/telegram").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": [
        "durov",
        "telegram",
    ],
    "maxPostsPerChannel": 20,
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": [
    "durov",
    "telegram"
  ],
  "maxPostsPerChannel": 20
}' |
apify call pikoulas/telegram --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pikoulas/telegram"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Feskr3iUwfFkNdPBe/builds/PHHpO9FLgtq82HY3p/openapi.json
