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
Retrieves basic page information. The code for retrieving page properties is located on the git repository at.

Parameters

 * : Which properties to get
 * : The protection level
 * : The page ID of the talk page for each non-talk page
 * : Indicates whether or not the page is being watched by you. (It returns an empty string if you watch the page and the key is missing from answer if you don't watch it.)
 * : The number of watchers, if allowed
 * : The watchlist notification timestamp of each page
 * : The page ID of the parent page for each talk page
 * : The full and edit  for each page
 * : Whether the user can read this page
 * : Include the text returned by EditFormPreloadText.
 * : Gives the way the page title is actually displayed
 * : Request a token to perform a data-modifying action on a page. Available tokens include:,  ,  ,  ,  ,  ,  ,  ,
 * : When more results are available, use this to continue
 * When the result is bigger than $wgAPIMaxResultSize

By default, the following properties will be listed:
 * : page ID.
 * : namespace.
 * : title.
 * : page_touched timestamp.
 * : last revision ID.
 * : If $wgDisableCounters is false, gives number of views. Otherwise, gives empty attribute. (note that $wgDisableCounters is set to true on Wikimedia servers.)
 * : page size.
 * : whether the page is a redirect.
 * : whether the page has only one revision.
 * : which content model the page has; usually "wikitext".
 * : the language code of the page content language (mostly $wgLanguageCode).

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. The code for this query is located on the git repository at

Parameters

 * : Which properties to get for each revision
 * : Get both of these IDs: revid, parentid (default)
 * : Whether the revision was a minor edit (default)
 * : The date and time the revision was made (default)
 * : The user who made the revision, as well as userhidden and anon flags (default)
 * : User id of revision creator, as well as userhidden and anon flags
 * : SHA-1 (base 16) of the revision
 * : Content model id of the revision
 * : The edit comment (default)
 * : The edit/log comment in HTML format with wikilinks and section references expanded into hyperlinks
 * : 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
 * : When more results are available, use this to continue. This can be used, for example, for fetching the text of all revisions of a page (although an XML export might be more efficient).
 * : The maximum number of revisions to return. Use the string "max" to return all revisions (subject to being broken up as usual, using continue). Limited by query limits defined in ApiBase, which equals 500 for users and 5000 for bots. (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
 * : Parse revision content. For performance reasons if this option is used, rvlimit is enforced to 1.
 * : If  is set, only retrieve the contents of this section. This is an integer, not a string title.
 * : 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.
 * : Only list revisions tagged with this tag
 * : Serialization format used for difftotext and expected for output of content

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

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
 * : The sort key
 * : The date and time the page was added to the category, or the date and time its sortkey was changed last
 * : Whether the category is hidden or not
 * : 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

imageinfo / ii
Gets image information for any titles in the image namespace. This will eventually get superseded by prop=fileinfo.

Parameters

 * : Which properties to get
 * : The time and date of the revision (default)
 * : The user who made the revision (default)
 * : The id of the user who made the revision
 * : The edit comment
 * : Parsed version of comment
 * : The canonical title of the image file
 * : URLs of the image and its description page
 * : The image's size in bytes, plus width and height. A page count is also returned if the image is in a format that supports multiple pages.
 * : (Alias for size)
 * : The image's SHA-1 hash
 * : The image's MIME type
 * : The image thumbnail's MIME type (for use with the iiurl parameters)
 * : The media type of the image
 * : Exif metadata for the image, if available. See Manual:File_metadata_handling for information on file metadata handling in MediaWiki
 * : Generic metadata for the file format, if available.
 * : HTML metadata from extensions which implement the GetExtendedMetadata hook. Also contains most of, but in a somewhat standardized format.
 * : Archive name (old images only)
 * : The bit depth of the image
 * : Used by Special:Upload. Not intended for use outside the MediaWiki core.
 * : 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
 * What version of metadata to use. Only affects JPEGs (as of this writing). You usually want this set to latest.
 * What language to fetch extmetadata in. This affects both which translation to fetch, if multiple are available, as well as how things like numbers and various values are formatted.
 * If translations for extmetadata property are available, fetch all of them. The values of the multi-languaged metadata items will be in the multi-language array format. (Which items are multilanguaged might change from image to image.)
 * : If specified and non-empty, only these keys will be returned for prop=extmetadata
 * The thumb parameter string. Allows user to optionally specify other parameters than width and height (like page number for pdfs). Format of the field varies with image format. PDF uses a format like page - px (e.g. page3-140px ). Its generally the part before the filename in the url of a thumbnail.
 * Only show local images.

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

Only returns language links for 50 titles

Parameters

 * : How many langlinks to return. Default: 10. No more than 500 (5000 for bots) allowed.
 * : When more results are available, use this to continue
 * : Whether to get the full URL
 * : Which additional properties to get for each interlanguage link
 * : Adds the full URL
 * : Adds the localised language name (best effort, use CLDR extension). Use llinlanguagecode to control the language
 * : Adds the native language name",
 * : Language code
 * : Link to search for. Must be used with lllang
 * : The direction in which to list
 * : Language code for localised language names

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 (typically templates) transcluded in the provided pages. This module can be used as a generator.

Parameters

 * : Only list pages in these namespaces
 * : How many templates to return. Default: 10. No more than 500 (5000 for bots) allowed.
 * : When more results are available, use this to continue
 * : Only list these templates. Useful to check whether a certain template is transcluded in a certain page

Possible errors
None.

images / im
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
 * : When more results are available, use this to continue
 * : Only list these images. Useful for checking whether a certain page has a certain Image.
 * : The direction in which to list

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

 * : When more results are available, use this to continue
 * When the result is bigger than $wgAPIMaxResultSize

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.

pageprops / pp
Get various properties defined in the page content.

Parameters

 * : When more results are available, use this to continue
 * When the result is bigger than $wgAPIMaxResultSize
 * : Page prop to look on the page for. Useful for checking whether a certain page uses a certain page prop.

Possible errors
None.

contributors / pc
Get the list of logged-in contributors and the count of anonymous contributors to a page.

Parameters

 * : Group name(s) to include in list.
 * : Group name(s) to exclude from list.
 * : Limit users to those having given right(s).
 * : Limit users to those not having given right(s).
 * : Maximum number of contributors to list. No more than 500 (5000 for bots) allowed. Default: 10
 * : When more results are available, use this to continue.
 * When the result is bigger than $wgAPIMaxResultSize

Possible errors
?