illuminated/wikipedia-grabber
| Install | |
|---|---|
composer require illuminated/wikipedia-grabber |
|
| Latest Version: | 13.0.0 |
| PHP: | ^8.3 |
| Laravel: | 13 |
| Older releases: | 5 – 12 |
| License: | MIT |
| Last Updated: | Oct 8, 2026 |
| Links: | GitHub · Packagist |

Laravel Wikipedia Grabber
Wikipedia/MediaWiki Grabber for Laravel.
| Laravel | Wikipedia Grabber |
|---|---|
| 13.x | 13.x |
| 12.x | 12.x |
| 11.x | 11.x |
| 10.x | 10.x |
| 9.x | 9.x |
| 8.x | 8.x |
| 7.x | 7.x |
| 6.x | 6.x |
| 5.8.* | 5.8.* |
| 5.7.* | 5.7.* |
| 5.6.* | 5.6.* |
| 5.5.* | 5.5.* |

Table of contents
Usage
-
Install the package via Composer:
composer require illuminated/wikipedia-grabber -
Publish the config:
php artisan vendor:publish --provider="Illuminated\Wikipedia\WikipediaGrabberServiceProvider" -
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
Here's the list of supported output formats:
plain(default)bootstrapbulma
Change the format in your config file, or specify it explicitly:
echo (new Wikipedia)->page('Michael Jackson')->bulma();
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
MediaWiki
Wikipedia uses the MediaWiki API 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
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)
);
License
Laravel Wikipedia Grabber is open-sourced software licensed under the MIT license.
Related Packages
A multi-framework Composer library installer
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 13.0.0 | ^8.3 | ^13.0 | MIT | |
| 12.0.0 | ^8.2 | ^12.0 | MIT | |
| 11.0.0 | ^8.2 | ^11.0 | MIT | |
| 10.0.0 | ^8.1 | ^10.0 | MIT | |
| 9.1.0 | ^8.0.2 | ^9.0 | MIT | |
| 9.0.0 | ^8.0.2 | ^9.0 | MIT | |
| 8.2.0 | ^7.3| | ^8.0 | MIT | |
| 8.1.0 | ^7.3| | ^8.0 | MIT | |
| 8.0.0 | ^7.3 | ^8.0 | MIT | |
| 7.1.0 | ^7.2.5| | ^7.0 | MIT | |
| 7.0.0 | ^7.2.5 | ^7.0 | MIT | |
| 6.1.0 | ^7.2.5| | ^6.0 | MIT | |
| 6.0.0 | ^7.2 | ^6.0 | MIT | |
| 5.8.0 | ^7.1.3 | 5.8.* | MIT | |
| 5.7.4 | ^7.1.3 | 5.7.* | MIT | |
| 5.7.3 | ^7.1.3 | 5.7.* | MIT | |
| 5.7.2 | ^7.1.3 | 5.7.* | MIT | |
| 5.7.1 | ^7.1.3 | 5.7.* | MIT | |
| 5.7.0 | ^7.1.3 | 5.7.* | MIT | |
| 5.6.5 | ^7.1.3 | 5.6.* | MIT | |
| 5.6.4 | ^7.1.3 | 5.6.* | MIT | |
| 5.6.3 | ^7.1.3 | 5.6.* | MIT | |
| 5.6.2 | ^7.1.3 | 5.6.* | MIT | |
| 5.6.1 | ^7.1.3 | 5.6.* | MIT | |
| 5.6.0 | ^7.1.3 | 5.6.* | MIT | |
| 5.5.3 | >=7.0 | 5.5.* | MIT | |
| 5.5.2 | >=7.0 | 5.5.* | MIT | |
| 5.5.1 | >=7.0 | 5.5.* | MIT | |
| 5.5.0 | >=7.0 | 5.5.* | MIT |