API:Allcategories

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

Quick overview:

v · d · e
MediaWiki version: 1.12

Get a list of all categories. This differs from list=allpages&alnamespace=14 in that categories without descriptions will be listed and, categories with descriptions but no actual pages may not (e.g., redirects and categories where a page was created but the category was never used). Note: the allcategories list also contains categories that have been deleted and are unused. It is recommended that the list be filtered to those where the size is greater than zero or the category page exists.

Parameters[edit | edit source]

  • acfrom: The category to start enumerating from
  • acto: The category to stop enumerating at
  • acprefix: Search for all category titles that begin with this value
  • acdir: Direction to sort in (Default: ascending)
    • ascending: List from A to Z
    • descending: List from Z to A
  • acmin: Minimum number of category members
  • acmax: Maximum number of category members
  • aclimit: How many categories to return. No more than 500 (5000 for bots) allowed. (Default: 10)
  • acprop: Which properties to get (Default: none)
    • size: Adds number of pages in the category
    • hidden: Tags categories that are hidden with __HIDDENCAT__

Example[edit | edit source]

List the first 10 categories whose name starts with "List of"

Error Codes[edit | edit source]

None