עזרה של MediaWiki API

זהו דף תיעוד של API שנוצר באופן אוטומטי.

תיעוד ודוגמאות: https://www.mediawiki.org/wiki/API

prop=categories (cl)

(main | query | categories)
  • יחידה זו דורשת הרשאות קריאה.
  • היחידה הזאת יכולה להיות מחולל.

List all categories the pages belong to.

פרמטרים:
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__.
ערכים (מופרדים באמצעות "|"): sortkey, timestamp, hidden
clshow

Which kind of categories to show.

ערכים (מופרדים באמצעות "|"): hidden, !hidden
cllimit

כמה קטגוריות להחזיר.

המספר המרבי המותר הוא 500 (עבור בוטים – 5,000).
ברירת מחדל: 10
clcontinue

כשיש עוד תוצאות, להשתמש בזה בשביל להמשיך.

clcategories

Only list these categories. Useful for checking whether a certain page is in a certain category.

הפרדה בין ערכים נעשית באמצעות | מספר הערכים המרבי הוא 50 (עבור בוטים – 500).
cldir

The direction in which to list.

ערך אחד: ascending, descending
ברירת מחדל: ascending
דוגמאות:
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