API:Categoryinfo
| Categoryinfo | ||
|---|---|---|
| Returns information about the given categories. This module cannot be used as a Generator. |
||
| Prefix | ci | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
Gets information about categories
- Note
- If the category page exists, but the category has no members, a "categoryinfo" field will not be included in the API response.
Parameters[edit]
cicontinue: When more results are available, use this to continue.
Example[edit]
Get info about a few categories
api.php? action=query& titles=Albert%20Einstein|Category:Foo|Category:Infobox%20templates& prop=categoryinfo [try in ApiSandbox]
| Result |
|---|
<?xml version="1.0" encoding="utf-8"?>
<api>
<query>
<pages>
<page ns="14" title="Category:Foo" missing="">
<categoryinfo size="0" pages="0" files="0" subcats="0" />
</page>
<page pageid="736" ns="0" title="Albert Einstein" />
<page pageid="3108204" ns="14" title="Category:Infobox templates">
<categoryinfo size="57" pages="44" files="0" subcats="13" />
</page>
</pages>
</query>
</api>
|
Possible errors[edit]
None.
| The following documentation is the output of Special:ApiHelp/query+categoryinfo, automatically generated by the pre-release version of MediaWiki that is running on this site (MediaWiki.org). |
prop=categoryinfo (ci)
- This module requires read rights.
- Source: MediaWiki
- License: GPL-2.0+
Returns information about the given categories.
Parameter:
- cicontinue
When more results are available, use this to continue.
Example:
- Get information about Category:Foo and Category:Bar.
- api.php?action=query&prop=categoryinfo&titles=Category:Foo|Category:Bar [open in sandbox]