Help:Wikidata

 This page provides help, with the most common questions about using Wikidata in Wikipedia and templates, as described bellow.

You can also search all Wikipedia's help pages using the search box below, or browse the Help menu or the Help directory.

Wikidata is a collaboratively edited knowledge base hosted by the Wikimedia Foundation. It is a common source of open data that Wikimedia projects such as Wikipedia can use, and anyone else, under a public domain license.

In this page there is a basic explanation about how to use Wikipedia Tools and Language links with Wikidata, in an easy language for newbies, in the first part; and, in the second, about how to use Wikidata elements for Wikipedia templates.

Access from Wikipedia and links
From a Wikipedia page, you can go to the link "Wikidata item", using "Tools" in the lateral pane (in the left), to see and edit it. Also in Tools, there is another link to "page information", where is "Wikidata item ID", that contains the QID (for example: Q171 or "None").

QID (or Q number) is the unique identifier of a data item on Wikidata, comprising the letter "Q" followed by one or more digits. It is used to help people and machines understand the difference between items with the same or similar names, e.g., there are several places in the world called London and many people called James Smith. This number appears next to the name at the top of each Wikidata item.

You can go to the page of the same item in the Wikimediasphere (that is, Wikimedia sister projects) using the links under "In other projects", also in the lateral pane.

Finally, you can go to other Wikipedia language links of the item, clicking in "Languages" in the lateral pane. In a similar way to clicking "Wikimedia item", you can use "Edit links" there.

Templates
Here, we are going to see how to use data from Wikidata in enwiki templates.

Data model
How to link to Wikidata items and QID from Wikipedia:


 * d:item = en:article title
 * d:Q-number = identity for enwiki:article title
 * Example:
 * (todo).

Template building: using data from Wikidata
Inclusion of data values may be achieved by using mediawiki-like WP:MAGICWORD s.

Simple
Fetching for this page; and  for :
 * Using #property

Automatic links can be created where they exist:
 * Using #statements

By module or template


To fetch data from Wikidata with or without a link to the connected Wikipedia article and with many other features:


 * wikidata
 * wd, its shortcut

For example: returns the Q-identifier (also known as QID or identifier) of the Wikidata item connected to the current page (e.g. "Q55").

Label (also name) is the main name given to identify an entity (i.e. an item or a property). E.g.: the item with the item identifier Q7378 has the English label “elephant”. Every entity has exactly one label in a given human language. Labels do not need to be unique. Descriptions and aliases are used to distinguish between entities with the same label. Wikidata pages do not have labels, but titles. It's a type of term.

Raw means that will return the Q-identifier or P-identifier instead of the regular label.

In infoboxes
Module:WikidataIB was developed to provide the tools necessary for drawing information from Wikidata into infoboxes on Wikipedia. It allows infobox fields to draw information from Wikidata while ensuring that local values take priority and that unsourced information is filtered out by default. It also gives the infobox designer the opportunity to make the enabling of Wikidata controllable on a per-article basis ("opt-in").


 * Example of conversion:
 * An infobox like Infobox writer has a field for "Occupation" with its value defined like this:
 * That could be updated to bring information from Wikidata using the  function from the module, which has a template shortcut wdib. Occupation is P106:
 * That would import the sourced occupations of the connected page (or any other page if qid is set) unless the local parameter occupation is given a value in an article, when that value takes preference over anything in Wikidata. But this does not happen until ALL is set in the infobox of the article.
 * For example, for, we would get:
 * The pen icon is automatically added at the end of each field that fetches its value from Wikidata and gives a direct link to the place on Wikidata where the value(s) came from. It can be suppressed by setting true.
 * Although the values are linked, there is a string-handling function that will capitalise the first letter, regardless of whether the value is linked or is part of a list:
 * Examples of some of the functionality can be found at Module talk:WikidataIB/testing.
 * Although the values are linked, there is a string-handling function that will capitalise the first letter, regardless of whether the value is linked or is part of a list:
 * Examples of some of the functionality can be found at Module talk:WikidataIB/testing.
 * Examples of some of the functionality can be found at Module talk:WikidataIB/testing.

Tracking

 * Tracking categories


 * In there is


 * Tracking & using

To track the data in or missing from one or more Wikidata properties; or to indicate that template or module uses a Wikidata property or properties, where available.


 * Tracks Wikidata
 * Uses Wikidata

A property (also attribute) describes the data value of a statement and can be thought of as a category of data, for example "color" for the data value "blue". Properties, when paired with values, form a statement in Wikidata. Properties are also used in qualifiers. Properties have their own pages on Wikidata and are connected to items, resulting in a linked data structure.