MediaWiki API help

If you find a typo, inconsistency, or error, please sign up and help out the wiki! We can't do it without your help! :D Thank you!

This is an auto-generated MediaWiki API documentation page.

Documentation and examples:

prop=categories (cl)

(main | query | categories)
  • 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.


Which additional properties to get for each category:

Adds the sortkey (hexadecimal string) and sortkey prefix (human-readable part) for the category.
Adds timestamp of when the category was added.
Tags categories that are hidden with __HIDDENCAT__.
Values (separate with | or alternative): sortkey, timestamp, hidden

Which kind of categories to show.

Values (separate with | or alternative): hidden, !hidden

How many categories to return.

No more than 500 (5,000 for bots) allowed.
Type: integer or max
Default: 10

When more results are available, use this to continue.


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).

The direction in which to list.

One of the following values: ascending, descending
Default: ascending
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]