MediaWiki extensions manual
Release status: experimental
Description Adds #metadata parser function to set page properties, and expose them via ‎<meta> tags and a REST API endpoint
Author(s) Sophivorustalk
Latest version 4.0
MediaWiki >= 1.35.0
License GNU General Public License 3.0 or later
Quarterly downloads 1 (Ranked 131st)
Translate the Metadata extension if it is available at translatewiki.net

The Metadata extension adds the #metadata parser function to set page properties, and exposes them via ‎<meta> tags and a REST API endpoint.


  • Download and move the extracted Metadata folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Metadata
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Metadata' );
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.



To set a simple key-value pair for the current page:


And to set multiple key-value pairs in a single call:

| key = value
| foo = bar
| baz

Keys with no value will be assigned a "1" value.

Once set, the properties will be accessible via the HTML <meta> tags, like so:

<meta name="key" content="value" />
<meta name="foo" content="bar" />
<meta name="baz" content="1" />

And also, via the "props" endpoint introduced by this extension to the MediaWiki REST API, with the following URL pattern:


Finally, the properties can also be accessed via the Properties module of the MediaWiki Action API, with the following URL pattern:


See also