Wikipedia:Finding a Wikidata ID
This help page is a how-to guide. It explains concepts or processes used by the Wikipedia community. It is not one of Wikipedia's policies or guidelines and may reflect varying levels of consensus. |
Every Wikipedia article (and many other pages, such as templates) should have an ID on our sister project, Wikidata. The ID is a series of digits prefixed "Q", and is referred to as a QID.
This page is a simple guide to finding that QID.
Basic
[edit]In the desktop view of Wikipedia, in the default skin, find the "Tools" menu in the upper right. Expand that menu, find "Wikidata item" link, under "In other projects".
Click on the "Wikidata item" link to visit the item directly, and read the QID in parentheses beside the title at the top of that page. The QID is also present as the last part of the URL.
Using the Vector Legacy (2010) skin, "Wikidata item " is on the left-hand panel under "In other projects".
For example: The QID for Kofoworola Abeni Pratt is d:Q25796287, and so the QID is Q25796287.
Search
[edit]If you're looking for the QID of something that doesn't (yet) have a Wikipedia article, then you can search for it on Wikidata.
Other tools
[edit]- Navigation popups will display the QID of an item linked to by the current page
- d:User:Yair rand/WikidataInfo.js, a userscript, will inject the label, description and QID of the current article or page, just below its title.
API
[edit]You can also use the API: for example, the url
will return "Q25796287" as the value of the "wikibase_item" key.
Please note: if the name you are looking for is an alias that redirects to another page, it won't respond with the ID in your first try. For example:
will return an empty "nonewsectionlink" element. Then, you must add a redirection parameter with value 1 to your request to get the desired information:
- https://en.wikipedia.org/w/api.php?action=query&prop=pageprops&titles=Persia&format=json&redirects=1
and also some details on the actual article that has that ID.
See also
[edit]For more about working with Wikidata, see Wikipedia:Wikidata.
Shortcut
[edit]A shortcut for this page is: http://enwp.org/WP:FindID