From MediaWiki.org
Jump to: navigation, search
Tools clipart.png This page is part of the MediaWiki action API documentation.

MediaWiki action API

v · d · e

Returns a list of pages in a given namespace, ordered by page title.

  • apfrom: Start listing at this title. The title need not exist.
  • apto: The page title to stop enumerating at
  • 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. (Default: 0)
  • apfilterredir: How to filter redirects (Default: all)
    • all: List all pages regardless of their redirect flag
    • redirects: Only list redirects
    • nonredirects: Don't list redirects
  • apfilterlanglinks: How to filter based on whether a page has language links (Default: all)
    • all: List all pages regardless of whether they have language links
    • 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
  • 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
  • aplimit: Maximum amount of pages to list. (Default: 10)
  • apdir: In which direction to list (Default: ascending) 1.12+
    • ascending: List from A to Z
    • descending: List from Z to A
  • apprfiltercascade: Filter protections based on cascadingness (ignored when apprtype isn't set). Possible values: cascading, noncascading, all. (Default: all)
  • apprexpiry: Which protection expiry to filter the page on (Default: all)
    • indefinite: Get only pages with indefinite protection expiry
    • definite: Get only pages with a definite (specific) protection expiry
    • all: Get pages with any protections expiry


Show a list of first 5 pages starting from "Kre"

Show a list of first 3 categories (Namespace id = 14) starting at Ab...

Error Codes[edit]

  • Unrecognized parameter
    • info: when using allpages as a generator instead of just a list, add a g to the start of its parameter names. E.g. "gapnamespace" instead of "apnamespace"
  • 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]