I have just started to migrate from freebase to wikidata. Basically my usecase involves free searching(suggest-as-you-type) for which i am using wbsearchentities. This returns me a list of results with id like "Q...". \ Now give this Qid, i need to be able to get its images and content.
For .e.g, for the text "Matrix", i make the following call: https://www.wikidata.org/w/api.php?action=wbsearchentities&search=matrix...
From here, then I pick up one of the Qids, say,Q83495 for which I need to
get images.
The problem is the imageapi doesent seem to like the Qid form. Do i first need to convert to pageid??
I thought this should have worked: https://www.wikidata.org/w/api.php?action=query&prop=pageimages&form... https://www.wikidata.org/w/api.php?action=query&prop=pageimages&format=jsonfm&piprop=thumbnail&titles=The%20Matrix Q83495
Any suggestions?
Thanks, Suraj.
I don't think the 'pageimages' API works with Wikidata pages/items. You'd have to use the Wikidata-specific API to access the relevant property. Q83495 doesn't seem to have an image associated in Wikidata, though.
Il 08/04/2015 21:18, Bartosz Dziewoński ha scritto:
I don't think the 'pageimages' API works with Wikidata pages/items.
It doesn't (yet): https://phabricator.wikimedia.org/T95026
mediawiki-api@lists.wikimedia.org