Parses the info boxes on Wikipedia pages into an associative array
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Wikipedia Info Box Parser

This library parses the info boxes on Wikipedia pages into an associative array.


The Wikipedia Info Box Parser package can be easily installed with Composer. Simply run the following command from the root of your project.

composer require divineomega/wikipedia-info-box-parser


See the example usage below.

use DivineOmega\WikipediaInfoBoxParser\Enums\Format;
use DivineOmega\WikipediaInfoBoxParser\WikipediaInfoBoxParser;

require_once __DIR__.'/../vendor/autoload.php';

$infobox = (new WikipediaInfoBoxParser())
//  ->setFormat(Format::HTML)

array(21) {
  string(12) "GitHub, Inc."
  string(27) "GitHub logo 2013 padded.svg"
  string(10) "Subsidiary"
  string(70) "February 8, 2008; 10 years ago (2008-02-08) (as Logical Awesome LLC)"
  string(31) "San Francisco, California, U.S."
  ["area served"]=>
  string(9) "Worldwide"
  string(60) "Tom Preston-Werner  Chris Wanstrath  P. J. HyettScott Chacon"
  string(12) "Nat Friedman"
  ["key people"]=>
  string(17) "P. J. Hyett (COO)"
  string(8) "Software"
  string(3) "Yes"
  string(6) "800[1]"
  string(10) ""
  ["programming language"]=>
  string(4) "Ruby"
  ["website type"]=>
  string(30) "Git-repository hosting service"
  string(53) "Optional (required for creating and joining projects)"
  string(25) "31 million (October 2018)"
  string(7) "English"
  string(43) "April 10, 2008; 10 years ago (2008-04-10)"
  ["current status"]=>
  string(6) "Active"
  string(24) "Microsoft (2018-present)"