MW2SPARQL

MediaWiki 2 SPARQL is an experimental SPARQL endpoint for Wikimedia wikis working on top of their database. It is based on Ontop and rewrites SPARQL queries to SQL. The source code in on GitHub.

Are currently available:
 * An endpoint for the English Wikipedia: http://tools.wmflabs.org/mw2sparql/enwiki/sparql
 * An endpoint for the French Wikipedia: http://tools.wmflabs.org/mw2sparql/frwiki/sparql

As there is no UI built yet, you could use generic SPARQL endpoint user interfaces like YASGUI (you have to input the URL of the endpoint you want to query in the endpoint URI input).

The mapping is under work and is very partial and not stable.

Query examples
Retrieve the current facts available about the English Wikipedia SPARQL article:

execute in YASGUI. .

Current data model
The formal OWL definition of the model used is available at: http://tools.wmflabs.org/mw2sparql/ontology

Pages
A MediaWiki page. It has the  type and contains a , a  , is in a namespace stored in. Its content model is provided by. Internal links to other pages are connected by, categories by   and included pages by. Its latest revision is connected throw.

New pages have the type  and redirection pages the type.

Example:

Revision
A version of a MediaWiki page. Has the type, an oldid stored by  , belongs to the page connected by  , may have a previous revision provided by.

Example:

Known issues

 * GROUP BY is not supported