28/09/2021 20mins
Anish Prakash


Most of us are familiar with Wikimedia Foundation’s flagship project, Wikipedia. Created and edited by volunteers collaborating all around the globe, Wikipedia is a free online encyclopedia available in a variety of languages.

More recently, Wikimedia Foundation has unveiled a related project called Wikidata, which, like Wikipedia, bills itself as an open-source online encyclopedia of knowledge that can be read and edited by both humans and machines.

Wikidata – Wikimedia Foundation’s Next Big Thing

To make its material accessible to the public domain without any restrictions, Wikidata uses free Creative Commons 0 license. There are all kinds of data stored in Wikidata, and in line with Wikimedia Foundation’s mission anyone can edit these data and use them for free.

As you may have already noticed in Wikipedia’s page preview feature, you will see information boxes once you hover over a link. The information box gives you a brief overview or description about the page and other reusable information which sometimes can be accompanied by an image.

This is essentially the role of Wikidata. It acts as the central storage for all the needed structured data of its Wikimedia sister projects that include Wikipedia, Wikisource, and Wikivoyage. With CC0 license, the contents of Wikidata can be exported using standard formats and can be referenced to other open source datasets on the web.

How Do You Query Data from Wikidata?

Wikidata is a rich source of information derived from contributions of thousands of humans and bots machines. It is also available in over 300 languages. That means, Wikidata can be your great source of data and you can take advantage of them by importing them to your own applications.

Another advantage of Wikidata is that it contains a diverse collection of lists and other structured information or data, which you can readily use as reference and you don’t have to deal with the burden of maintaining them yourself.

Wikidata is implemented by using installations of both Wikibase Repository and Wikibase Client. Both of these installations are open source. You can make use of them for personal or separate applications.

Wikidata is designed as storage for various items. Each of these items contains a unique identifier. Each of the properties also has an identifier. It is important to identify the right items and relations for all queries. Wikidata utilizes these identifiers for this purpose.

You can extract data from Wikipedia using various command-line tools. Typically used in command lines to transfer data, curl can be useful when interacting with online resources. The command-line jq can also be a handy tool to use Wikidata, as Wikidata uses JSON for its structured data.

Querying data from Wikidata can seem complicated at first. But eventually, you should be able to get used to it. You can start by playing around with Wikidata’s handy API sandbox until you get the hang of how the API works. Then, you can experiment further with using scripts on the command line. Once you figured how to navigate Wikidata’s structure, that’s the time you can utilize your API of choice to tailor your access to the application.


Join Our
Mailing List


    Featured Post

    How can we help you?

    Get in touch with us to schedule a consultation.