Mediawiki API:如何列出一个类别的所有页面并为每个页面显示所有类别?

Ric*_*son 5 mediawiki wikipedia wikipedia-api mediawiki-api

我正在使用以下 wikimedia API 列出具有特定类别的所有页面:https : //www.mediawiki.org/wiki/API :Categorymembers

例如https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Physics

这给了我一个带有标题和 ID 的页面列表,但我还想查看每个页面的所有类别。然而,似乎没有 cmprop 。

cmprop: Which properties to get. (Default: ids|title)

    ids: Page ID
    title: Page title
    sortkey: The sortkey used for sorting in the category (hexadecimal string)
    sortkeyprefix: The sortkey prefix used for sorting in the category (human-readable part of the sortkey) 1.17+
    type: Type that the page has been categorised as (page, subcat or file) 1.17+
    timestamp: Time and date the article was added to the category
Run Code Online (Sandbox Code Playgroud)

我考虑过查询每个页面并使用 prop=categories 来获取每个页面的类别,但这意味着大量的查询。有没有更好的方法来做到这一点?