API:Lists

Lists differ from properties in two aspects - instead of appending data to the elements in the  element. Also, list output is limited by number of items, and may be continued using the  element. Unless indicated otherwise, all modules listed on this page can be used as a generator.

allpages / ap
Returns a list of pages in a given namespace, ordered by page title.

Parameters

 * : Start listing at this title. The title need not exist
 * : Only list titles that start with this value
 * : The namespace to enumerate. You can only enumerate one namespace at a time. By default, the main namespace will be enumerated
 * : How to filter redirects
 * : List all pages regardless of their redirect flag (default)
 * : Only list redirects
 * : Don't list redirects
 * : How to filter based on whether a page has language links
 * : List all pages regardless of whether they have language links (default)
 * : Only list pages with language links
 * : Only list pages without language links
 * : Only list pages that are at least this many bytes in size
 * : Only list pages that are at most this many bytes in size
 * : Only list pages that have been protected from this type of action
 * : Only list edit-protected pages
 * : Only list move-protected pages
 * Other wikis may allow for more kinds of protection and will therefore provide more options here
 * : Only list pages that have been protected at this level
 * : Only autoconfirmed users can edit/move/whatever
 * : Only sysops can edit/move/whatever
 * Empty: Everyone can edit/move/whatever
 * Other wikis may allow protection on more levels and will therefore provide more options here
 * : Maximum amount of pages to list (10 by default)
 * : In which direction to list
 * : List from A to Z (default)
 * : List from Z to A

alllinks / al
Returns a list of (unique) links to pages in a given namespace starting ordered by link title.

Parameters

 * : Start listing at this title. The title need not exist
 * : Only list links to titles that begin with this value
 * : The namespace to enumerate. You can only enumerate one namespace at a time. By default, the main namespace will be enumerated
 * : If set, multiple links to the same title will be listed only once. Cannot be used in generator mode or with
 * : Maximum amount of links to list (10 by default)
 * : Which properties to return
 * : Page IDs of the linking pages. Cannot be used together with
 * : Link titles (default)

allcategories / ac
Get a list of all categories. This differs from list=allpages&alnamespace=14 in that empty categories aren't listed, and categories without description pages are.

Parameters

 * : Start listing at this category title. The category need not exist
 * : Only list category titles starting with this value
 * : Maximum amount of categories to list (10 by default)
 * : In which direction to list
 * : List from A to Z (default)
 * : List from Z to A

allusers / au
Get a list of registered users, ordered by username. This module cannot be used as a generator.

Parameters

 * : Start listing at this username. The user name need not exist
 * : Only list usernames starting with this value
 * : Only list users in this group
 * 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
 * : Which properties to return
 * : The number of edits the user has made
 * : A list of all groups the user is in
 * : The date and time of the user's registration
 * : Number of users to list (10 by default)
 * : A list of all groups the user is in
 * : The date and time of the user's registration
 * : Number of users to list (10 by default)

allimages / ai
Returns a list of all images, ordered by image title.

Parameters

 * : Start listing at this title. The title need not exist
 * : Only list titles that start with this value
 * : Only list images that are at least this many bytes in size
 * : Only list images that are at most this many bytes in size
 * : Maximum amount of images to list (10 by default)
 * : In which direction to list
 * : List from A to Z (default)
 * : List from Z to A
 * : 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
 * : Same as, but in base 36
 * : Which properties to get
 * : The time and date the most recent version of the image was uploaded (default)
 * : The URL to the most recent version of the image (default)
 * : The image's size in bytes
 * : The image's width and height in pixels
 * : The image's MIME type
 * : The image's SHA-1 hash

backlinks / bl
Lists pages that link to a given page, similar to Special:Whatlinkshere. Ordered by linking page title.

Parameters

 * : List pages linking to this title. The title need not exist
 * : Only list pages in these namespaces
 * : How to filter redirects
 * : List all pages regardless of their redirect flag (default)
 * : Only list redirects
 * : Don't list redirects
 * : Maximum amount of pages to list (10 by default)
 * : If set, pages linking to  through a redirect will also be listed. See below for more detailed information
 * : Used to continue a previous request

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

When continuing this request, we see that there are more pages linking to API, and that the other first-level pages are listed again. To progress beyond Berkeley DB, we have to query-continue again and again until we've had all links to API (or increase, of course).

Parameters

 * : The timestamp to start listing from
 * : The timestamp to end listing at
 * : Direction to list in.
 * : List newest blocks first (default). Note: bkstart has to be later than bkend.
 * : List oldest blocks first. Note: bkstart has to be before bkend.
 * : Only list blocks with these IDs
 * : Only list blocks of these users
 * : Maximum number of blocks to list (10 by default)
 * : A pipe-separated list of properties to get. The default value is id|user|by|timestamp|expiry|reason|flags
 * : The ID of the block (default)
 * : The IP address or username that was blocked (default)
 * : The user who applied the block (default)
 * : When the block was applied (default)
 * : When the block will expire (default)
 * : The reason for the block (default)
 * : If an IP range was blocked, the first and last IP the block applies to
 * : Flags that apply to the block (default)
 * : Automatically blocked because of an autoblock (see also action=block)
 * : Only anonymous edits are blocked
 * : Account creation is disabled
 * : Automatic blocking is enabled for this block
 * : Sending e-mail through the wiki is disabled for the blocked user
 * : This block is hidden from Special:Ipblocklist. Only users with oversight permissions can see these blocks.

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

Parameters

 * : The category to enumerate
 * : Only list pages in these namespaces
 * : Start listing at this timestamp
 * : End listing at this timestamp
 * : Property to sort by
 * : The article's sort key (default)
 * : The time the article was added to the category
 * : 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 amount of pages to list (10 by default)
 * : Which properties to get
 * : page ID (default)
 * : page title (default)
 * : sort key
 * : time and date the article was added to the category
 * : Used to continue a previous request

embeddedin / ei
List pages that include a certain page.

Parameters

 * : List pages including this title. The title need not exist
 * : Only list pages in these namespaces
 * : How to filter redirects
 * : List all pages regardless of their redirect flag (default)
 * : Only list redirects
 * : Don't list redirects
 * : Maximum amount of pages to list (10 by default)
 * : Used to continue a previous request

exturlusage / eu
Get a list of pages that link to a certain URL, à la Special:Linksearch

Parameters

 * : The URL to search for, without the protocol.  can be used as a wildcard
 * : Protocol of the URL
 * The options for this parameter vary per wiki. By default, the options are  (default), ,  ,  ,  ,  ,  ,  ,  ,
 * : Only list links from pages in these namespaces
 * : Maximum amount of pages to list (10 by default)
 * : Which properties to get
 * : Page ID of the linking page
 * : Title of the linking page
 * : URL being linked to
 * : Used for continuing a previous request

imageusage / iu
List of pages that include a given image. Ordered by page title.

Parameters

 * : List pages using this image. The image need not exist
 * : Only list pages in these namespaces
 * : How to filter redirects
 * : List all pages regardless of their redirect flag (default)
 * : Only list redirects
 * : Don't list redirects
 * : Maximum amount of pages to list (10 by default)
 * : If set, pages linking to  through a redirect will also be listed. See the documentation for list=backlinks for more detailed information
 * : Used to continue a previous request

logevents / le
Get a list of all logged events, à la Special:Log. This module cannot be used as a generator.

Parameters

 * : Which properties to get
 * : Page ID of the page in question and log ID (default)
 * : Title of the page in question (default)
 * : Type of log entry (default)
 * : User responsible for the log entry (default)
 * : Time and date the log entry was created (default)
 * : Log comment (default)
 * : Extra information (not present for all log types) (default)
 * : Only list log entries of this type
 * Extensions may add other log types
 * : Only list log entries made by this user
 * : Only list log entries related to this title
 * : The timestamp to start listing from
 * : The timestamp to end listing at
 * : Direction to list in
 * : List newest log entries first (default). Note:  has to be later than  .
 * : List oldest log entries first. Note:  has to be before  .
 * : Maximum amount of log entries to list (10 by default)
 * Extensions may add other log types
 * : Only list log entries made by this user
 * : Only list log entries related to this title
 * : The timestamp to start listing from
 * : The timestamp to end listing at
 * : Direction to list in
 * : List newest log entries first (default). Note:  has to be later than  .
 * : List oldest log entries first. Note:  has to be before  .
 * : Maximum amount of log entries to list (10 by default)

recentchanges / rc
Get all recent changes to the wiki, à la Special:Recentchanges

Parameters

 * : The timestamp to start listing from
 * : The timestamp to end listing at
 * : Direction to list in
 * : List newest changes first (default). Note:  has to be later than  .
 * : List oldest changes first. Note:  has to be before  .
 * : Maximum amount of changes to list (10 by default)
 * : Only list changes in these namespaces
 * : Only list changes to these titles
 * : Only list certain types of changes
 * : Regular page edits
 * : Page creations
 * : Log entries
 * : Only list items that meet these criteria. Conflicting options (such as  and  ) cannot be used together
 * : Only list minor edits
 * : Don't list minor edits
 * : Only list bot edits
 * : Don't list bot edits
 * : Only list edits by anonymous users
 * : Only list edits by registered users
 * : Which properties to get
 * : The user who made the change
 * : The edit/log comment
 * : The time and date of the change (default)
 * : The title the change was made to (default)
 * : The page ID, revision ID, previous revision ID and RCID (used for patrolling) (default)
 * : The page size before and after the change
 * : Whether the change is patrolled. Only available to users with the  right
 * : A new page was created
 * : The change was a minor edit
 * : The change was a bot edit
 * : The change was a bot edit

search / sr
Search for a string in all articles à la Special:Search

Parameters

 * : The string to search for
 * : Where to search in
 * : Search in page titles (default) (disabled on Wikimedia wikis, use  instead)
 * : Search in page text
 * : Only search in these namespaces. By default, only the main namespace is searched
 * : Also list redirects
 * : Maximum amount of pages to list (10 by default)
 * : Used to continue a previous request

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

Parameters

 * : User to retrieve contributions for
 * : List contributions of all users whose name starts with this string. Overrides
 * 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
 * : The timestamp to start listing from
 * : The timestamp to end listing at
 * : Direction to list in
 * : List newest contributions first (default). Note:  has to be later than  .
 * If using, users will be listed in descending order (Z to A)
 * : List oldest contributions first. Note:  has to be before  .
 * If using, users will be listed in ascending order (A to Z)
 * : Maximum amount of contributions to list (10 by default)
 * : Only list contributions in these namespaces
 * : Only list contributions that meet these criteria. Conflicting options (such as  and  ) cannot be used together
 * : Only list minor edits
 * : Don't list minor edits
 * : Which properties to get
 * : Page ID and revision ID
 * : Title of the page that was changed
 * : Time and date of the contribution
 * : Edit/log comment
 * : A new page was created
 * : The change was a minor edit
 * : The change was a bot edit
 * : The change was a bot edit

watchlist / wl
Get a list of pages on the current user's watchlist that were changed within the given time period. Ordered by time of the last change of the watched page.

Parameters

 * : The timestamp to start listing from
 * : The timestamp to end listing at
 * : Direction to list in
 * : List most recently changed pages first (default). Note:  has to be later than  .
 * : List least recently changed pages first. Note:  has to be before  .
 * : Maximum amount of pages to list (10 by default)
 * : Only list pages in these namespaces
 * : Include multiple revisions to the same page. This parameter cannot be used in generator mode
 * : Only list revisions that meet these criteria. Conflicting options (such as  and  ) cannot be used together
 * : Only list minor edits
 * : Don't list minor edits
 * : Only list bot edits
 * : Don't list bot edits
 * : Only list edits by anonymous users
 * : Only list edits by registered users
 * : Which properties to get
 * : The user who made the change
 * : The edit/log comment
 * : The time and date of the change
 * : The title the change was made to (default)
 * : The page ID, revision ID, previous revision ID and RCID (used for patrolling) (default)
 * : The page size before and after the change
 * : Whether the change is patrolled. Only available to users with the  right
 * : (default)
 * : A new page was created
 * : The change was a minor edit
 * : The change was a bot edit

deletedrevs / dr

 * Ideas
 * Expose as part of revisions?

Parameters

 * titles: Pipe-separated list of titles to list deleted revisions for (optional). If not specified, all deleted revisions will be listed.
 * drstart: The timestamp to start listing from (optional). If not specified, all revisions before drend will be listed.
 * drend: The timestamp to end listing at (optional). If not specified, all revisions later than drstart will be listed.
 * drdir: Direction to list in.
 * older: List newest revisions first (default). Note: drstart has to be later than drend.
 * newer: List oldest revisions first. Note: drstart has to be before drend.
 * drnamespace: Pipe-separated list of namespace numbers to search in. By default, all namespaces will be searched.
 * drlimit: Maximum number of revisions to get. If not specified, 10 revisions will be listed.
 * drprop: A pipe-separated list of properties to get. Possible values are revid, user, comment, minor, len, content and token. The default value is user|comment.

Possible errors
All errors are formatted as:
 * code: drpermissiondenied
 * info: You don't have permission to view deleted revisions
 * On most wikis, viewing deleted revisions is restricted to sysops, but other wikis may have stricter rules.

Parameters

 * bkstart: The timestamp to start listing from (optional). If not specified, all blocks before bkend will be listed.
 * bkend: The timestamp to end listing at (optional). If not specified, all blocks later than bkstart will be listed.
 * bkdir: Direction to list in.
 * older: List newest blocks first (default). Note: bkstart has to be later than bkend.
 * newer: List oldest blocks first. Note: bkstart has to be before bkend.
 * bkids: Pipe-separated list of block IDs to list (optional). If not specified, blocks will be listed regardless of ID.
 * bkusers: Pipe-separated list of users to search for (optional). If not specified, blocks for all users will be listed.
 * bklimit: Maximum number of blocks to get. If not specified, 10 blocks will be listed.
 * bkprop: A pipe-separated list of properties to get. The default value is id|user|by|timestamp|expiry|reason|flags
 * id: The ID of the block
 * user: The IP address or username that was blocked
 * by: The 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
 * flags: Flags that apply to 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
 * hidden: This block is hidden from Special:Ipblocklist. Only users with oversight permissions can see these blocks.

Sample request
TODO from here onward