Returns a list of pages in a given namespace, ordered by page title.
Parameters [edit]
apfrom: Start listing at this title. The title need not exist
apprefix: Only list titles that start with this value
apnamespace: The id of the namespace to enumerate (see API:Meta to get the list and the ids of the namespaces). You can only enumerate one namespace at a time. By default, the main namespace will be enumerated
apfilterredir: How to filter redirects
all: List all pages regardless of their redirect flag (default)
redirects: Only list redirects
nonredirects: Don't list redirects
apfilterlanglinks: How to filter based on whether a page has language links
all: List all pages regardless of whether they have language links (default)
withlanglinks: Only list pages with language links
withoutlanglinks: Only list pages without language links
apminsize: Only list pages that are at least this many bytes in size
apmaxsize: Only list pages that are at most this many bytes in size
apprtype: Only list pages that have been protected from this type of action
edit: Only list edit-protected pages
move: Only list move-protected pages
- Other wikis may allow for more kinds of protection and will therefore provide more options here
apprlevel: Only list pages that have been protected at this level. Cannot be used without apprtype
autoconfirmed: Only autoconfirmed users can edit/move/whatever
sysop: Only sysops can edit/move/whatever
- Empty: Everyone can edit/move/whatever
- Other wikis may allow protection on more levels and will therefore provide more options here
aplimit: Maximum amount of pages to list. Default 10, must be between 1 and 500.
apdir: In which direction to list
ascending: List from A to Z (default)
descending: List from Z to A
Example [edit]
Show a list of first 5 pages starting from "Kre"
| Result |
| The following content has been placed in a collapsed box for improved usability. |
<api>
<query-continue>
<allpages apfrom="Kreatel" />
</query-continue>
<query>
<allpages>
<p pageid="1756320" ns="0" title="Kre'fey" />
<p pageid="3361042" ns="0" title="Kreab" />
<p pageid="288613" ns="0" title="Kreacher" />
<p pageid="812540" ns="0" title="Kreamer, PA" />
<p pageid="133750" ns="0" title="Kreamer, Pennsylvania" />
</allpages>
</query>
</api>
|
| The above content has been placed in a collapsed box for improved usability. |
Show a list of first 3 categories (Namespace id = 14) starting at Ab...
| Result |
| The following content has been placed in a collapsed box for improved usability. |
<?xml version="1.0"?>
<api>
<query>
<allpages>
<p pageid="18263532" ns="14" title="Category:Ab instruments" />
<p pageid="27037875" ns="14" title="Category:Abaco Islands" />
<p pageid="16839157" ns="14" title="Category:Abacus" />
</allpages>
</query>
<query-continue>
<allpages apcontinue="Abad_Santos_family" />
</query-continue>
</api>
|
| The above content has been placed in a collapsed box for improved usability. |
Error Codes [edit]
- code: apparams
- info: Use "gapfilterredir=nonredirects" option instead of "redirects" when using allpages as a generator
- code: apparams
- info: prlevel may not be used without prtype
See also [edit]