Manual:Parameters to Special:Export

If $wgExportAllowHistory is set to false in LocalSettings.php, only the current version can be exported, not the full history.

In August 2006, Tim Starling implemented an experimental interface for history paging in Special:Export. He added three new parameters, currently with no user interface. Here is a summary of the available parameters to Special:Export at present, for use with custom clients such as IBM History Flow.


 * pages : A list of page titles, separated by linefeed characters.
 * action : Should be set to "submit" to retrieve the XML data
 * dir : Should be set to "desc" to retrieve revisions in reverse chronological order. The default, with this parameter omitted, is to retrieve revisions in ascending order of timestamp.
 * offset : The timestamp at which to start, non-inclusive. The timestamp may be in several formats, including the 14-character format usually used by MediaWiki, and an ISO 8601 format like the one output in the XML dumps.
 * limit : The maximum number of revisions to return. If you request more than a site-specific maximum (100 on Wikipedia at present), it will be silently reduced. This limit is cumulative across all the pages specified in the pages parameter, which doesn't make much sense unless you are a programmer. If you request a limit of 100, for two pages with 70 revisions each, you will get 70 from one and 30 from the other. The order is by page_id, pages with lower page_id get more revisions. The reason for this is that Special:Export only ever does one database query per HTTP request. If you want to request all the history of several pages with many revisions each, you have to do it one page at a time.

'As of early 2008, these URL's appear to no longer work for accessing page history. The parameters still work however when used in the context of HTTP requests created programmatically.'

For example, here is a Special:Export URL which retrieves the earliest 5 revisions from the English Wikipedia main page:

http://en.wikipedia.org/w/index.php?title=Special:Export&pages=Main_Page&offset=1&limit=5&action=submit

And here is the next 5:

http://en.wikipedia.org/w/index.php?title=Special:Export&pages=Main_Page&offset=2002-01-27T20:25:56Z&limit=5&action=submit

Here the timestamp from the last revision of the previous query is copied into the offset field of the URL. Because the offset field is non-inclusive, that 5th revision is not displayed again, instead we get revisions 6-10. This parameter convention is very similar to the one for UI history pages.