Wikidata:Query Builder

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

Screenshot of the prototype from February 2021

The Wikidata development team is working on a form-based query builder 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.

You can access the current version of the Query Builder. Disclaimer: this is a test system, the tool is still under active development, can be momentarily broken, and doesn't have all the planned features implemented yet. If you're trying the tool, you're very welcome to give feedback on the talk page.

The Wikidata Query Builder will not include all of the features that SPARQL allows and will not replace the Wikidata Query Service or SPARQL queries. 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.


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


We are currently developing a minimum viable product that will include what we identified during usability testing as the most important features for the tool to work. Later on, more features may be added.

Features that will be included in the first version[edit]

Here's a list of features that are planned to be involved in the first 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)
  • Filtering for dates and quantities (e.g. a date between 1900 and 1920)
  • 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

After releasing the first version, 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]

Test system and feedback[edit]

Click here to try the Wikidata Query Builder

Updates of the development, links to prototypes and other things to try will be announced on this talk page as well as on the usual communication channels (Project Chat, weekly newsletter). At any point, feel free to give feedback on the talk page.

On you can find a test system for the Query Builder. Please be aware that this is a test system and not a final prototype:

  • it's not representing the final state of the product, a lot of features are still missing
  • developers are working on it, so its features will evolve
  • sometimes it can be completely broken

If you’re interested in giving more detailed feedback through an interview with one of our UX designers, feel free to contact Lea Lacroix (WMDE).

Give feedback