Wikidata:Query Builder

From Wikidata
Jump to navigation Jump to search
Wikidata Query Builder
Query Wikidata without knowing SPARQL

Short demo of the Wikidata Query Builder in 2022

Query Builder is a tool, developed by Wikimedia Deutschland, to allow people who don’t know how to use SPARQL to build lists of Items, for example for maintenance purposes. To use this Simple Query Builder, the user only needs basic knowledge of how Wikidata models the Items for which they query. We hope that it will allow more people to get their first experience building queries and then maybe advancing to writing SPARQL directly once they figured out the basics with the Query Builder and got interested.

Click here to try the Wikidata Query Builder


These pictures are screenshots from the current test system and have been updated in February 2021.

What Query Builder is not[edit]

  • As a form-based query builder, Query Builder is not meant to replace the Wikidata Query Service or SPARQL queries, but to enable easy access to some really important features of SPARQL that are already pretty powerful.
  • The Wikidata Query Builder will not include all of the features that SPARQL allows.
  • Access to the SPARQL code interface will still be available for people who want to build queries in SPARQL, and accessing the SPARQL code of the visual queries will be possible.
  • In the long run, the Query Builder will replace the existing "query helper" that is currently accessible from within the WDQS interface.


Development is happening. At the moment we are looking into adding support for more datatypes and making it possible to switch the language of the UI.

Features that are included in the current version[edit]

Here's a list of features included in the current version of the tool:

  • List Items that have a concrete statement value for a given Property (e.g. “occupation: painter”), at least for the following datatypes: Item, time, quantity
  • List Items that do not have a statement for a given Property (e.g. humans without a date of birth)
  • List Items with a specific Property regardless of value (e.g. authors with a Bibliothèque nationale de France ID)
  • Include results from subclasses etc. (Property Path)
  • Check for the existence of a reference
  • Combine query building blocks
  • Display the labels of Items in the query result and offer to not display it to reduce the risk of timeout
  • Limit the number of results
  • Automatically determine which values should appear as a column in the result
  • Internationalisation of the interface incl. RTL support (by adding ?uselang= + language code at the end of the URL)
  • Possibility to access the SPARQL code interface and SPARQL query
  • Link from the existing Wikidata Query Service interface to access the SQB
  • Link to a pre-filled SQB query

Features that will be included in a later version[edit]

Here's a list of features that are planned to be involved in a later version of the tool:

  • Filtering for dates and quantities (e.g. a date between 1900 and 1920)

We will definitely want to hear from you, whether we forgot some crucial feature you would need for your maintenance work. Based on your feedback, we may add more features in the future.

Features that will not be included[edit]

  • Translating from SPARQL to the visual representation (because that is too complex and we can’t account well for the types of queries the visual query builder can’t handle).

Timeline and updates[edit]


Updates of the development will be announced on the usual communication channels (Project Chat, weekly newsletter, etc). At any point, feel free to give feedback on the talk page.

Give feedback