aoinan provides utilities to extract structured data from MediaWiki pages (including Wikipedia).

aoinan can fetch remote pages from a MediaWiki server, extract structured data and return it to you. It is heavily based on the WTF Wikipedia module for its parsing of wiki text.


yarn add aoinan


Before using aoinan, you need to tell it more about the server it needs to connect to.

const aoinan = require('aoinan');
  server: '',
  path: '/mediawiki',

See the Initialization section for more details.

Querying one page

You can then query any page by passing its title to

const scenario = await'The Burden of Envy');

See the Page section for more details.


You can get all pages of a given category by calling aoinan.category.

const scenarios = await aoinan.category('Season_1_(2E)_scenarios');