MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/API
prop=categories (cl)
- This module requires read rights.
- This module can be used as a generator.
- Source: MediaWiki
- License: GPL-2.0-or-later
List all categories the pages belong to.
Parameters:
- clprop
Which additional properties to get for each category:
- sortkey
- Adds the sortkey (hexadecimal string) and sortkey prefix (human-readable part) for the category.
- timestamp
- Adds timestamp of when the category was added.
- hidden
- Tags categories that are hidden with
__HIDDENCAT__
.
- Values (separate with | or alternative): sortkey, timestamp, hidden
- clshow
Which kind of categories to show.
- Values (separate with | or alternative): hidden, !hidden
- cllimit
How many categories to return.
- No more than 500 (5,000 for bots) allowed.
- Type: integer or max
- Default: 10
- clcontinue
When more results are available, use this to continue.
- clcategories
Only list these categories. Useful for checking whether a certain page is in a certain category.
- Separate values with | or alternative. Maximum number of values is 50 (500 for bots).
- cldir
The direction in which to list.
- One of the following values: ascending, descending
- Default: ascending
Examples:
- Get a list of categories the page Albert Einstein belongs to.
- api.php?action=query&prop=categories&titles=Albert%20Einstein [open in sandbox]
- Get information about all categories used in the page Albert Einstein.
- api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info [open in sandbox]
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 3.149.27.125
Start request GET /mediawiki/api.php?action=help&modules=query%2Bcategories
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "3.149.27.125",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[session] SessionBackend "b95q8mlesttqglshlula0258urbe2380" is unsaved, marking dirty in constructor
[session] SessionBackend "b95q8mlesttqglshlula0258urbe2380" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1715249395", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1715249395", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1715249395", "/", "", "", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1715249395", "/", "", "", "1"
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[ContentHandler] Created handler for wikitext: WikitextContentHandler
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
ParserFactory: using preprocessor: Preprocessor_Hash
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct