Yes, you can use action=query&titles=<item
ID>&prop=revisions&rvlimit=max to list the different revision IDs
(example
<https://www.wikidata.org/w/api.php?action=query&titles=Q42&prop=revisions&rvlimit=max&formatversion=2>).
Use continuation
<https://www.mediawiki.org/wiki/API:Query#Continuing_queries> to get the
whole history in cases where it’s too long for one request.
To get the item content at that revision, you’ll probably want to use
Special:EntityData with the ?oldid paramater (example
<https://www.wikidata.org/wiki/Special:EntityData/Q42.json?oldid=892627350>)
– you could also get the revision content directly from the API
(&rvprop=content), but then you’ll have to deal with the internal
serialization format, including older versions of it, whereas
Special:EntityData will always return the response in the current format.
Cheers,
Lucas
On 04.04.19 08:13, Kristofer Anandita wrote:
Hi MediaWiki Team,
I am Kristofer, a final year IT student from the University of
Queensland in Brisbane, Australia. I am currently working on my thesis
titled "*Data Quality in Wikidata over time*", which will investigate
the overall increase in data quality in Wikidata Items over the years
as more information and detail is added through the addition of more
statements, qualifiers and references.
And so, I am writing this email to ask whether it is possible for me
to fetch the entire revision history of an item through the MediaWiki
API? I understand that there is a "View History" Tab in every Wikidata
Item page, however I have not been able to find a way to access that
through the API.
Older versions of an Item will allow me to show that the data quality
has steadily increased over time as more information of that item is
updated. Your help in this matter would be greatly appreciated. Thank
you in advance and I hope to hear from you soon.
Kind Regards,
Kristofer Anandita
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api