API:Lists
Appearance
From mediawiki.org
Languages:
This page is part of the MediaWiki Action API documentation.
| MediaWiki Action API |
|---|
| Basics |
| Authentication |
| Accounts and Users |
| Page Operations |
|
| Search |
| Developer Utilities |
| Tutorials |
| v · d · e |
GET request to list items that match select criteria.
API documentation
[edit ]Lists generally return aggregations of data, such as pages gathered from across a wiki, or links gathered within a single page. To request a list, pass the list parameter of your query string a valid list submodule, such as allimages or usercontribs.
To use the list API, specify action=query&list=list1|list2 in the URL.
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.
- Lists differ from properties in that, instead of appending data to the elements in the
pageselement, each list has its own separated branch in thequeryelement. - List query limits:
- The results limit can be set as high as 500 for regular users, or 5000 for users with the
apihighlimitsright (typically bots and sysops). - Some modules impose stricter limits under certain conditions. See this subpage for more details.
- If you are not sure which limit applies to you and just want as many results as possible, set the limit to
max. In that case, alimitselement will be returned, specifying the limits used. - The limit parameter for a given module consists of the module prefix followed by
limit, soptlimitis the maximum number ofprotectedtitlesreturned, andcmlimitis the maximum number ofcategorymembersreturned.
- The results limit can be set as high as 500 for regular users, or 5000 for users with the
See also
[edit ]
- Maintained by MediaWiki Interfaces Team.
- Live chat (IRC): #mediawiki-core connect
- Issue tracker: Phabricator MediaWiki-Action-API (Report an issue)
Retrieved from "https://www.mediawiki.org/w/index.php?title=API:Lists&oldid=7947466"