Jump to content

Topic on Talk:Requests for comment/Wikidata API

API sample links are not correct?

4
Tom2394 (talkcontribs)

The links for the API samples all point to wikipedia, not wikidata.

The first one (action=wbgetentities) for example, is: https://en.wikipedia.org/w/api.php?action=wbgetentities&sites=enwiki&titles=Marie%20Curie&format=jsonfm So I have to manually change it to wikidata to make it work.

The last one (prop=wikibase) doesn't work whether I change it or not - not sure what the issue is.

I was looking for a way to get the interwiki links for a given wikidata item. It appears that "wbpprop=alias" from this last sample is the solution, but "wbpprop" is an unrecognized parameter.

Legoktm (talkcontribs)

This is just a proposed RfC, it hasn't been implemented yet. If you want to use the Wikidata API, your best bet is to use the automated documentation at https://www.wikidata.org/w/api.php.

Tom2394 (talkcontribs)

Ok, thanks for the response.

I still suspect that the links were meant to be 'wikidata.org' rather then 'en.wikipedia.org'. Then some of them would work.

Reply to "API sample links are not correct?"