How to find out the name of an item having the wikidata code Q89 =>(apple)

146 views Asked by At

How to find out the name of an item having the wikidata code Q89 (apple) , for properties I made a dictionary,but for item code I can't find anithing , I am using pywikibot for other operations , it is there any function do that?

1

There are 1 answers

0
maxlath On BEST ANSWER

You can use Wikidata API to get a JSON representation of the entity, including its labels: https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q89&format=json&props=labels

Or, from the command-line, you can use a tool such as (the one I wrote ;)) Wikidata CLI: wd label Q89