Portable infoboxes are a way to create infoboxes on Wikia using simplified XML markup. This page details how to interact with these infoboxes using MediaWiki's built-in APIs.

Using the API

While there is no officially announced API for portable infoboxes, it is still possible to access some data related to them.

Listing all infoboxes

A list of all portable infoboxes on the wiki can be obtained by using the querypage API to access Special:AllInfoboxes, e.g.:

Note: this data is cached and may not be up to date.

Listing all pages with a specific infobox

One simple way to retrieve all pages with an infobox is to use the embeddedin API to retrieve all pages that transclude the template, e.g.:

Listing all infoboxes on a page

To get data about the infoboxes on a specific page or group of pages, one can query the pageprops API:

// JavaScript
var config = {
    action: "query",
    prop: "pageprops",
    titles: [/* pages go here */].join("|")
function printInfoboxJson(data) {
    var pages = data.query.pages;
    Object.keys(pages).forEach(function (page) {
new mw.Api().get(config).then(printInfoboxJson);

It is important to note that the API returns the infobox data as a string, and not as JSON. As such the above code retrieves information about the given pages, and logs a stringified JSON array for each. Those arrays contain the information added to each infobox's tags, and will look something like this:

    "data": [{
        "type": "title",
        "data": {
            "value": "AjaxRC"
    }, {
        "type": "data",
        "data": {
            "label": " Type",
            "value": " <a href=\"\/wiki\/Category:JavaScript\" title=\"Category:JavaScript\">JavaScript<\/a>"
    }, {
        "type": "data",
        "data": {
            "label": "Description",
            "value": "Advanced auto refreshing recent changes and watchlist"
    "sources": ["Title", "type", "Description"]

Actual output:

The "sources" array contains the parameter names used in the actual page and / or template.

Note that the data in the infobox is not saved as wikitext but rather as html, and wikitext like [[:Category:JavaScript]] is converted to:

<a href=\"\/wiki\/Category:JavaScript\" title=\"Category:JavaScript\">JavaScript<\/a>"

See also