API:Lists

Lists differ from other properties in two aspects - instead of appending data to the elements under 'pages' element, each list has its own separated branch under 'query' element. Also, list output is limited by number of items, and may be continued using "paging" technique. Even when no limit is provided, the query will only return a set number of items, and will also provide a string point from which to continue paging. See allpages list for an example.

allpages / ap (done)

 * Returns a list of pages in a given namespace starting at from, ordered by page title.
 * Parameters: apfrom (paging), apnamespace (dflt=0), apredirect (flt), aplimit (dflt=10, max=500/5000)

alllinks / al (done)

 * Returns a list of (unique) links to a given namespace starting at from, ordered by link title. If alunique is set, alprop=ids or generator mode is not allowed.
 * Parameters: alfrom (paging), alunique (flt), alprop=ids|title (dflt=title), alnamespace (dflt=0), allimit (dflt=10, max=500/5000)
 * Rationale: Cyrillic-based languages share many letters with latin alphabet, yet have different character codes. So even though the text looks right, the link does not work. Having this query will allow an order of magnitude improvement in finding such mixed-case links (in unique mode).

allusers / au (done)

 * Gets a list of registered users, ordered by user name.
 * Parameters: aufrom (paging), auprefix (like in allpages), auprop=editcount|groups|..., augroup, aulimit (dflt=10, max=500/5000)

backlinks / bl (done without redirects)
Lists pages that link to the given page. Ordered by linking page title. Parameters: bltitle, blcontinue (paging), blnamespace (flt), blredirect (flt, not impl), bllimit (dflt=10, max=500/5000)

categorymembers / cm (done)

 * List of pages that belong to a given category, ordered by page sort title.
 * Parameters: cmcategory, cmprop (properties), cmcontinue (paging), cmnamespace (flt), cmlimit (dflt=10, max=500/5000)

api.php ? action=query & list=categorymembers & cmcategory=CatName

embeddedin / ei (done without redirects)

 * What pages include template:title page as a template. List of pages that include the given page using . Ordered by including page title.
 * Parameters: eititle, eicontinue (paging), einamespace (flt), eiredirect (flt, not implemented), eilimit (dflt=10, max=500/5000)

exturlusage / eu (done)

 * What pages contain a given URL (or its part)
 * Parameters: euprotocol, euquery, euoffset (paging), eunamespace (flt), eulimit (dflt=10, max=500/5000)
 * euurl must begin with one of the supported protocols (http, https, mailto, ...). The server name may begin with a '*.' in front of the server name, and the path may end with another '*'. See Special:LinkSearch for similar functionality.

imageusage / iu (done)

 * This was renamed from imagelinks (MediaWiki 1.9) in query.php, and from imgebeddedin in the earlier API version to avoid confusion. images will now be used to get all images used on a given page.

List of pages that include a given image. Ordered by page title.
 * Parameters: iutitle, iucontinue (paging), iuredirect, iunamespace (flt), iulimit (dflt=10, max=500/5000)

logevents / le (semi-complete)

 * List log events, filtered by time range, event type, user type, or the page it applies to. Ordered by event timestamp.
 * Parameters: letype (flt), lefrom (paging timestamp), leto (flt), ledirection (dflt=older), leuser (flt), letitle (flt), lelimit (dflt=10, max=500/5000)

api.php ? action=query & list=logevents     - List last 10 events of any type

recentchanges / rc (done)

 * Gets a list of pages recently changed, ordered by modification timestamp.
 * Parameters: rcfrom (paging timestamp), rcto (flt), rcnamespace (flt), rcminor (flt), rcusertype (dflt=not|bot), rcdirection (dflt=older), rclimit (dflt=10, max=500/5000)

api.php ? action=query & list=recentchanges - List last 10 changes

search / sr (done)

 * Full text search in wiki

usercontribs / uc (semi-complete, needs parameter revision)

 * Gets a list of pages modified by a given user, ordered by modification time.
 * Parameters: ucuser, ucfrom (paging timestamp), ucto (flt), ucnamespace (flt), ucminor (flt), uctop (flt), ucdirection (dflt=older), uclimit (dflt=10, max=500/5000)

api.php ? action=query & list=usercontribs & ucuser=UserA  - List last 10 changes made by userA

watchlist / wl (done)

 * Get a list of pages on the user's watchlist but only if they were changed within the given time period. Ordered by time of the last change of the watched page.
 * Parameters: wlfrom (paging timestamp), wlto (flt), wlnamespace (flt), wldirection (dflt=older), wllimit (dflt=10, max=500/5000)

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.