API:Properties

Properties are used to get various data about a list of pages specified with either the titles=, pageids=, or revids= parameters, or by using generators.

info / in
Gets basic page information

Parameters

 * : Which properties to get
 * : The protection level
 * : The page ID of the talk page for each non-talk page
 * : The page ID of the parent page for each talk page
 * : The full and edit  for each page
 * By default, the following properties will be listed:
 * page ID
 * namespace
 * title
 * last touched timestamp
 * last revision ID
 * number of views
 * page size
 * whether the page is a redirect
 * whether the page has only one revision
 * : Which token to get
 * : Get a token for page edit
 * : Get a token for page move
 * : Get a token for page deletion
 * : include a separate list of page ids (for JSON data)

Possible warnings

 * Action ' action ' is not allowed for the current user
 * Thrown when a token is requested that the current user isn't allowed to use
 * No support for special pages has been implemented
 * Thrown when a special page is requested

Possible errors
None

revisions / rv
Returns revisions for a given page, or the latest revision for each of several pages. When using parameters marked as (enum),  must have only one title listed.

Parameters

 * : Which properties to get for each revision
 * : Revision ID (default) NOTE: Only implemented in MediaWiki versions 1.11 and above.
 * : Whether the revision was a minor edit (default)
 * : The date and time the revision was made (default)
 * : The user who made the revision (default)
 * : The edit comment (default)
 * : The size of the revision text in bytes
 * : The revision content. If set, the maximum limit will be 10 times as low
 * : any tags for this revision, such as those added by AbuseFilter. NOTE: Only implemented in MediaWiki versions 1.16 and above.
 * : When more results are available, use this to continue
 * : The maximum number of revisions to return (enum)
 * : Revision ID to start listing from. (enum)
 * : Revision ID to stop listing at. (enum)
 * : Timestamp to start listing from. (enum)
 * : Timestamp to end listing at. (enum)
 * : Direction to list in. (enum)
 * : List newest revisions first (default) NOTE: rvstart/rvstartid has to be higher than rvend/rvendid
 * : List oldest revisions first NOTE: rvstart/rvstartid has to be lower than rvend/rvendid
 * : Only list revisions made by this user
 * : Do not list revisions made by this user
 * : Expand templates in  output
 * : Generate XML parse tree for revision content
 * : If  is set, only retrieve the contents of this section. This is an integer, not a string title. NOTE: Only implemented in MediaWiki versions 1.13 and above.
 * : Tokens to get for each revision
 * : Rollback token
 * : Revision ID to diff each revision to. Use "prev", "next" and "cur" for the previous, next and current revision respectively.
 * : Text to diff each revision to. Only diffs a limited number of revisions. Overrides diffto. If rvsection is set, only that section will be diffed against this text.

Possible warnings

 * Action ' action ' is not allowed for the current user
 * Thrown when a token is requested that the current user isn't allowed to use
 * No support for special pages has been implemented
 * Thrown when a special page is requested

Possible errors

 * code: rvrevids
 * info: The revids= parameter may not be used with the list options (limit, startid, endid, dirNewer, start, end).
 * code: rvmultpages
 * info: titles, pageids or a generator was used to supply multiple pages, but the limit, startid, endid, dirNewer, user, excludeuser, start and end parameters may only be used on a single page.
 * code: rvaccessdenied
 * info: The current user is not allowed to read title
 * code: rvbadparams
 * info: start and startid cannot be used together
 * code: rvbadparams
 * info: end and endid cannot be used together
 * code: rvbadparams
 * info: user and excludeuser cannot be used together
 * code: rvnosuchsection
 * info: There is no section section in rrevid

categories / cl
Gets a list of all categories used on the provided pages. This module can be used as a generator.

Parameters

 * : Which properties to get (cannot be used with a generator)
 * : The sort key
 * : The date and time the page was added to the category, or the date and time its sortkey was changed last
 * : Which kinds of categories to list. Conflicting options (such as  and  ) cannot be used together.
 * : Only list hidden categories
 * : Don't list hidden categories
 * : Maximum number of results to return
 * : When more results are available, use this to continue
 * : Only list these categories. Useful to check whether a certain page is in a certain category
 * This parameter takes full titles, so the Category: prefix must be used

Possible warnings

 * ' title ' is not a category
 * The title mentioned is not in the Category: namespace

Possible errors

 * code: clshow
 * info: Incorrect parameter - mutually exclusive values may not be supplied

imageinfo / ii
Gets image information for any titles in the image namespace

Parameters

 * : Which properties to get
 * : The time and date of the revision (default)
 * : The user who made the revision (default)
 * : The edit comment
 * : URL of the image
 * : The image's size in bytes, plus width and height
 * : The image's SHA-1 hash
 * : The image's MIME type
 * : Image metadata, if available
 * : Archive name (old images only)
 * : How many image revisions to return (1 by default)
 * : Timestamp to start listing from
 * : Timestamp to stop listing at
 * : If  is set, a URL to an image scaled to this width will be returned as well. Old versions of images can't be scaled
 * : Similar to

langlinks / ll
Gets a list of all language links from the provided pages to other languages.

Only returns language links for 50 titles

Parameters

 * llcontinue: When more results are available, use this to continue

Possible errors
None

links / pl
Gets a list of all links on the provided pages. This module can be used as a generator.

Parameters

 * : Only list links to pages in these namespaces
 * :    How many links to return.  Default: 10. No more than 500 (5000 for bots) allowed.
 * : When more results are available, use this to continue

Possible errors
None

templates / tl
Gets a list of all pages included in the provided pages. This module can be used as a generator.

Parameters

 * : Only list pages in these namespaces
 * : How many templates to return

Possible errors
None.

images / im
''In Query API interface, this command found pages that embedded the given image. That function has been renamed to imageusage.

Gets a list of all images used on the provided pages. This module can be used as a generator.

Parameters

 * : How many images to return (since MW 1.13 r37270)

Possible errors
None.

extlinks / el
Gets a list of all external links on the provided pages

Parameters

 * : How many links to return. No more than 500 (5000 for bots) allowed. Default: 10.
 * : When more results are available, use this to continue.

Possible errors
None.

categoryinfo / ci
Gets information about categories


 * Note:
 * If the category page exists, but the category has no members, a "categoryinfo" field will not be included in the API response.

Parameters
None

Possible errors
None

duplicatefiles / df
List duplicates of the given files.

Parameters

 * : How many duplicates to list
 * : When more results are available, use this to continue

Possible errors
None.