API:Parameter information
![]() |
This page is part of the MediaWiki action API documentation. |
MediaWiki action API
- Introduction and quick start
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Searching (by title, content, coordinates...)
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Create and edit pages
- Move pages
- Merge pages
- Rollback
- Delete pages
- Restore deleted revisions
- (Un)protect pages
- (Un)block users
- (Un)watch pages
- Mark revisions of watched pages as visited
- Send email
- Patrol changes
- Import pages
- Change user group membership
- Upload files
- User options
- Tokens
- Page language
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
Parameter information | ||
---|---|---|
Obtain information about certain API parameters and errors This module cannot be used as a Generator . |
||
Prefix | none | |
Required rights | none | |
Post only? | No | |
Generated help | Current | |
Version added |
|
Obtaining parameter information[edit]
You can obtain information about modules and their parameters through action=paraminfo.
Parameters[edit]
modules
: A list of top-level module names (value of theaction
parameter) or submodules such asquery+siteprop
.helpformat
: Format of help strings. Possible values:html
,wikitext
,raw
,none
. (Default:none
) 1.25+querymodules
: A list of query module names (value of theprop
,meta
orlist
parameter). Usemodules=query+module
instead. (deprecated in 1.25)mainmodule
: Get information about the main (top-level) module as well. Usemodules=main
instead. Type: bool 1.15+ (deprecated in 1.25)pagesetmodule
: Get information about the pageset module (providingtitles
and friends) as well. Usemodules=query
instead. Type: bool 1.15+ (deprecated in 1.25)formatmodules
: List of format module names (value offormat
parameter). Usemodules=format
instead. Possible values: see Data formats. 1.19+ (deprecated in 1.25)
Example[edit]
Getting information about action=parse , prop=info query submodule, and a bogus query module:
Result |
---|
{
"warnings": {
"paraminfo": {
"*": "The module \"query\" does not have a submodule \"blah\""
}
},
"paraminfo": {
"helpformat": "none",
"modules": [
{
"name": "parse",
"classname": "ApiParse",
"path": "parse",
"group": "action",
"prefix": "",
"source": "MediaWiki",
"sourcename": "MediaWiki",
"licensetag": "GPL-2.0+",
"licenselink": "//en.wikipedia.org/wiki/Special:Version/License/MediaWiki",
"readrights": "",
"helpurls": [
"https://www.mediawiki.org/wiki/API:Parsing_wikitext#parse"
],
"parameters": [
{
"name": "title",
"type": "string"
},
{
"name": "text",
"type": "string"
},
{
"name": "summary",
"type": "string"
},
{
"name": "page",
"type": "string"
},
{
"name": "pageid",
"type": "integer"
},
{
"name": "redirects",
"default": "false",
"type": "boolean"
},
{
"name": "oldid",
"type": "integer"
},
{
"name": "prop",
"default": "text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle|iwlinks|properties",
"multi": "",
"limit": 50,
"lowlimit": 50,
"highlimit": 500,
"type": [
"text",
"langlinks",
"categories",
"categorieshtml",
"links",
"templates",
"images",
"externallinks",
"sections",
"revid",
"displaytitle",
"headitems",
"headhtml",
"modules",
"indicators",
"iwlinks",
"wikitext",
"properties",
"limitreportdata",
"limitreporthtml"
]
},
{
"name": "pst",
"default": "false",
"type": "boolean"
},
{
"name": "onlypst",
"default": "false",
"type": "boolean"
},
{
"name": "effectivelanglinks",
"default": "false",
"type": "boolean"
},
{
"name": "section",
"type": "string"
},
{
"name": "sectiontitle",
"type": "string"
},
{
"name": "disablepp",
"default": "false",
"type": "boolean"
},
{
"name": "disableeditsection",
"default": "false",
"type": "boolean"
},
{
"name": "generatexml",
"default": "false",
"type": "boolean"
},
{
"name": "preview",
"default": "false",
"type": "boolean"
},
{
"name": "sectionpreview",
"default": "false",
"type": "boolean"
},
{
"name": "disabletoc",
"default": "false",
"type": "boolean"
},
{
"name": "contentformat",
"type": [
"text/x-wiki",
"text/javascript",
"application/json",
"text/css",
"text/plain"
]
},
{
"name": "contentmodel",
"type": [
"wikitext",
"javascript",
"json",
"css",
"text",
"SecurePoll",
"MassMessageListContent",
"flow-board",
"Scribunto",
"JsonSchema"
]
},
{
"name": "mobileformat",
"default": "false",
"type": "boolean"
},
{
"name": "noimages",
"default": "false",
"type": "boolean"
},
{
"name": "mainpage",
"default": "false",
"type": "boolean"
}
]
},
{
"name": "info",
"classname": "ApiQueryInfo",
"path": "query+info",
"group": "prop",
"prefix": "in",
"source": "MediaWiki",
"sourcename": "MediaWiki",
"licensetag": "GPL-2.0+",
"licenselink": "//en.wikipedia.org/wiki/Special:Version/License/MediaWiki",
"readrights": "",
"helpurls": [
"https://www.mediawiki.org/wiki/API:Properties#info_.2F_in"
],
"parameters": [
{
"name": "prop",
"multi": "",
"limit": 50,
"lowlimit": 50,
"highlimit": 500,
"type": [
"protection",
"talkid",
"watched",
"watchers",
"notificationtimestamp",
"subjectid",
"url",
"readable",
"preload",
"displaytitle"
]
},
{
"name": "testactions",
"multi": "",
"limit": 50,
"lowlimit": 50,
"highlimit": 500,
"type": "string"
},
{
"name": "token",
"deprecated": "",
"multi": "",
"limit": 50,
"lowlimit": 50,
"highlimit": 500,
"type": [
"edit",
"delete",
"protect",
"move",
"block",
"unblock",
"email",
"import",
"watch"
]
},
{
"name": "continue",
"type": "string"
}
]
}
]
}
}
|
![]() |
The following documentation is the output of Special:ApiHelp/paraminfo, generated from paraminfo's source code. |
action=paraminfo
- Source: MediaWiki
- License: GPL-2.0+
Obtain information about API modules.
- modules
-
List of module names (values of the action and format parameters, or main). Can specify submodules with a +, or all submodules with +*, or all submodules recursively with +**.
- Separate values with | or alternative. Maximum number of values is 50 (500 for bots).
- helpformat
-
Format of help strings.
- One of the following values: html, wikitext, raw, none
- Default: none
- querymodules
- Deprecated.
-
List of query module names (value of prop, meta or list parameter). Use modules=query+foo instead of querymodules=foo.
- Values (separate with | or alternative): abusefilters, abuselog, allcategories, alldeletedrevisions, allfileusages, allimages, alllinks, allmessages, allpages, allredirects, allrevisions, alltransclusions, allusers, authmanagerinfo, babel, backlinks, betafeatures, blocks, categories, categoryinfo, categorymembers, centralnoticelogs, checkuser, checkuserlog, codecomments, codepaths, coderevisions, codetags, contributors, deletedrevisions, deletedrevs, duplicatefiles, embeddedin, extdistbranches, extdistrepos, extlinks, extracts, exturlusage, featureusage, filearchive, filerepoinfo, fileusage, flowinfo, gadgetcategories, gadgets, globalallusers, globalblocks, globalgroups, globalusage, globaluserinfo, imageinfo, images, imageusage, info, iwbacklinks, iwlinks, langbacklinks, langlinks, languagestats, links, linkshere, logevents, mapdata, messagecollection, messagegroups, messagegroupstats, messagetranslations, mmsites, mystashedfiles, notifications, oath, pageimages, pagepropnames, pageprops, pageswithprop, pageterms, prefixsearch, protectedtitles, querypage, random, recentchanges, redirects, references, revisions, search, siteinfo, stashimageinfo, tags, templates, threads, tokens, transcludedin, transcodestatus, unreadnotificationpages, usercontribs, userinfo, users, videoinfo, watchlist, watchlistraw, wbentityusage, wblistentityusage, wikibase, wikisets
- Maximum number of values is 50 (500 for bots).
- mainmodule
- Deprecated.
-
Get information about the main (top-level) module as well. Use modules=main instead.
- pagesetmodule
- Deprecated.
-
Get information about the pageset module (providing titles= and friends) as well.
- formatmodules
- Deprecated.
-
List of format module names (value of format parameter). Use modules instead.
- Values (separate with | or alternative): json, jsonfm, none, php, phpfm, rawfm, xml, xmlfm
- Show info for action=parse, format=jsonfm, action=query&list=allpages, and action=query&meta=siteinfo.
- api.php?action=paraminfo&modules=parse|phpfm|query%2Ballpages|query%2Bsiteinfo [open in sandbox]
- Show info for all submodules of action=query.
- api.php?action=paraminfo&modules=query%2B* [open in sandbox]
Possible errors[edit]
None.