Wikimedia Deutschland released the Query Builder, a visual interface for building a simple Wikidata query. It allows for easier access to Wikidata, the largest collaboratively compiled collection of open and linked data. Now, querying Wikidata has become easier for everybody.
Until now, users interested in Wikidata’s vast amount of data had to be proficient in SPARQL, the query language of Wikidata. With the Query Builder, querying for data in Wikidata becomes accessible to more people. Its visual interface is ideal for users who are curious about Wikidata’s possibilities, but have little or no experience in programming languages.
Open Data’s Superpower
“Querying Wikidata is a superpower. With the Query Builder, you can access all the knowledge hidden in Wikidata’s connections and data,” says Lydia Pintscher, product manager at Wikimedia Deutschland. The Query Builder doesn’t offer SPARQL’s full functionality, but it links to the Query Service, where users can view, edit or expand the query they generated with the Query Builder.
How to use the new Query Builder
To use the Query Builder, the user needs to understand a little bit of the structure of Wikidata to recognize what an Item in this knowledge base of linked data looks like. Entries in Wikidata are called Items, and each Item consists of Statements that say something about the Item. Statements are pairs of Properties and Values, like “capital:Berlin” on the Item for Germany. The Query Builder allows its users to search for Items on the basis of these Properties and Values.
If we want Wikidata to show us a list of female heads of state, this is what the query in the new Wikidata Query Builder would look like:
Since we are searching for female heads of state, we indicate that we need one Property of our Item to be “Sex or Gender”. The value of this Statement is “female”. To add more Properties to our search, we click on “Add condition”.
In the next step, we are adding one more condition to our search. We want our Item to also contain the Property “position held”, coupled with the Value “head of state”. Don’t worry, you don’t have to know the exact name of the Property. The Query Builder will suggest Properties and Values once you start typing. If you want to refine your query, you can add more Properties to your query.
Once we click on “Run Query”, the Query Builder will run the query for us. Wikidata is very busy, so it might take a few seconds until it generates the result in a list that shows the so-called “Q-identifiers” and the Label of the Items.
You can also watch this short video where Lydia Pintscher talks about the Query Builder.
Wikimedia Deutschland built the Query Builder to enable more people to make use of Wikidata’s data and use it for their visualizations and research. We hope it will give more people more access to more knowledge, which is Wikidata’s mission. Finally, if you need assistance to query Wikidata with SPARQL, you can always find helpful people in Wikidata’s large community who can help you to write a query. Just click here.
Try the Query Builder and make use of Wikidata’s data now!