User:Martyav/Sandbox/API:Lists
![]() | This page is part of the MediaWiki Action API documentation. |
GET Request to list items that match select criteria
API documentation
editLists return information gathered from across the site, rather than the content from any one, particular page. To request a list, you pass the list
parameter of your query string a valid list submodule, such as allimages
or usercontribs
. A list query is written like so: action=query&list=list1|list2
.
List queries always have a limit on the number of items returned. To view more items, append the values inside the result's continue
element to the original request. Please see individual list API pages for more concrete examples of how to use lists:
- allcategories
- alldeletedrevisions
- allfileusages
- allimages
- alllinks
- allpages
- allredirects
- allrevisions
- alltransclusions
- allusers
- backlinks
- blocks
- categorymembers
- deletedrevs
- embeddedin
- exturlusage
- filearchive
- imageusage
- iwbacklinks
- langbacklinks
- logevents
- pagepropnames
- pageswithprop
- prefixsearch
- protectedtitles
- querypage
- random
- recentchanges
- search
- tags
- usercontribs
- users
- watchlist
- watchlistraw
Additional notes
edit- Most list submodules can be used as generators, unless otherwise noted.
- List query limits:
- Results for list queries always have a limit; the default limit is 10. The results limit 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 (more details). - 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, alimits
element will be returned, specifying the limits used. - The limit parameter for a given module consists of the module prefix followed by
limit
, soptlimit
is the maximum number ofprotectedtitles
returned, andcmlimit
is the maximum number ofcategorymembers
returned.
- Results for list queries always have a limit; the default limit is 10. The results limit can be set as high as 500 for regular users, or 5000 for users with the
See also
edit- Documentation on query module contains a brief description of all list submodules, their corresponding parameters, and values. A fuller description of list submodules is available at API:Lists/All.
- API:Properties is a similar API, for accessing properties of pages. Unlike list queries, which return a separate branch in the
query
element, property queries append data to thepages
element.