Extension:External Data

Category:Extensions without an imageCategory:GPL licensed extensions
MediaWiki extensions manual
External Data
Release status: stableCategory:Stable extensions
Implementation Parser function Category:Parser function extensions, Special page Category:Special page extensions
Description Allows for using and displaying values retrieved from various sources: external URLs and SOAP services, local wiki pages and local files (in CSV, JSON, XML and other formats), database tables, LDAP servers and local programs output.
Author(s) Yaron Koren, Alexander Mashin and others
Latest version 3.3 (November 2023)
Compatibility policy Master maintains backward compatibility.Category:Extensions with master compatibility policy
MediaWiki 1.37+Category:Extensions with manual MediaWiki version
Database changes Yes
Tables ed_url_cache
License GNU General Public License 2.0 or later
Download See Download and installation
Example A page containing information retrieved from an external CSV file
  • $wgSources
  • $wgConnectors
  • $wgAllowGetters
  • $wgIntegratedConnectors
  • $wgVerbose
  • $wgParsers
Translate the External Data extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensions

The External Data extension allows MediaWiki pages to retrieve, filter, and format structured data from one or more sources. These sources can include external URLs and SOAP services, regular wiki pages, uploaded files, files on the local server, databases, LDAP directories and local programs output.

The extension defines the following parser functions:

  • Data retrieval and handling functions, which set local variables and then display or store them:
  • In the Legacy mode the extension also defines data retrieval functions, which set local variables available with wikipage scope that can later be displayed using the above functions:
    • #get_external_data - retrieves data from various sources, thus replacing any of the below parser functions, and assigns it to variables that can be accessed on the page.
    • #get_web_data - retrieves CSV, GFF, JSON, YAML, XML, HTML, ini, or free-form data from a URL and assigns it to variables that can be accessed on the page.
    • #get_soap_data - retrieves data from a URL via the SOAP protocol.
    • #get_file_data - retrieves data from a file on the local server, in the same formats as #get_web_data.
    • #get_db_data - retrieves data from a database.
    • #get_ldap_data - retrieves data from an LDAP server.
    • #get_program_data - retrieves data returned by a program run server-side.
    • #get_inline_data - parses data passed to it, in the same formats as #get_web_data.
    • and also #clear_external_data that erases the current set of retrieved data or only some variables.

It also defines a Lua function mw.ext.externalData.getExternalData that retrieves data and returns it as Lua table.

In the Legacy mode, the following additional Lua functions are also defined (there is one-to-one correspondence between parser functions retrieving data and Lua functions evident from their names):

  • mw.ext.externalData.getWebData
  • mw.ext.externalData.getFileData
  • mw.ext.externalData.getDbData
  • mw.ext.externalData.getSoapData
  • mw.ext.externalData.getLdapData
  • mw.ext.externalData.getProgramData
  • mw.ext.externalData.getInlineData

In tag emulation mode, the wiki site administrator can define additional parser tags.

This version of the External Data extension requires MediaWiki 1.37+.

Click through the pages in the navigation bar above to learn more about External Data, how it works, how to use it, and how to install it.

Category:Data extraction extensions Category:Remote content extensions Category:File system content extensions Category:Semantic MediaWiki extensions Category:Extensions in Wikimedia version control
Category:All extensions Category:Data extraction extensions Category:Extensions in Wikimedia version control Category:Extensions included in BlueSpice Category:Extensions included in Canasta Category:Extensions included in Miraheze Category:Extensions included in MyWikis Category:Extensions included in ProWiki Category:Extensions included in WikiForge Category:Extensions included in semantic::core Category:Extensions with manual MediaWiki version Category:Extensions with master compatibility policy Category:Extensions without an image Category:File system content extensions Category:GPL licensed extensions Category:LoadExtensionSchemaUpdates extensions Category:ParserFirstCallInit extensions Category:Parser function extensions Category:Remote content extensions Category:ScribuntoExternalLibraries extensions Category:Semantic MediaWiki extensions Category:SoftwareInfo extensions Category:Special page extensions Category:Stable extensions