# Telegram Channel Scraper (`boundary/telegram-channel-scraper`) Actor

Scrape public Telegram channel posts — text, photos, videos, reactions, polls, link previews, and more. No login or API key needed.

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

## Pricing

from $2.00 / 1,000 posts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

Scrape posts from any public Telegram channel — text, photos, videos, reactions, polls, link previews, and more. No login or API key needed.

### Features

- Extracts **full post data**: text (plain + HTML), photos, videos, reactions, views, polls, link previews, inline buttons
- Scrapes **channel metadata**: title, description, subscriber count, avatar, verified status
- Accepts **flexible input**: full URLs, short URLs, @handles, or just the username
- Handles **pagination** automatically — scrape hundreds or thousands of posts
- **No authentication required** — works via Telegram's public web preview
- Supports **multiple channels** in a single run
- Lightweight — uses HTTP requests only, no browser needed

### How much does it cost?

With Telegram Channel Scraper, you can scrape **1,000 posts for about $0.50** in Apify platform credits. One page fetch returns 20 posts, so even large channels are efficient.

Running on the free plan? You can scrape several hundred posts per month at no cost.

### Input

| Field | Description | Default |
|-------|-------------|---------|
| **Channels** | Paste channel URLs from your browser (e.g. `https://t.me/bitcoin`). You can also use the @handle from the channel's profile page. | Required |
| **Post Limit** | Maximum posts per channel (0 = unlimited) | 100 |
| **Not Older Than** | Stop scraping when posts are older than this date (YYYY-MM-DD) | No limit |

### Output example

Each post is saved as a JSON object:

```json
{
  "channelName": "bitcoin",
  "channelTitle": "Bitcoin",
  "channelDescription": "This is the top Telegram channel for #Bitcoin news...",
  "channelImageUrl": "https://cdn5.telesco.pe/file/...",
  "subscriberCount": 211000,
  "isVerified": false,
  "messageId": 18823,
  "messageUrl": "https://t.me/bitcoin/18823",
  "date": "2026-03-12T15:11:31+00:00",
  "isEdited": false,
  "text": "JUST IN: Michael Saylor's Strategy bought over 1,001 bitcoin...",
  "textHtml": "JUST IN: <b>Michael Saylor's Strategy</b> bought over...",
  "views": 6030,
  "reactions": [
    { "emoji": "❤", "count": 31, "isPaid": false },
    { "emoji": "⚡", "count": 25, "isPaid": false }
  ],
  "isGroupedMedia": false,
  "photoUrls": ["https://cdn1.telesco.pe/file/..."],
  "videoUrls": [],
  "videoDurations": [],
  "videoThumbnailUrls": [],
  "linkPreview": null,
  "inlineButtons": null,
  "poll": null,
  "forwardedFrom": null,
  "author": null,
  "scrapedAt": "2026-03-14T01:38:18.104Z"
}
````

### All output fields

| Field | Type | Description |
|-------|------|-------------|
| `channelName` | string | Channel username |
| `channelTitle` | string | Channel display name |
| `channelDescription` | string | Channel bio |
| `channelImageUrl` | string | Channel avatar URL |
| `subscriberCount` | number | Subscriber count |
| `isVerified` | boolean | Whether channel has verified badge |
| `messageId` | number | Telegram message ID |
| `messageUrl` | string | Direct link to the post |
| `date` | string | Post date (ISO 8601) |
| `isEdited` | boolean | Whether the post was edited |
| `text` | string | Plain text content |
| `textHtml` | string | HTML-formatted content (preserves links, bold, etc.) |
| `views` | number | View count |
| `reactions` | array | Emoji reactions with counts |
| `isGroupedMedia` | boolean | Whether post is a media album |
| `photoUrls` | array | Photo CDN URLs |
| `videoUrls` | array | Video CDN URLs (may expire) |
| `videoDurations` | array | Video durations |
| `videoThumbnailUrls` | array | Video thumbnail URLs |
| `linkPreview` | object | Link preview (url, title, description, image) |
| `poll` | object | Poll (question, options with percentages, voter count) |
| `inlineButtons` | array | Bot buttons (rows of {text, url}) |
| `forwardedFrom` | object | Forwarded source (name, url) |
| `replyToMessageId` | number | ID of the message being replied to |
| `author` | string | Post author signature |
| `scrapedAt` | string | When the data was scraped (ISO 8601) |

### Tips

- **Video URLs expire** — photo URLs are permanent, but video CDN URLs have a token that expires after a few hours. Download videos promptly after scraping.
- **Private channels can't be scraped** — this actor uses Telegram's public web preview, so only public channels work. Private channels will be skipped with a clear error message.
- **Use "Not Older Than" to save costs** — for recurring scrapes, set a date cutoff so you only fetch new posts.
- **Post limit is per channel** — if you scrape 3 channels with a limit of 100, you'll get up to 300 posts total.

# Actor input Schema

## `channelUrls` (type: `array`):

Paste channel URLs from your browser (e.g. https://t.me/WallStreetBetsLive). You can also use the @handle shown on the channel's profile page. Note: the @handle may differ from the display name — for example, the channel 'WallStreetBets' has the handle @WallStreetBetsLive.

## `postLimit` (type: `integer`):

Maximum number of posts to scrape per channel, starting from the latest. Set to 0 for unlimited — this will scrape the entire channel history, which may take a long time and cost more for large channels.

## `notOlderThan` (type: `string`):

Stop scraping when posts are older than this date (YYYY-MM-DD). Scrapes from the latest post backwards until this date is reached. Leave empty for no date cutoff.

## Actor input object example

```json
{
  "channelUrls": [
    "https://t.me/telegram"
  ],
  "postLimit": 100
}
```

# Actor output Schema

## `results` (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 = {
    "channelUrls": [
        "https://t.me/telegram"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("boundary/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 = { "channelUrls": ["https://t.me/telegram"] }

# Run the Actor and wait for it to finish
run = client.actor("boundary/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 '{
  "channelUrls": [
    "https://t.me/telegram"
  ]
}' |
apify call boundary/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Telegram Channel Scraper",
        "description": "Scrape public Telegram channel posts — text, photos, videos, reactions, polls, link previews, and more. No login or API key needed.",
        "version": "1.0",
        "x-build-id": "klKX5ezdhvNLVMQBx"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/boundary~telegram-channel-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-boundary-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/boundary~telegram-channel-scraper/runs": {
            "post": {
                "operationId": "runs-sync-boundary-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/boundary~telegram-channel-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-boundary-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",
                "required": [
                    "channelUrls"
                ],
                "properties": {
                    "channelUrls": {
                        "title": "Channels",
                        "type": "array",
                        "description": "Paste channel URLs from your browser (e.g. https://t.me/WallStreetBetsLive). You can also use the @handle shown on the channel's profile page. Note: the @handle may differ from the display name — for example, the channel 'WallStreetBets' has the handle @WallStreetBetsLive.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "postLimit": {
                        "title": "Post Limit",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of posts to scrape per channel, starting from the latest. Set to 0 for unlimited — this will scrape the entire channel history, which may take a long time and cost more for large channels.",
                        "default": 100
                    },
                    "notOlderThan": {
                        "title": "Not Older Than (e.g. 2025-01-01)",
                        "type": "string",
                        "description": "Stop scraping when posts are older than this date (YYYY-MM-DD). Scrapes from the latest post backwards until this date is reached. Leave empty for no date cutoff."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
