Trợ giúp về API MediaWiki

This is an auto-generated MediaWiki API documentation page.

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

prop=categories (cl)

(main | query | categories)
  • Mô đun này cần quyền đọc.
  • This module can be used as a generator.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

List all categories the pages belong to.

Các tham số:
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__.
Các giá trị (phân tách bằng |): sortkey, timestamp, hidden
clshow

Which kind of categories to show.

Các giá trị (phân tách bằng |): hidden, !hidden
cllimit

Có bao nhiêu thể loại được trả về.

Không cho phép hơn 500 (5.000 đối với các bot).
Type: integer or max
Mặc định: 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.

Phân tách các giá trị bằng |. Maximum number of values is 50 (500 for bots).
cldir

The direction in which to list.

Một trong các giá trị: ascending, descending
Mặc định: ascending
Các ví dụ:
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]