MediaWiki API help - Wikimedia Commons
MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples:
Main module
Source:
MediaWiki
License:
GPL-2.0-or-later
Documentation
Etiquette & usage guidelines
FAQ
Mailing list
API Announcements
Bugs & requests
Status:
The MediaWiki API is a mature and stable interface that is actively supported and improved. While we try to avoid it, we may occasionally need to make breaking changes; subscribe to
the mediawiki-api-announce mailing list
for notice of updates.
Erroneous requests:
When erroneous requests are sent to the API, an HTTP header will be sent with the key "MediaWiki-API-Error" and then both the value of the header and the error code sent back will be set to the same value. For more information see
API: Errors and warnings
Testing:
For ease of testing API requests, see
Special:ApiSandbox
Specific parameters:
action
Which action to perform.
abusefiltercheckmatch
Check to see if an AbuseFilter matches a set of variables, an edit, or a logged AbuseFilter event.
abusefilterchecksyntax
Check syntax of an AbuseFilter filter.
abusefilterevalexpression
Evaluates an AbuseFilter expression.
abusefilterunblockautopromote
Unblocks a user from receiving autopromotions due to an abusefilter consequence.
abuselogprivatedetails
View private details of an AbuseLog entry.
acquiretempusername
Acquire a temporary user username and stash it in the current session, if temp account creation is enabled and the current user is logged out. If a name has already been stashed, returns the same name.
aggregategroups
Manage aggregate message groups.
antispoof
Check a username against AntiSpoof's normalisation checks.
block
Block a user.
centralauthtoken
Fetch a centralauthtoken for making an authenticated request to an attached wiki.
centralnoticecdncacheupdatebanner
Request the purge of banner content stored in the CDN (front-end) cache for anonymous users, for the requested banner and language
centralnoticechoicedata
Get data needed to choose a banner for a given project and language
centralnoticequerycampaign
Get all configuration settings for a campaign.
changeauthenticationdata
Change authentication data for the current user.
changecontentmodel
Change the content model of a page
checktoken
Check the validity of a token from
action=query&meta=tokens
clearhasmsg
Clears the
hasmsg
flag for the current user.
clientlogin
Log in to the wiki using the interactive flow.
communityconfigurationedit
Change the content of a configuration provider in Community configuration
compare
Get the difference between two pages.
createaccount
Create a new user account.
createlocalaccount
Forcibly create a local account. The central account must exist.
delete
Delete a page.
deleteglobalaccount
Delete a global user.
discussiontoolsedit
Post a message on a discussion page.
discussiontoolsfindcomment
Find a comment by its ID or name.
discussiontoolsgetsubscriptions
Get the subscription statuses of given topics.
discussiontoolssubscribe
Subscribe (or unsubscribe) to receive notifications about a topic.
discussiontoolsthank
Send a public thank-you notification for a comment.
echocreateevent
Manually trigger a notification to a user
echomarkread
Mark notifications as read for the current user.
echomarkseen
Mark notifications as seen for the current user.
echomute
Mute or unmute notifications from certain users or pages.
edit
Create and edit pages.
editmassmessagelist
Edit a mass message delivery list.
emailuser
Email a user.
expandtemplates
Expands all templates within wikitext.
featuredfeed
Returns a featured content feed.
feedcontributions
Returns a user's contributions feed.
feedrecentchanges
Returns a recent changes feed.
feedwatchlist
Returns a watchlist feed.
filerevert
Revert a file to an old version.
flickrblacklist
Validate a Flickr URL by using the user ID (NSID) for blacklisting.
flow
Allows actions to be taken on Structured Discussions pages.
flow-parsoid-utils
Convert text between wikitext and HTML.
flowthank
Send a public thank-you notification for a Flow comment.
globalblock
Globally block or unblock a user.
globalpreferenceoverrides
Change local overrides for global preferences for the current user.
globalpreferences
Change global preferences of the current user.
globaluserrights
Add/remove a user to/from global groups.
groupreview
Set message group workflow states.
help
Display help for the specified modules.
imagerotate
This module has been disabled.
import
Import a page from another wiki, or from an XML file.
jsonconfig
Allows direct access to JsonConfig subsystem.
languagesearch
Search for language names in any script.
linkaccount
Link an account from a third-party provider to the current user.
Log in and get authentication cookies.
logout
Log out and clear session data.
managetags
Perform management tasks relating to change tags.
markfortranslation
Mark a page for translation
massmessage
Send a message to a list of pages.
mediadetection
Return the likelihood that the stashed image represented by the supplied filekey is a logo
mergehistory
Merge page histories.
move
Move a page.
opensearch
Search the wiki using the OpenSearch protocol.
options
Change preferences of the current user.
paraminfo
Obtain information about API modules.
parse
Parses content and returns parser output.
patrol
Patrol a page or revision.
protect
Change the protection level of a page.
purge
Purge the cache for the given titles.
query
Fetch data from and about MediaWiki.
removeauthenticationdata
Remove authentication data for the current user.
resetpassword
Send a password reset email to a user.
revisiondelete
Delete and undelete revisions.
rollback
Undo the last edit to the page.
rsd
Export an RSD (Really Simple Discovery) schema.
searchtranslations
Search translations.
setglobalaccountstatus
Hide or lock (or unhide or unlock) a global user account.
setnotificationtimestamp
Update the notification timestamp for watched pages.
setpagelanguage
Change the language of a page.
shortenurl
Shorten a long URL into a shorter one.
sitematrix
Get Wikimedia sites list.
spamblacklist
Validate one or more URLs against the spam block list.
streamconfigs
Exposes event stream config. Returns only format=json with formatversion=2.
strikevote
Allows admins to strike or unstrike a vote.
tag
Add or remove change tags from individual revisions or log entries.
templatedata
Fetch data stored by the TemplateData extension.
thank
Send a thank-you notification to an editor.
titleblacklist
Validate a page title, filename, or username against the TitleBlacklist.
torblock
Check if an IP address is blocked as a Tor exit node.
transcodereset
Users with the 'transcode-reset' right can reset and re-run a transcode job.
translationaids
Query all translations aids.
translationreview
Mark translations reviewed.
translationstats
Fetch translation statistics
ttmserver
Query suggestions from translation memories.
unblock
Unblock a user.
undelete
Undelete revisions of a deleted page.
unlinkaccount
Remove a linked third-party account from the current user.
upload
Upload a file, or get the status of pending uploads.
userrights
Change a user's group membership.
validatepassword
Validate a password against the wiki's password policies.
watch
Add or remove pages from the current user's watchlist.
wbavailablebadges
Queries available badge items.
wbcheckconstraintparameters
Checks the constraint parameters of constraint statements.
wbcheckconstraints
Performs constraint checks on any entity you want and returns the result.
wbcreateclaim
Creates Wikibase claims.
wbcreateredirect
Creates Entity redirects.
wbeditentity
Creates a single new Wikibase entity and modifies it with serialised information.
wbformatentities
Formats entity IDs to HTML or plain text.
wbformatvalue
Formats DataValues.
wbgetclaims
Gets Wikibase claims.
wbgetentities
Gets the data for multiple Wikibase entities.
wblinktitles
Associates two pages on two different wikis with a Wikibase item.
wbmergeitems
Merges multiple items.
wbparsevalue
Parses values using a
ValueParser
wbremoveclaims
Removes Wikibase claims.
wbremovequalifiers
Removes a qualifier from a claim.
wbremovereferences
Removes one or more references of the same statement.
wbsearchentities
Searches for entities using labels and aliases.
wbsetaliases
Sets the aliases for a Wikibase entity.
wbsetclaim
Creates or updates an entire Statement or Claim.
wbsetclaimvalue
Sets the value of a Wikibase claim.
wbsetdescription
Sets a description for a single Wikibase entity.
wbsetlabel
Sets a label for a single Wikibase entity.
wbsetqualifier
Creates a qualifier or sets the value of an existing one.
wbsetreference
Creates a reference or sets the value of an existing one.
wbsetsitelink
Associates a page on a wiki with a Wikibase item or removes an already made such association.
webapp-manifest
Returns a webapp manifest.
webauthn
API Module to communicate between server and client during registration/authentication process.
wikilove
Give WikiLove to another user.
bouncehandler
Internal.
Receive a bounce email and process it to handle the failing recipient.
categorytree
Internal.
Internal module for the CategoryTree extension.
chartinfo
Internal.
Retrieve current count of how many unique Chart page usages there are. Multiple uses of the same chart on the same page are considered a single use.
cirrus-check-sanity
Internal.
Reports on the correctness of a range of page ids in the search index
cirrus-config-dump
Internal.
Dump of CirrusSearch configuration.
cirrus-profiles-dump
Internal.
Dump of CirrusSearch profiles for this wiki.
cirrus-schema-dump
Internal.
Dump of CirrusSearch schema (settings and mappings) for this wiki.
codemirror-validate
Internal.
Check for validation errors in the given content
collection
Internal.
API module for performing various operations on a wiki user's collection.
cspreport
Internal.
Used by browsers to report violations of the Content Security Policy. This module should never be used, except when used automatically by a CSP compliant web browser.
discussiontoolscompare
Internal.
Get information about comment changes between two page revisions.
discussiontoolspageinfo
Internal.
Returns metadata required to initialize the discussion tools.
discussiontoolspreview
Internal.
Preview a message on a discussion page.
editcheckreferenceurl
Internal.
Check the status of a URL for use as a reference.
fancycaptchareload
Internal.
Get a new FancyCaptcha.
jsondata
Internal.
Retrieve localized JSON data.
jsontransform
Internal.
Retrieve JSON data transformed by a Lua function.
managegroupsynchronizationcache
Internal.
Manage group synchronization cache.
managemessagegroups
Internal.
Add a message as a rename of an existing message or a new message in the group during imports
messagegroupsubscription
Internal.
Message group subscription related operations
readinglists
Internal.
Reading list write operations.
sanitize-mapdata
Internal.
Performs data validation for Kartographer extension
scribunto-console
Internal.
Internal module for servicing XHR requests from the Scribunto console.
securepollauth
Internal.
Allows a remote wiki to authenticate users before granting access to vote in the election.
stashedit
Internal.
Prepare an edit in shared cache.
timedtext
Internal.
Provides timed text content for usage by
US