Wikidata:SPARQL query service

What is SPARQL

SPARQL (pronounced "sparkle") is an RDF query language, that is, a semantic query language for databases. Wikidata provides an SPARQL endpoint including a powerful web GUI since September 2015. With SPARQL, you can extract any kind of data, with a query composed of logical combinations of triples.

Learning SPARQL

Presentation "SPARQL and Wikidata intro" by shonagon- École de Bibliothécaires Documentalistes (French) (2016-04-04)

Help for new queries

Other materials

Interfacing

SPARQL queries can be submitted directly to the SPARQL endpoint with GET request to https://query.wikidata.org/bigdata/namespace/wdq/sparql?query={SPARQL} or the endpoint's alias https://query.wikidata.org/sparql?query={SPARQL}. The result is returned as XML by default, or as JSON if either the query parameter format=json or the header Accept: application/sparql-results+json are provided. See the user manual for more detailed information. RDF data can alternatively be accessed via a Linked Data Fragments interface at https://query.wikidata.org/bigdata/ldf.

Wikimedia SPARQL query services

On Wikidata, the WDQS allows practicing SPARQL queries creation in an intuitive way.
Human interface Machine's endpoint Description
Wikidata Query Service (WDQS) https://query.wikidata.org/sparql Run SPARQL Queries on the "main" subset upon the Wikidata Wikibase instance. Run, test, download the data as XML, JSON, CSV, or TSV. Has advanced user-friendly features such as: word hovering to see a term's meaning, code optimization, etc.
Wikidata Query Service (WDQS) https://query-scholarly.wikidata.org/sparql Run SPARQL Queries on the "scholarly" subset upon the Wikidata Wikibase instance (cf. WDQS graph split for more information). Run, test, download the data as XML, JSON, CSV, or TSV. Has advanced user-friendly features such as: word hovering to see a term's meaning, code optimization, etc.
Wikimedia Commons Query Service (WCQS) https://commons-query.wikimedia.org/sparql Run SPARQL Queries upon the Wikimedia Commons Wikibase instance.
LinguaLibre Query Service (LLQS) https://lingualibre.org/bigdata/#query Run SPARQL Queries upon the LinguaLibre Wikibase instance. Run, test, download the data as XML, JSON, CSV, or TSV.

Federated queries

Up-to-date federation documentation is gathered on the page Wikidata:SPARQL_query_service/Federated_queries.

Lists of available endpoints: Report that tests available endpoints for federation. The report is based on this list. And this is the production config.

An older list of available endpoints that is currently not being updated.

Stats

Further resources

Category:SPARQL#%20 Category:Wikidata:SPARQL query service#* Category:Wikidata-en Category:Wikidata front ends
Category:SPARQL Category:Wikidata-en Category:Wikidata:SPARQL query service Category:Wikidata front ends