MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

prop=categories (cl)

(main | query | categories)
  • Denna modul kräver läsrättigheter.
  • Denna modul kan användas som en generator.

List all categories the pages belong to.

Parametrar:
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__.
värden (separade med "|"): sortkey, timestamp, hidden
clshow

Which kind of categories to show.

värden (separade med "|"): hidden, !hidden
cllimit

How many categories to return.

Inte mer än 500 (5 000 för robotar) tillåts.
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 |. Maximum number of values is 50 (500 for bots).
cldir

Riktningen att lista mot.

ett värde: 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
Get information about all categories used in the page Albert Einstein.
api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info