Hi Jiang,
Not sure if this will answer your questions but here are the API autogenerated docs https://en.wikipedia.org/w/api.php.
Also, if you don't get the information you need here, you might want to consult the mediawiki-api maling listhttps://lists.wikimedia.org/mailman/listinfo/mediawiki-apifor more details on the API.
Mariya
On Mon, Mar 4, 2013 at 11:14 AM, Ed Summers ehs@pobox.com wrote:
Hi Jiang,
I don't work on the Wikidata project itself, so I will let one of the project members advise you on the best use of action=query&list=recentchanges. A year ago I created a simple realtime Web visualization of changes in Wikipedias [1]. It logs into the language specific IRC chatrooms and listens for updates from the bots in there.
I pulled out the code that listens for updates and parses the IRC messages into a small Node library called wikichanges [2], which you could theoretically use to track wikidata changes without having to poll the API. However you would still need to talk to the API to get the content of the changes.
I updated the example.js [3] to show how to just get updates for wikidata if you wanted to take a look. I got the idea for the project from Patrick Sinclair who wrote a bot for keeping BBC content up to date with Wikipedia.
//Ed
[1] http://wikistream.inkdroid.org/ [2] https://github.com/edsu/wikichanges [3] https://github.com/edsu/wikichanges/blob/master/example.js
On Mon, Mar 4, 2013 at 2:44 AM, Jiang BIAN bianjiang@google.com wrote:
Hi mediawiki developers,
We (Google) are trying to maintain our internal mirror of wikidata.org up-to-date in real-time, so that our indexing pipeline can get latest interlanguage information in real-time.
I noticed wikidata.org is also powered by standard MediaWiki software,
where
standard query api to a specific revision works, e.g. revision query:
http://www.wikidata.org/w/api.php?action=query&prop=revisions&format...
and recentchanges:
http://wikidata.org/w/api.php?action=query&list=recentchanges&format...
My questions are:
Are the APIs above ("action=query&prop=revisions" and "actioon=query&list=recentchanges") the supported way to retrieve wikidata.org in realtime? Is there any document about the json format in response? It looks to me
that
"links" are about interwiki/interlanguage links (or sitelinks in wikidata.org's terminology), but I feel more comfortable if I see some official document about this. There are some ids like "dewiki", "enwiki" etc, which I guess can be interpreted to corresponding languages "de", "en" respectively. But is
there
a reliable map from these *wiki to the language code? And some are even using 3-letter prefix, e.g. gotwiki, xmfwiki.
Thanks
-- Jiang BIAN
This email may be confidential or privileged. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it went to
the
wrong person. Thanks.
Wikidata-l mailing list Wikidata-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-l
Wikidata-l mailing list Wikidata-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-l