The MediaWiki API can be used to fetch Wikipedia pages. In the docs, they only show how to fetch the latest version of a page. However, I know that Wikipedia stores every version of every page. Is there a way to access those other versions through the MediaWiki API?
Suppose we are going to retrieve https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=5585818 .
One can retrieve older versions:
rvstart
/rvend
or rvstartid
/rvendid
parameters):
https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=Project:Sandbox&rvslots=*&rvprop=content&rvstartid=5585818&rvlimit=1action=raw
and oldid
parameters):
https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=5585818&action=rawoldid
parameter:
https://www.mediawiki.org/w/api.php?action=parse&oldid=5585818&prop=textaction=render
. (action=parse
API is preferred over this method): https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=5585818&acton=render