API:Lists

From MediaWiki.org
Jump to: navigation, search
Tools clipart.png This page is part of the MediaWiki API documentation.
Language: English  • Deutsch • español • 日本語 • polski • українська
MediaWiki API

Quick overview:

v · d · e

Lists differ from properties in two aspects - instead of appending data to the elements in the pages element, each list has its own separated branch in the query element. Also, list output is limited by number of items, and may be continued using the query-continue element. Unless indicated otherwise, modules listed on this page can be used as generators.

Submodules[edit | edit source]

Browse all in a single page

Limits[edit | edit source]

All list queries return a limited number of results. This limit is 10 by default, and can be set as high as 500 for regular users, or 5000 for users with the apihighlimits right (typically bots and sysops). Some modules impose stricter limits under certain conditions. If you're not sure which limit applies to you and just want as many results as possible, set the limit to max. In that case, a <limits> element will be returned, specifying the limits used.

Errors

If you set the limit to a value higher than the maximum, an error will be thrown, which looks like:

  • code: aplimit
    • info: aplimit may not be over 500 (set to 1000) for users

(ap can be replaced with any other module prefix)

Example[edit | edit source]

Getting the maximum amount of revisions with content and backlinks for en:Winnipeg, Manitoba