PHPackages                             the-3labs-team/laravel-readability - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. the-3labs-team/laravel-readability

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

the-3labs-team/laravel-readability
==================================

Laravel Readability is a supercharged PHP client that makes it easy to extract and manipulate the main content of a web page.

v1.0.5(3mo ago)17479[2 PRs](https://github.com/The-3Labs-Team/laravel-readability/pulls)MITPHPPHP ^8.1CI passing

Since Mar 1Pushed 2w ago1 watchersCompare

[ Source](https://github.com/The-3Labs-Team/laravel-readability)[ Packagist](https://packagist.org/packages/the-3labs-team/laravel-readability)[ Docs](https://github.com/the-3labs-team/laravel-readability)[ RSS](/packages/the-3labs-team-laravel-readability/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (22)Versions (13)Used By (0)

[![Logo Laravel Readability](https://github.com/the-3labs-team/laravel-readability/raw/HEAD/art/banner.png)](https://github.com/the-3labs-team/laravel-readability/raw/HEAD/art/banner.png)

Laravel Readability
===================

[](#laravel-readability)

[![Latest Version on Packagist](https://camo.githubusercontent.com/666f414b79d57662fa7836d099fbf59a2c5b609ffd048be4eb159aff7702b801/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468652d336c6162732d7465616d2f6c61726176656c2d726561646162696c6974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/the-3labs-team/laravel-readability)[![GitHub Tests Action Status](https://camo.githubusercontent.com/91e4a79a505cf8fd85fa83900d177db72283c1335f305de5801515b2ae853ed9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7468652d336c6162732d7465616d2f6c61726176656c2d726561646162696c6974792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3Arun-tests+branch%3Amain)[![Github PHPStan](https://camo.githubusercontent.com/dbea44ae35ad309bce9813bf5145d431d5efdb48b66204170a47c8e216d7b05b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7468652d336c6162732d7465616d2f6c61726176656c2d726561646162696c6974792f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3Aphpstan+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/bb5b6776ef09b2b56c9da408c2fe30e1691b7398a39ef83044acd61cdcfa3117/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7468652d336c6162732d7465616d2f6c61726176656c2d726561646162696c6974792f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Maintainability](https://camo.githubusercontent.com/c00f32a1e774a38b5223e63acee2f828cbac69ceb2338751ae8523c23c7909b2/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30666366386363363039353266636336643238362f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/The-3Labs-Team/laravel-readability/maintainability)[![Test Coverage](https://camo.githubusercontent.com/b417d8493994a86ae63303be7722e26edfa7e2af5715b0989027c991b1663815/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30666366386363363039353266636336643238362f746573745f636f766572616765)](https://codeclimate.com/github/The-3Labs-Team/laravel-readability/test_coverage)[![License Mit](https://camo.githubusercontent.com/b3b89520b53d06cd919b8156fa18efa8b86e5498d0989dc1ccc1568e14ede1f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d7572646572636f64652f6c61726176656c2d73686f7274636f64652d706c7573)](https://camo.githubusercontent.com/b3b89520b53d06cd919b8156fa18efa8b86e5498d0989dc1ccc1568e14ede1f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d7572646572636f64652f6c61726176656c2d73686f7274636f64652d706c7573)[![Total Downloads](https://camo.githubusercontent.com/a69aaeba0273e184a45a1a3982b2be939f614242bfac0c4493a99af396d6e0c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7468652d336c6162732d7465616d2f6c61726176656c2d726561646162696c6974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/the-3labs-team/laravel-readability)

This package is a Laravel wrapper for [readability.php](https://github.com/fivefilters/readability.php). It provides a simple way to extract the main content from a webpage.

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

[](#installation)

You can install the package via composer:

```
composer require the-3labs-team/laravel-readability
```

Since it uses the readability.php package, you will need the following PHP extensions:

```
$ sudo apt-get install php7.4-xml php7.4-mbstring
```

Please change the version according to your PHP version.

Usage
-----

[](#usage)

```
use The3LabsTeam\LaravelReadability\Facades\Readability;

$html = '...';
$parsed = Readability::parse($html);
$title = $parsed->getTitle();
```

You can use the same methods as the original package. Please refer to the [readability.php documentation](https://github.com/fivefilters/readability.php).

```
$html = '...';
$parsed = Readability::parse($html);

$title = $parsed->getTitle();
$content = $parsed->getContent();
$excerpt = $parsed->getExcerpt();
$author = $parsed->getAuthor();
$direction = $parsed->getDirection();
$image = $parsed->getImage();
$images = $parsed->getImages();
```

### Get the source list

[](#get-the-source-list)

```
use The3LabsTeam\LaravelReadability\Readability as ReadabilityClass;

$html = '...';
$parse = (new ReadabilityClass($html))
->getSourceList(
    domainWhitelist: ['example.com', 'another-example.com/some-path'],
    tagsToExtract: ['a', 'iframe', 'text'] // Optional, default is ['a', 'iframe']
)
->parse();
$content = $parsed->getContent();
```

´$content´ will contain the list of sources in the article.

```
...
Source list: https://example.com/source1, https://example.com/source2
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Stefano Novelli](https://github.com/murdercode)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Sponsor
-------

[](#sponsor)

 [ ![Tom's Hardware - Notizie, recensioni, guide all'acquisto e approfondimenti per tutti gli appassionati di computer, smartphone, videogiochi, film, serie tv, gadget e non solo](https://camo.githubusercontent.com/a9fa1ed2b6a72e6fcb0b2f3176c99d5073f5b75d532223562736659d447022f2/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f746f6d732e706e67) ](https://www.tomshw.it/) [ ![Spaziogames - Tutto sul mondo dei videogiochi. Troverai tantissime anteprime, recensioni, notizie dei giochi per tutte le console, PC, iPhone e Android.](https://camo.githubusercontent.com/e197c1e8d1428d36e0a1f9b9ec750b26d9432a7a2911c926c3aa29852edfdf6b/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f7370617a696f2e706e67) ](https://spaziogames.it/)
 [ ![Cpop - News, recensioni, guide su fumetto, cinema & serie TV, gioco da tavolo e di ruolo e collezionismo. Tutto quello di cui hai bisogno per rimanere aggiornato sul mondo della cultura pop](https://camo.githubusercontent.com/d6c1e37a8034b0d2d7df21c8130509e6ca539141bbed582a39021ea1a9f9d479/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f63706f702e706e67) ](https://cpop.it/) [ ![Data4Biz - Sito dedicato alla trasformazione digitale del business](https://camo.githubusercontent.com/5558e851010e4ae4b5cb43921a90e7cf67afd89d3e6b9ce5c780858e6f34ab19/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f6434622e706e67) ](https://data4biz.com/)
 [ ![SOS Home & Garden - Realtà dedicata a 360 gradi ai settori della casa e del giardino.](https://camo.githubusercontent.com/ef1f19fa4635ea5a313915fb5e7e4fdfc97007e168f51cf4da5009a9b1934da2/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f736f732e706e67) ](https://soshomegarden.com/) [ ![Techradar - Le ultime notizie e recensioni dal mondo della tecnologia, su computer, sistemi per la casa, gadget e altro.](https://camo.githubusercontent.com/df0dac8e4d85175fac6143938c38e370f9fdfa60d19647e8cafe554624246b33/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f7465636872616461722e706e67) ](https://global.techradar.com/it-it)
 [ ![Aibay - Scopri AiBay, il leader delle notizie sull'intelligenza artificiale. Resta aggiornato sulle ultime innovazioni, ricerche e tendenze del mondo AI con approfondimenti, interviste esclusive e analisi dettagliate.](https://camo.githubusercontent.com/647cb00914c70c5851526defce1b0a9ec012e2fcd97ddb029c8abda7bf9c2037/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f61696261792e706e67) ](https://aibay.it/) [ ![Coinlabs - Notizie, analisi approfondite, guide e opinioni aggiornate sul mondo delle criptovalute, blockchain e finanza](https://camo.githubusercontent.com/5b483d538588264ca081383dacf830d9aab280a07c2388c70bd02887ef59fa0f/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f636f696e6c6162732e706e67) ](https://coinlabs.it/)

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.1% 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 ~151 days

Recently: every ~188 days

Total

6

Last Release

100d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/122809067?v=4)[the-3labs-team](/maintainers/the-3labs-team)[@The-3Labs-Team](https://github.com/The-3Labs-Team)

---

Top Contributors

[![murdercode](https://avatars.githubusercontent.com/u/7630252?v=4)](https://github.com/murdercode "murdercode (54 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![Claudio-Emmolo](https://avatars.githubusercontent.com/u/113107618?v=4)](https://github.com/Claudio-Emmolo "Claudio-Emmolo (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

accessibilitylaravelphplaravelThe-3Labs-Teamlaravel-readability

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/the-3labs-team-laravel-readability/health.svg)

```
[![Health](https://phpackages.com/badges/the-3labs-team-laravel-readability/health.svg)](https://phpackages.com/packages/the-3labs-team-laravel-readability)
```

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)

PHPackages © 2026

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