Get a list of all categories. This differs from list=allpages&alnamespace=14 in that categories without descriptions will be listed and, categories with descriptions but no actual pages may not (e.g., redirects and categories where a page was created but the category was never used). Note: the allcategories list also contains categories that have been deleted and are unused. It is recommended that the list be filtered to those where the size is greater than zero or the category page exists.

<?xmlversion="1.0"?><api><query><allcategories><cxml:space="preserve">List of &quot;M&quot; series military vehicles</c><cxml:space="preserve">List of 1999 ballet premieres</c><cxml:space="preserve">List of 19th century baseball players</c><cxml:space="preserve">List of 2000s one-hit wonders in the United States</c><cxml:space="preserve">List of 2006</c><cxml:space="preserve">List of 20th-century classical composers</c><cxml:space="preserve">List of 20th-century classical composers by birth date</c><cxml:space="preserve">List of 20th Century fox films</c><cxml:space="preserve">List of 20th century classical composers</c></allcategories></query><query-continue><allcategoriesacfrom="List of 20th century classical composers by birth date"/></query-continue></api>

ascending: List from A to Z (when aisort=name) or from old to new (when aisort=timestamp)

descending: List from Z to A (when aisort=name) or from new to old (when aisort=timestamp)

newer: List from A to Z (when aisort=name) or from old to new (when aisort=timestamp) 1.20+

older: List from Z to A (when aisort=name) or from new to old (when aisort=timestamp) 1.20+

aifrom: Start listing at this title. The title doesn't need to exist. Can only be used with aisort=name

aito: Stop listing at this title. The title doesn't need to exist. Can only be used with aisort=name

aiprefix: Only list titles that start with this value. Can only be used with aisort=name

aistart: The timestamp to start enumerating from. Can only be used with aisort=timestamp 1.20+

aiend: The timestamp to end enumerating. Can only be used with aisort=timestamp 1.20+

aiminsize: Only list images that are at least this many bytes in size

aimaxsize: Only list images that are at most this many bytes in size

ailimit: Maximum amount of images to list (Default: 10)

aisha1: Only list images with this SHA-1 hash. These hashes are supposed to be unique, so you can use this to track duplicates. If you run into two different images with the same hash, you should start playing the lottery

aisha1base36: Same as aisha1, but in base 36

aiuser: Only return files uploaded by this user. Can only be used with aisort=timestamp. Cannot be used together with aifilterbots 1.20+

aifilterbots: How to filter files uploaded by bots. Can only be used with aisort=timestamp. Cannot be used together with aiuser. Possible values: all, bots, nobots. 1.20+

aiprop: Which properties to get (Default: timestamp|url)

timestamp: The time and date the most recent version of the image was uploaded

user: The name of the user who uploaded the most recent version

userid: Add the user ID that uploaded the image version 1.17+

comment: The edit comment for the latest upload

parsedcomment: Parse the comment on the version 1.17+

canonicaltitle: Adds the canonical title of the image file 1.23+

url: The URL to the most recent version of the image

size: The image's size in bytes, its height and its width. Page count and duration are added if applicable

dimensions: Alias for size

sha1: The image's SHA-1 hash

mime: The image's MIME type

mediatype: The media type of the image 1.18+

metadata: Exif metadata for the version of the image

commonmetadata: File format generic metadata for the version of the image 1.23+

alnamespace: The namespace to enumerate. You can only enumerate one namespace at a time. By default, the main namespace will be enumerated.

alunique: If set, multiple links to the same title will be listed only once. It cannot be used with alprop=ids. When used as a generator, yields target pages instead of source pages. Before MW 1.21 (gerrit:40559) it couldn't be used in generator mode.

allimit: Maximum amount of links to list. (Default: 10)

alprop: Which properties to return. (Default: title)

ids: Page IDs of the linking pages. Cannot be used together with alunique.

augroup : Limit users to given group name(s). Possible values: bot, sysop, bureaucrat (+ any other group that is defined on the wiki). This is different for every wiki; see the API help or action=paraminfo for a list of possible values.

auexcludegroup : Exclude users in given group name(s). Can not be used together with 'group'.

aurights : Limit users to given right(s)

auprop : What pieces of information to include.

blockinfo : Adds the information about a current block on the user

groups : Lists groups that the user is in. This uses more server resources and may return fewer results than the limit

implicitgroups: Lists all the groups the user is automatically in

rights : Lists rights that the user has

editcount : Adds the edit count of the user

registration : Adds the timestamp of when the user registered if available (may be blank) 1.12+

aulimit : How many total user names to return. No more than 500 (5000 for bots) allowed. (Default: 10)

When the blredirect parameter is set, this module behaves slightly differently. bllimit applies to both levels separately: if e.g. bllimit=10, at most 10 first-level pages (pages that link to bltitle) and 10 second-level pages (pages that link to bltitle through a redirect) will be listed. Continuing queries also works differently, as displayed in the following example.

Get a list of pages linking to Albert Einstein (note: the initial query includes a "blcontinue" parameter for purposes of illustration)

When continuing this request, we see that there are more pages linking to Einstein, and that some of the other first-level pages are listed again. If we continue this query again, the same first-level pages will be listed in the next response, as well. To progress beyond Energy, we have to query-continue again and again until we've had all links to Einstein (or increase bllimit, of course).

If you need to list pages as they appear in "What links here" on the MediaWiki sites with pages displaying the desired file, you might want to try API:Imageusage list. This also works on non-existent files.

older: List newest blocks first. Note: bkstart has to be later than bkend.

newer: List oldest blocks first. Note: bkstart has to be before bkend.

bkids: Only list blocks with these IDs

bkusers: Only list blocks of these users

bkip: List all blocks, including range blocks, that apply to this IP address. You can also specify a CIDR range here, in which case only blocks applying to the entire range will be listed. Cannot be used together with bkusers. CIDR ranges broader than /16 are not allowed, as range blocks cannot cross /16 boundaries

bklimit: Maximum number of blocks to list (Default: 10)

bkprop: A pipe-separated list of properties to get. They appear as keys of returned dictionary. (Default: id|user)

id: The ID of the block

user: The IP address or username that was blocked (does not appear in output for autoblocks)

userid: The id of user who was blocked (does not appear in output for autoblocks)

by: The user who applied the block

byid: The id of user who applied the block

timestamp: When the block was applied

expiry: When the block will expire

reason: The reason for the block

range: If an IP range was blocked, the first and last IP the block applies to

Will appear as rangestart and rangeend in the answer, both 0.0.0.0 for registered users. Same as user for standalone IPs.

flags: Flags that apply to the block

The appropriate flags will appear as keys of returned dictionary with an empty value. No key if the flag is not valid for the block.

automatic: Automatically blocked because of an autoblock (see also action=block)

anononly: Only anonymous edits are blocked

nocreate: Account creation is disabled

autoblock: Automatic blocking is enabled for this block

noemail: Sending e-mail through the wiki is disabled for the blocked user

allowusertalk: The user is allowed to edit his/her own talk page

hidden: This block is hidden from Special:Ipblocklist. Only users with oversight permissions can see these blocks.

<?xmlversion="1.0"encoding="utf-8"?><api><query><blocks><blockid="4"user="123.123.0.0/16"userid="0"by="Catrope"byid="1"timestamp="2007-11-23T11:44:41Z"expiry="infinity"reason="Bad proxies; these folks will just have to register"rangestart="123.123.0.0"rangeend="123.123.255.255"anononly=""/><blockid="2"user="25.50.100.200"userid="0"by="Catrope"byid="1"timestamp="2007-11-23T11:37:28Z"expiry="infinity"reason="Intimidating behaviour/harassment"rangestart="25.50.100.200"rangeend="25.50.100.200"anononly=""nocreate=""/><blockid="1"user="Vandal01"userid="3"by="Catrope"byid="1"timestamp="2007-11-23T11:36:40Z"expiry="2007-12-23T11:36:40Z"reason="Spamming links to external sites"rangestart="0.0.0.0"rangeend="0.0.0.0"nocreate=""autoblock=""noemail=""/></blocks></query></api>

cmstart: Start listing at this timestamp. Can only be used with cmsort=timestamp1.12+

cmend: End listing at this timestamp. Can only be used with cmsort=timestamp1.12+

cmstarthexsortkey: Start listing at this hexadecimal sortkey. Can only be used with cmsort=sortkey. 1.24+

cmendhexsortkey: End listing at this hexadecimal sortkey. Can only be used with cmsort=sortkey. 1.24+

cmstartsortkeyprefix: Start listing at this sortkey prefix. Can only be used with cmsort=sortkey. Overrides cmstarthexsortkey. 1.18+

cmendsortkeyprefix: End listing before (not at) this sortkey prefix (if this value occurs it will not be included). Can only be used with cmsort=sortkey. Overrides cmendhexsortkey. 1.18+

cmsort: Property to sort by (Default: sortkey)

sortkey: The article's sort key. 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.

timestamp: The time the article was added to the category (or the categorization, i.e. the sortkey, was changed)

cmdir: Direction to sort in. (Default: asc) 1.12+

asc: From A to Z or from 2002 to 2015. As of MW 1.20, ascending and newer are synonymous with asc. Note: cmstart has to be beforecmend.

desc: From Z to A or from 2015 to 2002. As of MW 1.20, descending and older are synonymous with desc. Note: cmstart has to be later thancmend.

cmlimit: Maximum number of pages to list No more than 500 (5000 for bots) allowed. (Default: 10)

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

cmcontinue: Used to continue a previous request.

cmstartsortkey: Like cmstarthexsortkey, but the value is passed as a binary string rather than the hex-encoded value returned from cmprop=sortkey. 1.14+(deprecated in 1.24)

cmendsortkey: Like cmendhexsortkey, but the value is passed as a binary string rather than the hex-encoded value returned from cmprop=sortkey. 1.14+(deprecated in 1.24)

<?xmlversion="1.0"encoding="utf-8"?><api><query-continue><categorymemberscmcontinue="subcat|57494b4950454449412050454f504c45|41491664"/></query-continue><query><categorymembers><cmpageid="1458692"ns="14"title="Category:Wikipedias by language"/><cmpageid="22918730"ns="14"title="Category:Books about Wikipedia"/><cmpageid="16957584"ns="14"title="Category:Critics of Wikipedia"/><cmpageid="29605819"ns="14"title="Category:Films about Wikipedia"/><cmpageid="3646304"ns="14"title="Category:History of Wikipedia"/><cmpageid="42635523"ns="14"title="Category:Wikipedia-related lists"/><cmpageid="34012839"ns="14"title="Category:Organisations using QRpedia"/><cmpageid="22773532"ns="14"title="Category:Parodies of Wikipedia"/><cmpageid="3102055"ns="14"title="Category:Websites which use Wikipedia"/><cmpageid="42600182"ns="14"title="Category:Wikipedia controversies"/></categorymembers></query></api>

Continue the next subcategories (if there's more than 10) in Category:Wikipedia (the "cmcontinue" parameter is from the result above)

older: List newest revisions first. Note: drstart has to be later than drend.

newer: List oldest revisions first. Note: drstart has to be earlier than drend.

drnamespace: List all deleted revisions in this namespace.[2] (Note that namespace was included in the original 1.12 as a pipe-separated list of values, but was removed in 1.13. In 1.15, it was reintroduced as a single-valued parameter.) 1.15+

euquery: The URL to search for, without the protocol. * can be used as a wildcard. If omitted, all external links will be listed, filtered by euprotocol, if provided. MediaWiki versions 1.11 and 1.12 abort if euquery is omitted.

eunamespace: Only list links from pages in these namespaces

eulimit: Maximum amount of pages to list No more than 500 (5000 for bots) allowed. (Default: 10)

Find all pages that link to the given language link. Can be used to find all links with a language code, or all links to a title (with a given language). Using neither parameter is effectively "All Language Links".

userid: The user ID who was responsible for the log event. When specified for account creation events, the userid of the creating user is returned. When absent, the userid returned is that of the created account (see bugzilla:71020).

<?xmlversion="1.0"encoding="utf-8"?><api><query-continue><logeventslestart="2008-03-25T21:26:37Z"/></query-continue><query><logevents><itemlogid="0"pageid="16577509"ns="1"title="Talk:Parisii (France)"type="move"action="move"user="QuartierLatin1968"timestamp="2008-03-25T21:31:39Z"comment="It is wrong to use such an anachronistic name."><movenew_ns="1"new_title="Talk:Parisii (Gaul)"/></item><itemlogid="0"pageid="16577508"ns="0"title="Parisii (France)"type="move"action="move"user="QuartierLatin1968"timestamp="2008-03-25T21:31:38Z"comment="It is wrong to use such an anachronistic name."><movenew_ns="0"new_title="Parisii (Gaul)"/></item><itemlogid="0"pageid="16577421"ns="10"title="Template:User Brunei work group"type="move"action="move"user="Black Falcon"timestamp="2008-03-25T21:28:02Z"comment="Has become a full WikiProject"><movenew_ns="10"new_title="Template:User WikiProject Brunei"/></item></logevents></query></api>

Pages are listed in a fixed sequence, only the starting point is random.</translate> <translate> This means that if, for example, "Main Page" is the first random page on your list, "List of fictional monkeys" will always be second, "List of people on stamps of Vanuatu" third, etc.

If the number of pages in the namespace is lower than rnlimit, you will get fewer pages.</translate> <translate> You will not get the same page twice.

Get all recent changes to the wiki, à la Special:Recentchanges. This module can be used as a generator (but note that, like all other generators, it generates information about pages, not about revisions). Apparently, although many log actions can be viewed using this module, patrol actions are not among them. This module is implemented by ApiQueryRecentChanges.php.

score: Adds the score (if any) from the search engine 1.17+(deprecated in 1.24)

snippet: Adds a parsed snippet of the page

titlesnippet: Adds a parsed snippet of the page title 1.17+

redirecttitle: Adds a parsed snippet of the redirect title 1.17+

redirectsnippet: Adds a parsed snippet of the redirect 1.17+

sectiontitle: Adds a parsed snippet of the matching section title 1.17+

sectionsnippet: Adds a parsed snippet of the matching section 1.17+

hasrelated: Indicates whether a related search is available 1.17+(deprecated in 1.24)

srredirects: Include redirect pages in the search. From 1.23 onwards, redirects are always included. (Default: false) (removed in 1.23)

sroffset: Use this value to continue paging (returned by query).

srlimit: How many total pages to return. No more than 50 (500 for bots) allowed. (Default: 10)

srinterwiki: Include interwiki results in the search, if available. (Default: false) 1.23+

srbackend: Class name of search backend to use (Default: $wgSearchType) 1.22+

Depending on which search backend is in use, how srsearch is interpreted may vary. On Wikimedia wikis which use Lucene search, see w:Help:Searching#Search_engine_features for information about the search syntax.

Gets a list of contributions made by a given user, ordered by modification time. This module cannot be used as a generator.

Version notes: Prior to MW 1.14, the start parameter was used to continue. Between 1.14 and 1.22, start was used as a continue for single-user mode; continue was used as a continue for multi-user mode. From 1.23 forwards, continue is the only continue parameter.

uccontinue: When more results are available, use this to continue. 1.14+

ucuser: Users to retrieve contributions for

ucuserprefix: List contributions of all users whose name starts with this string. Overrides ucuser. This is useful for getting contributions of IP ranges. Note that contributions will be sorted by user first, then by timestamp, when using this option. 1.13+

ucdir: Direction to list in. (Default: older)

older: List newest contributions first. If there are multiple users, they will be listed in descending order (Z to A). Note: ucstart has to be later thanucend.

newer: List oldest contributions first. If there are multiple users, they will be listed in ascending order (A to Z). Note: ucstart has to be earlier thanucend.

ids: Page ID and revision ID. Starting in MediaWiki 1.22 this will also include the parent revision's id.

title: Title of the page that was changed

timestamp: Time and date of the contribution

comment: Edit/log comment

parsedcomment: Parsed edit/log comment 1.16+

size: Size of the edit 1.16+

sizediff: Size delta between the edit and its parent 1.20+

flags: Flags that apply to the edit (note that the bot flag is not included, it is only available through API:Recentchanges):

new: A new page was created

minor: The change was a minor edit

top: This is the latest version of the article

patrolled: Whether the change is patrolled. Only available to users with the patrol right 1.15+

tags: List of tags for the edit 1.16+

ucshow: Only list contributions that meet these criteria. Conflicting options (such as minor and !minor) cannot be used together. Note: If patrolled or !patrolled are used, revisions older than $wgRCMaxAge will not be shown. 1.11+

minor: Only list minor edits

!minor: Don't list minor edits

patrolled: Only list patrolled edits. Only available to users with the patrol right 1.15+

!patrolled: Only list non-patrolled edits. Only available to users with the patrol right 1.15+

top: Only list top (latest) edits. 1.23+

!top: Only list non-top edits. 1.23+

new: Only list page creations. 1.23+

!new: Don't list page creations. 1.23+

uctag: Only list revisions tagged with this tag 1.16+

uctoponly: Only show top edits (deprecated in favor of ucshow=top) 1.18+(deprecated in 1.23)

wllimit: Maximum amount of pages to list No more than 500 (5000 for bots) allowed. (Default: 10)

wlprop: Which properties to get (Default: ids|title|flags)

ids: The page ID and revision ID 1.11+

title: The title the change was made to 1.11+

flags: Flags for the edit (anon, bot, new, minor) 1.11+

user: The user who made the change

userid: The id of the user who made the change 1.17+

comment: The edit/log comment

parsedcomment: The edit/log comment in HTML format with wikilinks and section references expanded into hyperlinks 1.16+

timestamp: The time and date of the change

patrol: Whether the change is patrolled. Only available to users with the patrol right

sizes: The page size before and after the change 1.11+

notificationtimestamp: Adds timestamp of when the user was last notified about the edit 1.16+

loginfo: Adds log information where appropriate 1.18+

wlshow: Only list revisions that meet these criteria. Conflicting options (such as minor and !minor) cannot be used together 1.12+

minor: Only list minor edits

!minor: Don't list minor edits

bot: Only list bot edits

!bot: Don't list bot edits

anon: Only list edits by anonymous users

!anon: Only list edits by registered users

patrolled: Only list patrolled edits 1.14+

!patrolled: Only list unpatrolled edits 1.14+

unread: Only list unread edits 1.24+

!unread: Only list already read edits 1.24+

wltype: Only list certain types of changes 1.22+

edit: Regular page edits

external: External edits

new: Page creations

log: Log entries

wlowner: The user whose watchlist you want (must be accompanied by wltoken if it's not the currently logged-in user). Remember that using format=json with callback is always in a logged-out environment, meaning wltoken is required even if it's for the supposedly current logged-in user. 1.16+

wltoken: Security token that the wlowner has set in their preferences 1.16+

wlcontinue: When more results are available, use this to continue 1.23+

{"watchlistraw":[{"ns":14,"title":"Category:2000 disestablishments in Ohio"},{"ns":14,"title":"Category:Causeways in the United States"},{"ns":14,"title":"Category:Pages with incorrectly substituted templates"}]}