Reputation: 3618
Sending a request such as:
https://en.wikipedia.org/w/index.php?title=America&offset=&limit=20&action=history
will get the history page of a particular subject with a maximum of 20 edits listed. Is there a way to use the API to return a list of edits and their dates in JSON?
I searched the documentation but can't find anything.
Upvotes: 1
Views: 1121
Reputation: 7036
To get edit dates you need to use MediaWiki API with property revisions and rvprop=timestamp
:
https://en.wikipedia.org/w/api.php?action=query&format=json&prop=revisions&rvlimit=20&titles=America&rvlimit=5&rvprop=timestamp
To get other additional revision information as content, user, comment etc., add them to rvprop:
&rvprop=timestamp|content|user|comment
Upvotes: 2