Code snippets in Javascript demonstrating how to use various modules of the MediaWiki Action API
- API:Tokens
- tokens.js: get tokens for data modifying operations
- API:Logout
- logout.js: logout
- API:User contributions
- get_usercontribs.js: list user contributions
- API:Watchlist feed
- get_my_watchlist_feed.js: access an RSS feed of your own watchlist
- get_user_watchlist_feed.js: access an RSS feed of another user's watchlist
- API:Rsd
- rsd.js: export an RSD schema
- API:Validatepassword
- validatepassword.js: validate a password against the wiki's password policies
- API:Resetpassword
- reset_password.js: Reset password for all users with an email address.
- API:Feedcontributions
- get_user_contributions_feed.js: Show contributions of a user as an RSS feed.
- API:Userinfo
- userinfo.js: get general user info and user rights
- API:Parse
- parse.js: parse content of a page
- parse_wikitable.js: parse a section of its page and fetch its table data
- API:Pageswithprop
- get_pageswithprop.js: list all pages using a given page property
- API:Categorymembers
- get_category_items.js: list twenty items in a category
- get_recent_category_items.js: get the ten articles most recently added to a category
- get_subcategories.js: get ten subcategories of a category
- API:Images
- get_page_images.js: get page images embedded on a page
- API:Redirects
- redirects.js: return redirects to the given page(s)
- API:Deletedrevs
- get_deleted_revisions.js: list deleted revisions from a user
- API:Deletedrevisions
- get_deleted_revs.js: list deleted revisions for a page
- API:Revisions
- get_pages_revisions.js: get revision data of multiple pages
- get_filtered_page_revisions.js: get revision data of a page filtered by date and user
- API:Alldeletedrevisions
- get_alldeletedrevs.js: get all deleted revision data by a user or in a namespace.
- API:Links
- get_links.js: get links embedded on a page
- get_red_links.js: get the first twenty red links in a page
- API:Info
- get_info.js: get basic information about a page
- API:Allpages
- get_allpages.js: get all pages which fit a certain criteria, within a namespace
- API:Edit
- edit.js: edit a page
- API:Allimages
- get_allimages_by_date.js: list all images in a namespace, starting from a certain timestamp
- get_allimages_by_name.js: list all images in a namespace, starting from a certain filename
- API:Imageinfo
- get_imageinfo.js get information about an image file
- API:Categories
- get_categories.js: get categories associated with a page
- API:Allcategories
- get_allcategories.js: get all categories that fit certain criteria relating to their titles
- API:Allusers
- get_allusers.js: get a list of all registered users, as ordered by username
- get_allcategories.js: get all categories that fit certain criteria relating to their titles
- API:Backlinks
- get_backlinks.js: list pages which link to a certain page
- API:Random
- get_random.js: get a list of random pages
- API:Alllinks
- get_alllinks.js: list links to a namespace
- API:Embeddedin
- get_embedded_pages.js: get all page(s) that embed a page
- API:Mergehistory
- mergehistory.js: Merge the page revisions of Oldpage dating up to 2015-12-31T04:37:41Z into Newpage
- API:Contributors
- get_contributors.js: get request to list all logged-in contributors and count of anonymous contributors to a page
- API:Stashedit
- stashedit.js: Prepare an edit in shared cache
- API:Filearchive
- filearchive.js: Enumerate all deleted files from filearchive table sequentially
- API:Siteinfo
- general_site_info.js: obtain general site info
- API:Expandtemplates
- expand_templates.js: expand the Project:Sandbox template
- API:ClearHasMsg
- clear_has_msg.js: clear the hasmsg flag for the current user
- API:Compare
- compare.js: Compare the current revisions of two different pages
- API:Tag
- tag.js: Remove the spam tag from log entry ID 123 with the reason Wrongly applied
- API:Duplicatefiles
- duplicate_files.js: list duplicates of the given files
- API:Filerepoinfo
- file_repo_info.js: get information about file repositories
- API:Iwbacklinks
- iwbacklinks.js: Get pages that link to a given interwiki link.
- API:Checktoken
- check_token.js: Check a CSRF token
- API:Deletedrevisions
- deleted_revisions.js: Get a list of deleted revisions for Talk:Main Page.
- API:Revisiondelete
- revision_delete.js: Hide all information about a certain revision ID.
- API:Filearchive
- file_archive.js: Get a list of all deleted files.
- API:Fileusage
- get_file_usage.js: Get a list of pages using a given file.
- API:Feedrecentchanges
- get_feed_recent_changes.js: Show recent changes as an RSS feed.
- API:Setnotificationtimestamp
- set_notification_timestamp.js: Reset the notification status for the entire watchlist.
- API:Langbacklinks
- langbacklinks.js: get pages linking to a given language link
- API:Templates
- templates.js: get a list of templates used on a page
- API:Pageprops
- pageprops.js: get various properties defined in the page content
- API:Extlinks
- get_extlinks.js: get a list of external links on a page
- API:Linkshere
- linkshere.js: get a list of pages linking to a given page
- API:Allmessages
- all_messages.js: get the Dutch translations of some messages
- API:Transcludedin
- get_transcluded_in.js: get a list of pages which transclude a given page
- API:Langlinks
- langlinks.js: get a list of language links that a given page has
- API:Stashimageinfo
- stash_image_info.js: return information for a stashed file
- API:Search
- search.js: search for a title or a text
- API:Geosearch
- geosearch.js: search for pages nearby
- geoimagesearch.js: search for pages nearby with images
- geocoordinates.js: obtain coordinates for wiki pages nearby
- API:Opensearch
- opensearch.js: fetch results in an opensearch format
- API:Prefixsearch
- prefixsearch.js: perform a prefix search for page titles
- API:Languagesearch
- languagesearch.js: search for a language
- API:Parameter information
- paraminfo.js: get information about another action API module and its parameters
- API:Main_module
- main_module.js: Get help for the main module.
- API:Help
- get_help.js: Get help for a specified module.