Open main menu


MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: stable
Implementation Tag, Parser function
Description Pull data from an external webservice into a wiki page
Author(s) Chris Reigrut, Key Bank / Key Equipment Finance
Latest version 0.3.0 (2009-03-20)
MediaWiki 1.11 - 1.13
License No license specified
Download Extension:Webservice#Installation
Translate the Webservice extension if it is available at
Check usage and version matrix.

This extension allows you to easily include information from an external webservice into a wiki page. For instance, you could pull data from a web page, an XML feed, etc.

It currently requires an internal version of tidy and PHP5. I'll likely add external Tidy and pre-PHP5 support at some point.



This is a function extension primarily, and takes three parameters (in order):

The full url of the webservice that you wish to use
The wikitext to insert into the page--additionally, anything between % signs will be replaced with the result of executing that text as an XPath string on the document returned from the URL.
Currently, there are three possible options:
  • IE - Impersonate Internet Explorer (by changing the user-agent)
  • TIDY-XHTML - Run tidy on the document returned from the URL, converting it to XHTML
  • COOKIE:key=value - Insert a cookie specified by the key and value into the request headers
  • ENCODING:value - The encoding of the web service information (needed by Tidy: see The Tidy documentation for valid values). Defaults to utf8.


{{#webservice:|The title of the webpage at is %//html/head/title%}}


  1. Create a directory called Webservice in your extensions directory
  2. Download webservice.php into your Webservice directory


If you are behind a proxy (i.e. you have set $wgHTTPProxy in LocalSettings.php), you can set an additional variable $wgHTTPProxyExceptions which is an array of URL patterns to exclude from the proxy. For example:

$wgHTTPProxyExceptions = array(

would exclude any URLs that end in, or

Changes to LocalSettings.phpEdit


Revision HistoryEdit

0.3.0 (03/20/2009)
Minor fixes to error handling

Sites using this extensionEdit

Please add your site (and a link if it is public) to the list! Thanks!

  • Key National Finance WiKey (internal intranet)