PHPackages                             illuminated/wikipedia-grabber - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. illuminated/wikipedia-grabber

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

illuminated/wikipedia-grabber
=============================

Wikipedia/MediaWiki Grabber for Laravel.

12.0.0(1y ago)477.3k5MITHTMLPHP ^8.2

Since Jul 13Pushed 1y ago3 watchersCompare

[ Source](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber)[ Packagist](https://packagist.org/packages/illuminated/wikipedia-grabber)[ RSS](/packages/illuminated-wikipedia-grabber/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (40)Used By (0)

[![Wikipedia/MediaWiki Grabber for Laravel](art/1380x575-optimized.jpg)](art/1380x575-optimized.jpg)

Laravel Wikipedia Grabber
=========================

[](#laravel-wikipedia-grabber)

[![Buy me a coffee](https://user-images.githubusercontent.com/1286821/181085373-12eee197-187a-4438-90fe-571ac6d68900.png)](https://buymeacoffee.com/dmitry.ivanov)

[![StyleCI](https://camo.githubusercontent.com/8fea4f55d726d8f82a82760b7508599ffd41e25a5310a381f7d82cec3557c9b1/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3131373939383539392f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://github.styleci.io/repos/117998599?branch=master)[![Build Status](https://camo.githubusercontent.com/f55b467f8fab63a00aeafced97339a595d34da10921ac7c2ad8616f4767a4c40/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f646d697472792d6976616e6f762f6c61726176656c2d77696b6970656469612d677261626265722f74657374732e796d6c3f6272616e63683d6d6173746572)](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/actions?query=workflow%3Atests+branch%3Amaster)[![Coverage Status](https://camo.githubusercontent.com/b8e3ce35e48b5fd62af5338bef7f1f665df7fe6673478a46cfcc8db979bef654/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f646d697472792d6976616e6f762f6c61726176656c2d77696b6970656469612d677261626265722f6d6173746572)](https://app.codecov.io/gh/dmitry-ivanov/laravel-wikipedia-grabber/tree/master)

[![Packagist Version](https://camo.githubusercontent.com/fc0ad35f7da141dedcb361ad1f3760c259216bc170f3343dd3b7587b7f611b66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696c6c756d696e617465642f77696b6970656469612d67726162626572)](https://camo.githubusercontent.com/fc0ad35f7da141dedcb361ad1f3760c259216bc170f3343dd3b7587b7f611b66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696c6c756d696e617465642f77696b6970656469612d67726162626572)[![Packagist Stars](https://camo.githubusercontent.com/031de5cc286dcb9a7315efe52c3c67e3f762706df8ef9213a239340a539f982a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f696c6c756d696e617465642f77696b6970656469612d67726162626572)](https://camo.githubusercontent.com/031de5cc286dcb9a7315efe52c3c67e3f762706df8ef9213a239340a539f982a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f696c6c756d696e617465642f77696b6970656469612d67726162626572)[![Packagist Downloads](https://camo.githubusercontent.com/e9fcbbd0ca312eb8db6f8784e71c044ddad885fd4a311945e39016b4455ff911/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696c6c756d696e617465642f77696b6970656469612d67726162626572)](https://camo.githubusercontent.com/e9fcbbd0ca312eb8db6f8784e71c044ddad885fd4a311945e39016b4455ff911/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696c6c756d696e617465642f77696b6970656469612d67726162626572)[![Packagist License](https://camo.githubusercontent.com/705b114d127804e24da66b38c138d97628a136dfe2bd70f2ae701708ae4ef5dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696c6c756d696e617465642f77696b6970656469612d67726162626572)](https://camo.githubusercontent.com/705b114d127804e24da66b38c138d97628a136dfe2bd70f2ae701708ae4ef5dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696c6c756d696e617465642f77696b6970656469612d67726162626572)

Wikipedia/MediaWiki Grabber for Laravel.

LaravelWikipedia Grabber12.x[12.x](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/12.x)11.x[11.x](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/11.x)10.x[10.x](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/10.x)9.x[9.x](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/9.x)8.x[8.x](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/8.x)7.x[7.x](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/7.x)6.x[6.x](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/6.x)5.8.\*[5.8.\*](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/5.8)5.7.\*[5.7.\*](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/5.7)5.6.\*[5.6.\*](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/5.6)5.5.\*[5.5.\*](https://github.com/dmitry-ivanov/laravel-wikipedia-grabber/tree/5.5)[![Laravel Wikipedia Grabber - Demo](doc/img/demo.gif)](doc/img/demo.gif)

Table of contents
-----------------

[](#table-of-contents)

- [Usage](#usage)
- [Output formats](#output-formats)
- [Available methods](#available-methods)
- [Advanced](#advanced)
    - [MediaWiki](#mediawiki)
    - [Modify the grabbed page](#modify-the-grabbed-page)
- [Sponsors](#sponsors)
- [License](#license)

Usage
-----

[](#usage)

1. Install the package via Composer:

    ```
    composer require illuminated/wikipedia-grabber
    ```
2. Publish the config:

    ```
    php artisan vendor:publish --provider="Illuminated\Wikipedia\WikipediaGrabberServiceProvider"
    ```
3. Grab a full page or preview:

    ```
    use Wikipedia;

    echo (new Wikipedia)->page('Michael Jackson');
    echo (new Wikipedia)->preview('Michael Jackson');

    // Or

    echo (new Wikipedia)->randomPage();
    echo (new Wikipedia)->randomPreview();
    ```

Output formats
--------------

[](#output-formats)

Here's the list of supported output formats:

- `plain` (default)
- `bootstrap`
- `bulma`

Change the format in your config file, or specify it explicitly:

```
echo (new Wikipedia)->page('Michael Jackson')->bulma();
```

Available methods
-----------------

[](#available-methods)

When you call the `page()` or `preview()` method, you'll get an instance of the proper object.

There are numerous methods available on these objects, for example:

```
$page = (new Wikipedia)->page('Michael Jackson');

$page->isSuccess();         // true
$page->isMissing();         // false
$page->isInvalid();         // false
$page->isDisambiguation();  // false

echo $page->getId();        // 14995351
echo $page->getTitle();     // "Michael Jackson"
echo $page->getBody();      // Same as `echo $page;`
```

Advanced
--------

[](#advanced)

### MediaWiki

[](#mediawiki)

Wikipedia uses the [MediaWiki API](https://mediawiki.org/wiki/API:Main_page) under the hood.

Thus, you can grab pages from any MediaWiki website:

```
use MediaWiki;

echo (new MediaWiki($url))->page('Michael Jackson');
```

### Modify the grabbed page

[](#modify-the-grabbed-page)

Sometimes it might be useful to append additional sections to the grabbed page:

```
$page = (new Wikipedia)->page('Michael Jackson');

$page->append('Interesting Facts', 'He had two pet llamas on his ranch called Lola and Louis.');
```

Alternatively, you can get the sections collection and change it as needed:

```
$page = (new Wikipedia)->page('Michael Jackson');

$sections = $page->getSections();
$sections->push(
    new Section('Interesting Facts', 'He had two pet llamas on his ranch called Lola and Louis.', $level = 2)
);
```

Sponsors
--------

[](#sponsors)

[![Laravel Idea](art/sponsor-laravel-idea.png)](https://laravel-idea.com)
[![Material Theme UI Plugin](art/sponsor-material-theme.png)](https://material-theme.com)

License
-------

[](#license)

Laravel Wikipedia Grabber is open-sourced software licensed under the [MIT license](LICENSE.md).

[![Buy me a coffee](https://user-images.githubusercontent.com/1286821/181085373-12eee197-187a-4438-90fe-571ac6d68900.png)](https://buymeacoffee.com/dmitry.ivanov)

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance44

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 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 ~64 days

Recently: every ~91 days

Total

39

Last Release

435d ago

Major Versions

7.x-dev → 8.x-dev2021-10-14

8.2.0 → 9.0.02022-03-11

9.x-dev → 10.x-dev2024-03-06

10.0.0 → 11.x-dev2025-03-06

11.0.0 → 12.x-dev2025-03-06

PHP version history (10 changes)5.5.0PHP &gt;=7.0

5.6.0PHP ^7.1.3

6.0.0PHP ^7.2

7.0.0PHP ^7.2.5

8.0.0PHP ^7.3

6.1.0PHP ^7.2.5|^8.0

8.1.0PHP ^7.3|^8.0

9.0.0PHP ^8.0.2

10.x-devPHP ^8.1

11.x-devPHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b6a68d578b4021fbe05838e8e71ccd44b07879ffda6b7ec05c1deb65d0c88f8?d=identicon)[dmitry-ivanov](/maintainers/dmitry-ivanov)

---

Top Contributors

[![dmitry-ivanov](https://avatars.githubusercontent.com/u/1286821?v=4)](https://github.com/dmitry-ivanov "dmitry-ivanov (1170 commits)")

---

Tags

grabberlaravellaravel-packagemediawikiparserwikiwikipediawikipedia-grabberwikipedia-parserlaravelparsermediawikiwikigrabberwikipediawikipedia-grabberwikipedia-parser

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/illuminated-wikipedia-grabber/health.svg)

```
[![Health](https://phpackages.com/badges/illuminated-wikipedia-grabber/health.svg)](https://phpackages.com/packages/illuminated-wikipedia-grabber)
```

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[pherum/laravel-bbcode

Parse your BBCode easy with this library.

2427.5k](/packages/pherum-laravel-bbcode)

PHPackages © 2026

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