PHPackages                             ymsoft/telegram-channel-scrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. ymsoft/telegram-channel-scrapper

ActiveLibrary[Queues &amp; Workers](/categories/queues)

ymsoft/telegram-channel-scrapper
================================

Public telegram channel scrapper.

1.0.1(2y ago)127↓100%MITPHPPHP ^8.1

Since Nov 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ymsft/telegram-channel-scrapper)[ Packagist](https://packagist.org/packages/ymsoft/telegram-channel-scrapper)[ RSS](/packages/ymsoft-telegram-channel-scrapper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine/)

Public telegram channels scrapper
=================================

[](#public-telegram-channels-scrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f13e75d2fd1e7f6f8f8f293b2d01b8fc2c42419f58ad86736c2764da6361326f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796d736f66742f74656c656772616d2d6368616e6e656c2d73637261707065722e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ymsoft/telegram-channel-scrapper)[![License](https://camo.githubusercontent.com/633374ee73d355492c0b91c51bba723f1a1bbfb2ff20c68cb0b2ff1e882eadbf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f796d7366742f74656c656772616d2d6368616e6e656c2d73637261707065723f7374796c653d666f722d7468652d6261646765)](https://github.com/ymsft/telegram-channel-scrapper/blob/master/LICENSE.md)

[![PHP from Packagist](https://camo.githubusercontent.com/07c385846bfd2086bd78369c694b5fae1cd23f2d7c099d69b51721480aad4885/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f796d736f66742f74656c656772616d2d6368616e6e656c2d73637261707065723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ymsoft/telegram-channel-scrapper)[![PHP Composer](https://github.com/ymsft/telegram-channel-scrapper/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/ymsft/telegram-channel-scrapper/actions/workflows/php.yml)[![Total Downloads](https://camo.githubusercontent.com/1b734dd20a401973ad5d79d91e78f5d6b8276edbf384ea9c97d6895287dcf288/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796d736f66742f74656c656772616d2d6368616e6e656c2d73637261707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ymsoft/telegram-channel-scrapper)

This package is intended for those who need to efficiently scrape a public telegram channel. This is done quite easily:

```
use Ymsoft\TelegramChannelScrapper\TelegramCS;

$scrapper = new TelegramCS('channel_name');

/** @var \Ymsoft\TelegramChannelScrapper\Entity\Channel $channel */
$channel = $scrapper->getChannel();

/**
 * By default, you will scrap the latest 20 messages.
 * @var \Illuminate\Support\Collection $messages
 */
$messages = $scrapper->getMessages();
$messages->count(); // will return 20

// In order to download 20 more messages you need
$scrapper->loadPrevMessages();

$scrapper->getMessages()->count() // will return 40

// You can download old messages endlessly until you download everything.
```

Since this package uses [illuminate/collections](https://github.com/illuminate/collections) you can use all [the methods described here](https://laravel.com/docs/10.x/collections#available-methods) to work with a collection of messages.

```
/**
 * @var \Illuminate\Support\Collection $messages
 */
$messages = $service->getMessage();
$messages->all();
$messages->count();
$messages->toArray();
$messages->firstWhere('id', 1);
$messages->last();
$messages->first();

// and much more https://laravel.com/docs/10.x/collections#available-methods
```

### Channel

[](#channel)

View all entity attributes [Channel](src/Entity/Channel.php).

### Message

[](#message)

View all entity attributes [Message](src/Entity/Message/Message.php).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ymsoft/telegram-channel-scrapper
```

Advanced usage
--------------

[](#advanced-usage)

### Scrap special message by concrete id

[](#scrap-special-message-by-concrete-id)

If you know the message ID you can get it:

```
use Ymsoft\TelegramChannelScrapper\TelegramCS;

$service = new TelegramCS('channel_name');

/** @var \Ymsoft\TelegramChannelScrapper\Entity\Message\Message $message */
$message = $service->getMessageById(1);
```

### Http client (CUSTOM HEADERS &amp; PROXY)

[](#http-client-custom-headers--proxy)

If you want to add your own headers or make requests through a proxy, you can pass your http client instance as the second parameter:

```
use Ymsoft\TelegramChannelScrapper\TelegramCS;

/*
 * You can provide any http client that implements psr/http-client
 * Psr\Http\Client
 */

$client = new \GuzzleHttp\Client([
    'headers' => [
        'Accept-Language' => 'en-US,en;q=0.9',
        'Accept' => 'text/html',
    ],
    'proxy' => 'http://localhost:8125',
]);

$service = new TelegramCS('channel_name', $client);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](https://github.com/ymsft/telegram-channel-scrapper/releases) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Thank you for considering contributing to the TelegramCS Package!

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

903d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab43ca0f87c85adc46012a3a091b73b851eb67c59944568a0b4a01250e8e6a69?d=identicon)[yarmat](/maintainers/yarmat)

---

Top Contributors

[![yarmat](https://avatars.githubusercontent.com/u/16940233?v=4)](https://github.com/yarmat "yarmat (3 commits)")

---

Tags

messagetelegramscrapperchannle

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ymsoft-telegram-channel-scrapper/health.svg)

```
[![Health](https://phpackages.com/badges/ymsoft-telegram-channel-scrapper/health.svg)](https://phpackages.com/packages/ymsoft-telegram-channel-scrapper)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[aliyunmq/mq-http-sdk

Aliyun Message Queue(MQ) Http PHP SDK, PHP&gt;=5.5.0

75379.9k11](/packages/aliyunmq-mq-http-sdk)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
