View Entire Revision History for a Wikidata Item using MediaWiki API

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

View Entire Revision History for a Wikidata Item using MediaWiki API

Kristofer Anandita
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
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: View Entire Revision History for a Wikidata Item using MediaWiki API

Lucas Werkmeister-2

Yes, you can use action=query&titles=<item ID>&prop=revisions&rvlimit=max to list the different revision IDs (example). Use continuation 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) – 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
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api