web-applicationssparqlwikidatawikidata-apiwikibase

What it takes to edit wikidata from my web application?


I am developing a web application which shows basic information about basketball players. I get all the data from wikidata by basic sparql queries. However, some players are missing some basic information(height, weight, their current team, etc.). And I would like to allow users of my web app to edit/add missing information on my app and I would send the edit request to wikidata. How it can be done ? I found Wikibase/API where is written that "The Wikibase API allows querying, adding, removing and editing information on Wikidata or any other Wikibase instance." https://www.mediawiki.org/wiki/Wikibase/API

But I could not find anywhere at least something about how to edit/add data or some example post request how it works(I'm pretty sure it is there, but maybe I'm just blind...). If someone has any experience with this, I would appreciate any help of where to look and what to read. Thanks


Solution

  • This is the API documentation. It’s sort-of abusing the regular mediawiki API and I find it highly annoying.

    An easier option right now is probably Quickstatements, which is used for many semi-automated data imports. It’s usually run by submitting batches as text files on its web frontend, but here are instructions how it can be used as an API. Beware, however, that any shenanigans your users get into would fall back on you.

    Quickstatements is OSS, so you could check out how it uses the API and replicate the functionality. That would allow you to use your users‘ accounts via OAuth, as well.

    Finally, there is a new REST API that’s getting close to seeing a release, and it appears to shape up as exactly the sort of straightforward API that’s been missing so far.