Wikidata Query Service/User Manual

= Introduction = Wikidata Query Service (WDQS) is the software package and public service designed to provide a SPARQL endpoint which allows to query against Wikidata data set.

Please note that the service is currently in beta mode, which means some details of the data set or the service provided can be changed without prior warning. This page or other relevant documentation pages will be updated accordingly, it is recommended to watch them if you are using the service.

You can see examples of the SPARQL Queries on the SPARQL Examples page.

Data set
The data set is the data from Wikidata.org, represented in RDF as described in RDF dump format documentation. Please note the service data set does not exactly match the data set produced by RDF dumps, mainly for performance reasons - there is a small set of differences described in RDF format documentation.

Extensions
The following are extensions to standard SPARQL capabilities supported by the service:

Label service
WDQS allows to fetch the label of the entity queried, with language fallback, using the specialized service with the URI 

Wikimedia service
Wikimedia runs the public service instance of WDQS, which is available for use at http://query.wikidata.org/.

GUI
The GUI at the home page of http://query.wikidata.org/ allows to edit submit SPARQL queries to the query engine. The results are displayed as HTML table. Note that every query has the unique URL which can be bookmarked for later use. Going to this URL will put the query in the edit window, but will not run it - you still have to click "Execute" for that.

One can also generate a short URL for the query via an URL shortening service by clicking "Generate short URL" link on the right - this will produce the shortened URL for the current query.

"Add prefixes" button generates the header containing standard prefixes for SPARQL queries. The full list of prefixes that can be useful is listed in RDF format documentation.

Missing features
Below is the list of features which are currently not supported:
 * Geolocation search. While the coordinates themselves are part of the data set, the operations on these coordinates - like comparison, search within radius, etc. - are not yet supported.
 * Redirects are only represented as owl:sameAs triple, but do not express any equivalence in the data and have no special support.
 * SERVICE requests to outside URLs are not allowed in queries.