API:Categorymembers

List of pages that belong to a given category, ordered by page sort title.

Parameters

 * : The category to enumerate (required). Must include Category: prefix. Cannot be used together with.
 * : Page ID of the category to enumerate. Cannot be used together with.
 * : Only list pages in these namespaces
 * : Type of category members to include (page, subcat or file; separate with '|'). Ignored when  is set. Default:
 * : Start listing at this timestamp. Can only be used with
 * : End listing at this timestamp. Can only be used with
 * : Start listing at this hexadecimal sortkey. Can only be used with
 * : End listing at this hexadecimal sortkey. Can only be used with
 * : Start listing at this sortkey prefix. Can only be used with . Overrides
 * : End listing before (not at) this sortkey prefix (if this value occurs it will not be included). Can only be used with . Overrides
 * : Property to sort by
 * : The article's sort key (default) . The sort key might contain "unprintable" characters such as newlines, NULs, ASCII control characters, and so on. When returned from the API using cmprop=sortkey, the whole sortkey is encoded by converting the UTF-8 to a string of hex digits. But when passed to  and , it needs to be the raw characters (percent-encoded in the URL or the application/x-www-form-urlencoded POST body, of course), not the hex digit format.
 * : The time the article was added to the category (or the categorization, i.e. the sortkey, was changed)
 * : Direction to sort in
 * : From A to Z or from 2002 to 2024. Note: cmstart has to be before cmend
 * : From Z to A or from 2024 to 2002 Note: cmstart has to be later than cmend
 * : Maximum number of pages to list (10 by default, "max" provides all members (up to 500 for normal accounts, 5000 for bot accounts))
 * : Which properties to get (separate with '|'). Default:
 * : page ID (default)
 * : page title (default)
 * : the sortkey used for sorting in the category (hexadecimal string)
 * : the sortkey prefix used for sorting in the category (human-readable part of the sortkey)
 * : type that the page has been categorised as (page, subcat or file)
 * : time and date the article was added to the category
 * : Used to continue a previous request. Format of cmcontinue is "type|hexsortkey|pageid". When used to continue query then new cmstartsortkey value is decoded value of hexsortkey.

Example
If you're using "cmcontinue" parameter for pages, the "cmtype=page" parameter is optional, but for subcategories (or files), the "cmtype=subcat" (or "cmtype=file") is necessary.

Error Codes

 * code: cmnotitle
 * info: The cmtitle parameter is required
 * code: cminvalidcategory
 * info: The category name you entered is not valid
 * code: cmbadcontinue
 * info: Invalid continue param. You should pass the original value returned by the previous query

Retrieving via AJAX
Below is sample code for retrieving the category list via an Ajax request: