# Telegram Scraper | Telegram Message Scraper (`bhansalisoft/telegram-group-channel-message-scraper`) Actor

This Telegram Scraper tool Scrape Telegram group and channel messages, chat history and available user information with a Telegram scraper. Export structured Telegram data through Apify.

- **URL**: https://apify.com/bhansalisoft/telegram-group-channel-message-scraper.md
- **Developed by:** [bhansalisoft](https://apify.com/bhansalisoft) (community)
- **Categories:** Social media, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 523 total users, 7 monthly users, 100.0% runs succeeded, 6 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

from $10.00 / 1,000 results

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/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 Scraper | Telegram Message Scraper

A powerful **Telegram scraper** for extracting messages, chat history, and available user information from Telegram groups and channels. Use this **Telegram group scraper** and **Telegram channel scraper** to collect structured Telegram data for research, analytics, content analysis, community monitoring, and automation.

### Telegram Group Scraper & Channel Scraper

This Telegram scraper makes it easy to collect messages from supported Telegram groups and channels. Enter a Telegram group or channel link or username, select the number of messages to extract, and start the Actor on Apify.

Use it as a **Telegram group message scraper** for community conversations or as a **Telegram channel scraper** for collecting channel content and message history.

### Key Features

- **Telegram Scraper** – Extract structured data from supported Telegram groups and channels.
- **Telegram Group Scraper** – Collect available messages and user information from Telegram groups.
- **Telegram Channel Scraper** – Scrape available messages from Telegram channels.
- **Telegram Message Scraper** – Extract Telegram message content and related user information.
- **Telegram Chat History Scraper** – Collect available historical messages from supported targets.
- **Telegram User Data** – Extract available user IDs, usernames, first names, last names, and access hashes.
- **Custom Message Limit** – Choose how many Telegram messages you want to collect.
- **Apify Dataset** – Store, view, download, and process your extracted Telegram data.
- **API Access** – Connect the scraper with your own applications and automation workflows.

### How to Scrape Message from Telegram Group and Telegram Channel

1. Click **Try for free**.
2. Enter a supported Telegram group or channel link or username.
3. Set the message limit.
4. Click **Start**.
5. Wait for the Actor to complete.
6. Open the Dataset to view or export your results.

### Input

#### Target_Group

**Type:** `string`

Enter the Telegram group or channel link or username from which you want to extract messages.

Example:

```text
https://t.me/+VTItdzrudoU2YTM0
```

#### Limit

**Type:** `integer`
**Default:** `10000`

Specifies how many Telegram messages you want to scrape.

Example input:

```json
{
  "Target_Group": "https://t.me/+VTItdzrudoU2YTM0",
  "Limit": 10000
}
```

You can process your Telegram data through the Apify API or export the Dataset for use in spreadsheets, databases, analytics tools, and other applications.

### What Data Can You Extract?

Depending on the Telegram target and available information, the Actor can return:

- Message content
- Telegram user ID
- Telegram username
- First name
- Last name
- Access hash when available
- Chat history
- Other available Telegram message information

For each available Telegram message, the Actor can return:

| Field         | Description                         |
| ------------- | ----------------------------------- |
| `Message`     | Telegram message content            |
| `user_id`     | Telegram user ID                    |
| `user_name`   | Telegram username                   |
| `access_hash` | Telegram access hash when available |
| `first_name`  | User's first name                   |
| `last_name`   | User's last name                    |

Example output:

```json
{
  "Message": "Hello everyone!",
  "user_id": "123456789",
  "user_name": "example_user",
  "access_hash": "987654321",
  "first_name": "John",
  "last_name": "Doe"
}
```

The extracted data is returned in a structured format through the Apify Dataset and can be used for analytics, research, archiving, and custom applications.

### Demo Videos for scrap telegram group or channel

https://youtu.be/RvVIcG1crnM

### Use Cases

The **Telegram scraper** can be useful for:

- Telegram group research
- Telegram channel monitoring
- Community analysis
- Market research
- Content analysis
- Social media analytics
- Message archiving
- Telegram data collection
- Research and automation workflows

### Frequently Asked Questions

#### What is a Telegram scraper?

A Telegram scraper is a tool that automatically collects available Telegram data and converts it into structured records for analysis, research, or automation.

#### Can I scrape Telegram groups?

Yes. This Actor can extract available messages and user information from supported Telegram groups.

#### Can I scrape Telegram channels?

Yes. Enter a supported Telegram channel link or username to collect available channel messages.

#### Is this a Telegram member scraper?

This Actor is primarily a **Telegram message scraper**, not a dedicated member-list scraper. For member extraction, use a Telegram member scraping Actor.

#### How many messages can I scrape?

The number of messages is controlled by the `Limit` input parameter. The default value is 10,000.

#### Can I export Telegram data?

Yes. Results are available through the Apify Dataset and can be downloaded or accessed through the Apify API.

Use this Telegram scraper responsibly and comply with applicable Telegram terms, privacy requirements, and local laws.

### Similar Telegram Tools

- [Telegram Member Adder](https://apify.com/bhansalisoft/telegram-channel-member-adder)
- [Telegram Group or Channel Adder Using Telegram UserName](https://apify.com/bhansalisoft/telegram-group-or-channel-adder-using-telegram-username)
- [Telegram Group or channel Message Scraper](https://apify.com/bhansalisoft/telegram-group-channel-message-scraper)
- [Telegram Bulk Message Sender](https://apify.com/bhansalisoft/telegram-bulk-message-sender)
- [Telegram Group or Member Scraper](https://apify.com/bhansalisoft/telegram-group-member-scraper)

### Support

if any issue you can message on telegram :@bhansalisoftware

# Actor input Schema

## `Target_Group` (type: `string`):

Target Group or channel link or username which message you want to extract

## `Limit` (type: `integer`):

How much Message you want to scrap

## Actor input object example

```json
{
  "Target_Group": "https://t.me/+VTItdzrudoU2YTM0",
  "Limit": 10000
}
```

# Actor output Schema

## `overview` (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 = {
    "Target_Group": "https://t.me/+VTItdzrudoU2YTM0"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bhansalisoft/telegram-group-channel-message-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 = { "Target_Group": "https://t.me/+VTItdzrudoU2YTM0" }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bhansalisoft/telegram-group-channel-message-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/FeGFbYFIZ9U5VFIjf/builds/VoNeTCKmuJlYSFv4a/openapi.json
