API talk:Categorymembers

Namespace Property

edit

For the cmnamespace property, does it take the namespace's number of its name? --(Havvy) 97.120.59.79 01:12, 17 September 2012 (UTC)Reply

It takes one or more numbers: for example, cmnamespace=0|1|2|3. --R'n'B (talk) 11:47, 18 September 2012 (UTC)Reply

Typo in properties?

edit

I scratched my head on using this on Wikimedia Commons, but then found that properties such cmtype are actually named gcmtype. -- (talk) 10:07, 27 August 2013 (UTC)Reply

This is standard for any property retrieved using "generator=foo" as opposed to "titles=foo|bar". See API:Query#Generators for details. --R'n'B (talk) 01:40, 3 September 2013 (UTC)Reply

Commons: gcmprop

edit

This seems to be stuck on default (ids|titles) and does not provide any other returns. Example where timestamp is a requested property but not returned. -- (talk) 22:42, 28 August 2013 (UTC)Reply

Wikiget

edit

Search a for a page title in a specific category.

edit

Are we able to query for a keyword under a given category? For example, I would like to query for space until the category keyboard.— Preceding unsigned comment added by 148.75.250.118 (talkcontribs) 21:53, 27 May 2017

Abnormal skip in TOC numbering (corrected)

edit

2.1=>2.6 2.6=>2.11

    1 API documentation
    2 Examples
        2.1 Example 1: List twenty pages in a category
            2.1.1 GET request
            2.1.2 Response
            2.1.3 Sample code
        2.6 Example 2: Get the ten articles most recently added to a category
            2.6.1 GET request
            2.6.2 Response
            2.6.3 Sample code
        2.11 Example 3: Get ten subcategories of a category
            2.11.1 GET request
            2.11.2 Response
            2.11.3 Sample code
    3 Possible errors
    4 Parameter history
    5 See also

refer to => https://www.mediawiki.org/wiki/Topic:V80j0jclibtkd7g4

Christian FR (talk) 21:59, 14 November 2019 (UTC)Reply

What is the value for PARAM:"cmcontinue":

edit

I can put value for "cmlimit":50. For "cmcontinue":"?"--Info-farmer (talk) 05:31, 16 February 2020 (UTC)Reply

PARAMS = {
    "action": "query",
    "cmtitle": "Category:Physics",
    "cmlimit": "20",
    "cmcontinue":"21",
    "list": "categorymembers",
    "format": "json"
}

but i am getting the error:

   "KeyError: 'query' "

how can i solve this issue?--Info-farmer (talk) 07:02, 17 February 2020 (UTC)Reply

a better response schema

edit

It would be better if the main response schema would look something like:

"query": {
	"categorymembers": {
		"<cmtitle/cmpageid>": [
			...
		]
	}
}

עלי (talk) 17:00, 16 July 2022 (UTC)Reply

Certain categories are timing out

edit

I have SPARQL code to generate Wikidata lists, and I've come across a few categories that are timing out the query, without any clear differences amognst them to justify it:

Versus working categories:

BraunOBruno (talk) 11:21, 12 January 2024 (UTC)Reply

Exclude a category

edit

Is it possible to request pages that are members of a certain category BUT aren't members of another? 2800:810:49E:8CE3:1855:7B42:8E71:B741 17:58, 3 July 2024 (UTC)Reply

Deepcategory members – how to include files in subcategories?

edit

So mwapi:generator "categorymembers"; can be used to query for files/pages directly in a category but how to see files/pages directly in a category or any of its subcategories like it's possible with the deepcategory search operator on Commons? Prototyperspective (talk) 15:50, 26 November 2024 (UTC)Reply

Return to "Categorymembers" page.