# Telegram Channel Scraper — Public Posts (`hipersoft/telegram-scraper`) Actor

Scrape posts from public Telegram channels: message text, date, views, author, forwards, media flags and links. For social listening, research and monitoring.

- **URL**: https://apify.com/hipersoft/telegram-scraper.md
- **Developed by:** [Hipersoft](https://apify.com/hipersoft) (community)
- **Categories:** Social media, News
- **Features:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.001 / message scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 — Public Posts

Scrape posts from public Telegram channels into clean structured JSON: message text, date, view count, author, forward info, media flags, and links. Just provide channel usernames or t.me URLs and set how many recent messages you want.  Built for social listening, research, brand monitoring, and OSINT.

![Telegram Channel Scraper input — channel usernames and message limit in the Apify Console](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/telegram-scraper-input.png?v=2)

### Features

- 💬 **Full message records** — `text`, `date`, `views`, `author`, and a direct post `url` for each message.
- 🔁 **Forward tracking** — `isForwarded` and `forwardedFrom` reveal reposted content and its source.
- 🖼️ **Media flags** — `hasPhoto` and `hasVideo` mark messages carrying images or video/documents.
- 🔗 **Extracted links** — every outbound URL in a message is collected in the `links` array.
- 📈 **Deep history** — fetch up to 5,000 recent messages per channel via automatic pagination.
- 🎯 **Flexible input** — accepts plain usernames (`durov`) or `t.me/...` URLs.

### What you get

![Telegram Channel Scraper output example — public channel posts as structured JSON](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/telegram-scraper-output.png?v=5)

Each message is one clean JSON record:

```json
{
  "id": 142,
  "channel": "telegram",
  "url": "https://t.me/telegram/142",
  "text": "Introducing a new feature for channels...",
  "date": "2026-07-21T09:30:00+00:00",
  "views": 1850000,
  "author": null,
  "isForwarded": false,
  "forwardedFrom": null,
  "hasPhoto": true,
  "hasVideo": false,
  "links": ["https://telegram.org/blog"]
}
```

#### Output schema

| Field | Type | Description |
|-------|------|-------------|
| `id` | integer | Message ID within the channel. |
| `channel` | string | Channel username. |
| `url` | string (URL) | Direct link to the post on t.me. |
| `text` | string | Message text content. |
| `date` | string (ISO date) | When the message was posted. |
| `views` | integer | View count of the message. |
| `author` | string | Post author or signature, when present. |
| `isForwarded` | boolean | Whether the message is a forward. |
| `forwardedFrom` | string | Source the message was forwarded from. |
| `hasPhoto` | boolean | Whether the message contains a photo. |
| `hasVideo` | boolean | Whether the message contains video or a document. |
| `links` | array | Outbound URLs found in the message. |

### Input

```json
{
  "channels": ["durov", "t.me/telegram"],
  "maxItemsPerChannel": 50,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

| Field | Description |
| --- | --- |
| `channels` | Public channel usernames or `t.me/...` URLs. |
| `maxItemsPerChannel` | Most recent messages per channel (up to 5000). |
| `proxyConfiguration` | Optional proxy; t.me works without one. |

### Use cases

- Monitor public channels for brand mentions and social listening.
- Track view counts and posting cadence over time.
- Collect links shared by news or community channels.
- Build research datasets from public Telegram content.

### Pricing

Pay-per-event: you're billed a small amount per run and per item scraped — you only pay for what you get. See the **Pricing** tab for current rates.

### FAQ

**How many messages can I scrape per channel?**
Up to 5,000 of the most recent messages per channel, fetched via automatic pagination. Set the exact number with `maxItemsPerChannel`.

**Is scraping Telegram legal?**
The Actor accesses only public channel content — never private, member-only, or account-gated messages. It is an independent tool, not affiliated with Telegram Messenger Inc.; use it in line with Telegram's terms and applicable law.

**What's the output format?**
Clean JSON with one record per message (text, date, views, author, forward info, media flags, links). Export as JSON, CSV, or Excel from the Apify Console or API.

**Can I filter or limit results?**
Yes. Use `maxItemsPerChannel` to cap how many recent messages are collected, and pass multiple channel usernames or `t.me/...` URLs to scrape several channels in one run.

**Can I integrate this with other tools?**
The Telegram Channel Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). It works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

### Related Actors

Extend your social listening and research coverage with:

- [Reddit Scraper](https://apify.com/hipersoft/reddit-scraper) — posts, comments, users, and subreddits.
- [Google News Scraper](https://apify.com/hipersoft/google-news-scraper) — headlines by keyword and topic from Google News RSS.
- [Hacker News Scraper](https://apify.com/hipersoft/hacker-news-scraper) — stories, comments, and users from Hacker News.
- [Website Contact Scraper](https://apify.com/hipersoft/website-contact-scraper) — extract emails, phones, and social links from websites.

### Notes

This Actor reads only the public t.me web preview of public channels, and no private or member-only content. It is an independent tool and is not affiliated with, endorsed by, or connected to Telegram Messenger Inc. Scrape public data only.

# Actor input Schema

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

Public Telegram channel usernames or t.me URLs (e.g. durov, t.me/telegram), one per line.

## `maxItemsPerChannel` (type: `integer`):

Most recent messages to fetch per channel (~20 per page).

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

Optional. t.me works without a proxy.

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "maxItemsPerChannel": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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("hipersoft/telegram-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("hipersoft/telegram-scraper").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": [
    "telegram"
  ]
}' |
apify call hipersoft/telegram-scraper --silent --output-dataset

```

## MCP server setup

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

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/o1hz2Y97oRH1TcrO2/builds/Y8H09sR41xH0sRh7R/openapi.json
