User:Daniel Mietchen/Sandbox/API
Jump to navigation
Jump to search
The account of this former contributor was not re-activated after the server upgrade of March 2022.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>MediaWiki API</title> </head> <body> <pre> <span style="color:blue;"><?xml version="1.0" encoding="utf-8"?></span> <span style="color:blue;"><api></span> <span style="color:blue;"><error code="help" info=""></span> <b>******************************************************************</b> <b>** **</b> <b>** This is an auto-generated MediaWiki API documentation page **</b> <b>** **</b> <b>** Documentation and Examples: **</b> ** <a href="http://www.mediawiki.org/wiki/API">http://www.mediawiki.org/wiki/API</a> ** <b>** **</b> <b>******************************************************************</b> Status: All features shown on this page should be working, but the API is still in active development, and may change at any time. Make sure to monitor our mailing list for any updates. Documentation: <a href="http://www.mediawiki.org/wiki/API">http://www.mediawiki.org/wiki/API</a> Mailing list: <a href="http://lists.wikimedia.org/mailman/listinfo/mediawiki-api">http://lists.wikimedia.org/mailman/listinfo/mediawiki-api</a> Bugs & Requests: <a href="http://bugzilla.wikimedia.org/buglist.cgi?component=API&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=bugs.delta_ts">http://bugzilla.wikimedia.org/buglist.cgi?component=API&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=bugs.delta_ts</a> Parameters: format - The format of the output One value: json, jsonfm, php, phpfm, wddx, wddxfm, xml, xmlfm, yaml, yamlfm, rawfm, txt, txtfm, dbg, dbgfm Default: xmlfm action - What action you would like to perform One value: login, logout, query, expandtemplates, parse, opensearch, feedwatchlist, help, paraminfo, rollback, delete, undelete, protect, block, unblock, move, edit, emailuser Default: help version - When showing help, include version for each module maxlag - Maximum lag smaxage - Set the s-maxage header to this many seconds. Errors are never cached Default: 0 maxage - Set the max-age header to this many seconds. Errors are never cached Default: 0 <b>*** *** *** *** *** *** *** *** *** *** Modules *** *** *** *** *** *** *** *** *** ***</b> <b>* action=login (lg) *</b> This module is used to login and get the authentication tokens. In the event of a successful log-in, a cookie will be attached to your session. In the event of a failed log-in, you will not be able to attempt another log-in through this method for 5 seconds. This is to prevent password guessing by automated password crackers. This module only accepts POST requests. Parameters: lgname - User Name lgpassword - Password lgdomain - Domain (optional) Example: <a href="api.php?action=login&lgname=user&lgpassword=password">api.php?action=login&lgname=user&lgpassword=password</a> <b>* action=logout *</b> This module is used to logout and clear session data Parameters: Example: <a href="api.php?action=logout">api.php?action=logout</a> <b>* action=query *</b> Query API module allows applications to get needed pieces of data from the MediaWiki databases, and is loosely based on the Query API interface currently available on all MediaWiki servers. All data modifications will first have to use query to acquire a token to prevent abuse from malicious sites. Parameters: titles - A list of titles to work on pageids - A list of page IDs to work on revids - A list of revision IDs to work on prop - Which properties to get for the titles/revisions/pageids Values (separate with '|'): info, revisions, links, langlinks, images, imageinfo, templates, categories, extlinks, categoryinfo list - Which lists to get Values (separate with '|'): allimages, allpages, alllinks, allcategories, allusers, backlinks, blocks, categorymembers, deletedrevs, embeddedin, imageusage, logevents, recentchanges, search, usercontribs, watchlist, exturlusage, users, random meta - Which meta data to get about the site Values (separate with '|'): siteinfo, userinfo, allmessages generator - Use the output of a list as the input for other prop/list/meta items One value: links, images, templates, categories, allimages, allpages, alllinks, allcategories, backlinks, categorymembers, embeddedin, imageusage, search, watchlist, exturlusage, random redirects - Automatically resolve redirects indexpageids - Include an additional pageids section listing all returned page IDs. Example: <a href="api.php?action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user|comment">api.php?action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user|comment</a> --- --- --- --- --- --- --- --- Query: Prop --- --- --- --- --- --- --- --- <b>* prop=info (in) *</b> Get basic page information such as namespace, title, last touched date, ... Parameters: inprop - Which additional properties to get: "protection" - List the protection level of each page "talkid" - The page ID of the talk page for each non-talk page "subjectid" - The page ID of the parent page for each talk page Values (separate with '|'): protection, talkid, subjectid intoken - Request a token to perform a data-modifying action on a page Values (separate with '|'): edit, delete, protect, move, block, unblock Examples: <a href="api.php?action=query&prop=info&titles=Main%20Page">api.php?action=query&prop=info&titles=Main%20Page</a> <a href="api.php?action=query&prop=info&inprop=protection&titles=Main%20Page">api.php?action=query&prop=info&inprop=protection&titles=Main%20Page</a> <b>* prop=revisions (rv) *</b> Get revision information. This module may be used in several ways: 1) Get data about a set of pages (last revision), by setting titles or pageids parameter. 2) Get revisions for one given page, by using titles/pageids with start/end/limit params. 3) Get data about a set of revisions by setting their IDs with revids parameter. All parameters marked as (enum) may only be used with a single page (#2). Parameters: rvprop - Which properties to get for each revision. Values (separate with '|'): ids, flags, timestamp, user, size, comment, content Default: ids|timestamp|flags|comment|user rvlimit - limit how many revisions will be returned (enum) No more than 500 (5000 for bots) allowed. rvstartid - from which revision id to start enumeration (enum) rvendid - stop revision enumeration on this revid (enum) rvstart - from which revision timestamp to start enumeration (enum) rvend - enumerate up to this timestamp (enum) rvdir - direction of enumeration - towards "newer" or "older" revisions (enum) One value: newer, older Default: older rvuser - only include revisions made by user rvexcludeuser - exclude revisions made by user rvexpandtemplates - expand templates in revision content rvsection - only retrieve the content of this section rvtoken - Which tokens to obtain for each revision Values (separate with '|'): rollback Examples: Get data with content for the last revision of titles "API" and "Main Page": <a href="api.php?action=query&prop=revisions&titles=API|Main%20Page&rvprop=timestamp|user|comment|content">api.php?action=query&prop=revisions&titles=API|Main%20Page&rvprop=timestamp|user|comment|content</a> Get last 5 revisions of the "Main Page": <a href="api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment">api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment</a> Get first 5 revisions of the "Main Page": <a href="api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer">api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer</a> Get first 5 revisions of the "Main Page" made after 2006-05-01: <a href="api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer&rvstart=20060501000000">api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer&rvstart=20060501000000</a> Get first 5 revisions of the "Main Page" that were not made made by anonymous user "127.0.0.1" <a href="api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvexcludeuser=127.0.0.1">api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvexcludeuser=127.0.0.1</a> Get first 5 revisions of the "Main Page" that were made by the user "MediaWiki default" <a href="api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvuser=MediaWiki%20default">api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvuser=MediaWiki%20default</a> <b>* prop=links (pl) *</b> Returns all links from the given page(s) Parameters: plnamespace - Show links in this namespace(s) only Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 pllimit - How many links to return No more than 500 (5000 for bots) allowed. Default: 10 plcontinue - When more results are available, use this to continue Examples: Get links from the [[Main Page]]: <a href="api.php?action=query&prop=links&titles=Main%20Page">api.php?action=query&prop=links&titles=Main%20Page</a> Get information about the link pages in the [[Main Page]]: <a href="api.php?action=query&generator=links&titles=Main%20Page&prop=info">api.php?action=query&generator=links&titles=Main%20Page&prop=info</a> Get links from the Main Page in the User and Template namespaces: <a href="api.php?action=query&prop=links&titles=Main%20Page&plnamespace=2|10">api.php?action=query&prop=links&titles=Main%20Page&plnamespace=2|10</a> Generator: This module may be used as a generator <b>* prop=langlinks (ll) *</b> Returns all interlanguage links from the given page(s) Parameters: lllimit - How many langlinks to return No more than 500 (5000 for bots) allowed. Default: 10 llcontinue - When more results are available, use this to continue Examples: Get interlanguage links from the [[Main Page]]: <a href="api.php?action=query&prop=langlinks&titles=Main%20Page&redirects">api.php?action=query&prop=langlinks&titles=Main%20Page&redirects</a> <b>* prop=images (im) *</b> Returns all images contained on the given page(s) Parameters: imlimit - How many images to return No more than 500 (5000 for bots) allowed. Default: 10 imcontinue - When more results are available, use this to continue Examples: Get a list of images used in the [[Main Page]]: <a href="api.php?action=query&prop=images&titles=Main%20Page">api.php?action=query&prop=images&titles=Main%20Page</a> Get information about all images used in the [[Main Page]]: <a href="api.php?action=query&generator=images&titles=Main%20Page&prop=info">api.php?action=query&generator=images&titles=Main%20Page&prop=info</a> Generator: This module may be used as a generator <b>* prop=imageinfo (ii) *</b> Returns image information and upload history Parameters: iiprop - What image information to get. Values (separate with '|'): timestamp, user, comment, url, size, sha1, mime, metadata, archivename Default: timestamp|user iilimit - How many image revisions to return No more than 500 (5000 for bots) allowed. Default: 1 iistart - Timestamp to start listing from iiend - Timestamp to stop listing at iiurlwidth - If iiprop=url is set, a URL to an image scaled to this width will be returned. Only the current version of the image can be scaled. Default: -1 iiurlheight - Similar to iiurlwidth. Cannot be used without iiurlwidth Default: -1 Examples: <a href="api.php?action=query&titles=Image:Albert%20Einstein%20Head.jpg&prop=imageinfo">api.php?action=query&titles=Image:Albert%20Einstein%20Head.jpg&prop=imageinfo</a> <a href="api.php?action=query&titles=Image:Test.jpg&prop=imageinfo&iilimit=50&iiend=20071231235959&iiprop=timestamp|user|url">api.php?action=query&titles=Image:Test.jpg&prop=imageinfo&iilimit=50&iiend=20071231235959&iiprop=timestamp|user|url</a> <b>* prop=templates (tl) *</b> Returns all templates from the given page(s) Parameters: tlnamespace - Show templates in this namespace(s) only Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 tllimit - How many templates to return No more than 500 (5000 for bots) allowed. Default: 10 tlcontinue - When more results are available, use this to continue Examples: Get templates from the [[Main Page]]: <a href="api.php?action=query&prop=templates&titles=Main%20Page">api.php?action=query&prop=templates&titles=Main%20Page</a> Get information about the template pages in the [[Main Page]]: <a href="api.php?action=query&generator=templates&titles=Main%20Page&prop=info">api.php?action=query&generator=templates&titles=Main%20Page&prop=info</a> Get templates from the Main Page in the User and Template namespaces: <a href="api.php?action=query&prop=templates&titles=Main%20Page&tlnamespace=2|10">api.php?action=query&prop=templates&titles=Main%20Page&tlnamespace=2|10</a> Generator: This module may be used as a generator <b>* prop=categories (cl) *</b> List all categories the page(s) belong to Parameters: clprop - Which additional properties to get for each category. Values (separate with '|'): sortkey, timestamp cllimit - How many categories to return No more than 500 (5000 for bots) allowed. Default: 10 clcontinue - When more results are available, use this to continue Examples: Get a list of categories [[Albert Einstein]] belongs to: <a href="api.php?action=query&prop=categories&titles=Albert%20Einstein">api.php?action=query&prop=categories&titles=Albert%20Einstein</a> Get information about all categories used in the [[Albert Einstein]]: <a href="api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info">api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info</a> Generator: This module may be used as a generator <b>* prop=extlinks (el) *</b> Returns all external urls (not interwikies) from the given page(s) Parameters: ellimit - How many links to return No more than 500 (5000 for bots) allowed. Default: 10 eloffset - When more results are available, use this to continue Examples: Get a list of external links on the [[Main Page]]: <a href="api.php?action=query&prop=extlinks&titles=Main%20Page">api.php?action=query&prop=extlinks&titles=Main%20Page</a> <b>* prop=categoryinfo (ci) *</b> Returns information about the given categories Example: <a href="api.php?action=query&prop=categoryinfo&titles=Category:Foo|Category:Bar">api.php?action=query&prop=categoryinfo&titles=Category:Foo|Category:Bar</a> --- --- --- --- --- --- --- --- Query: List --- --- --- --- --- --- --- --- <b>* list=allimages (ai) *</b> Enumerate all images sequentially Parameters: aifrom - The image title to start enumerating from. aiprefix - Search for all image titles that begin with this value. aiminsize - Limit to images with at least this many bytes aimaxsize - Limit to images with at most this many bytes ailimit - How many total images to return. No more than 500 (5000 for bots) allowed. Default: 10 aidir - The direction in which to list One value: ascending, descending Default: ascending aisha1 - SHA1 hash of image aisha1base36 - SHA1 hash of image in base 36 (used in MediaWiki) aiprop - Which properties to get Values (separate with '|'): timestamp, user, comment, url, size, dimensions, mime, sha1, metadata Default: timestamp|url Examples: Simple Use Show a list of images starting at the letter "B" <a href="api.php?action=query&list=allimages&aifrom=B">api.php?action=query&list=allimages&aifrom=B</a> Using as Generator Show info about 4 images starting at the letter "T" <a href="api.php?action=query&generator=allimages&gailimit=4&gaifrom=T&prop=imageinfo">api.php?action=query&generator=allimages&gailimit=4&gaifrom=T&prop=imageinfo</a> Generator: This module may be used as a generator <b>* list=allpages (ap) *</b> Enumerate all pages sequentially in a given namespace Parameters: apfrom - The page title to start enumerating from. apprefix - Search for all page titles that begin with this value. apnamespace - The namespace to enumerate. One value: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 Default: 0 apfilterredir - Which pages to list. One value: all, redirects, nonredirects Default: all apminsize - Limit to pages with at least this many bytes apmaxsize - Limit to pages with at most this many bytes apprtype - Limit to protected pages only Values (separate with '|'): edit, move apprlevel - The protection level (must be used with apprtype= parameter) Can be empty, or Values (separate with '|'): autoconfirmed, sysop aplimit - How many total pages to return. No more than 500 (5000 for bots) allowed. Default: 10 apdir - The direction in which to list One value: ascending, descending Default: ascending apfilterlanglinks - Filter based on whether a page has langlinks One value: withlanglinks, withoutlanglinks, all Default: all Examples: Simple Use Show a list of pages starting at the letter "B" <a href="api.php?action=query&list=allpages&apfrom=B">api.php?action=query&list=allpages&apfrom=B</a> Using as Generator Show info about 4 pages starting at the letter "T" <a href="api.php?action=query&generator=allpages&gaplimit=4&gapfrom=T&prop=info">api.php?action=query&generator=allpages&gaplimit=4&gapfrom=T&prop=info</a> Show content of first 2 non-redirect pages begining at "Re" <a href="api.php?action=query&generator=allpages&gaplimit=2&gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content">api.php?action=query&generator=allpages&gaplimit=2&gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content</a> Generator: This module may be used as a generator <b>* list=alllinks (al) *</b> Enumerate all links that point to a given namespace Parameters: alcontinue - When more results are available, use this to continue. alfrom - The page title to start enumerating from. alprefix - Search for all page titles that begin with this value. alunique - Only show unique links. Cannot be used with generator or prop=ids alprop - What pieces of information to include Values (separate with '|'): ids, title Default: title alnamespace - The namespace to enumerate. One value: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 Default: 0 allimit - How many total links to return. No more than 500 (5000 for bots) allowed. Default: 10 Example: <a href="api.php?action=query&list=alllinks&alunique&alfrom=B">api.php?action=query&list=alllinks&alunique&alfrom=B</a> Generator: This module may be used as a generator <b>* list=allcategories (ac) *</b> Enumerate all categories Parameters: acfrom - The category to start enumerating from. acprefix - Search for all category titles that begin with this value. acdir - Direction to sort in. One value: ascending, descending Default: ascending aclimit - How many categories to return. No more than 500 (5000 for bots) allowed. Default: 10 acprop - Which properties to get Values (separate with '|'): size, hidden Default: Examples: <a href="api.php?action=query&list=allcategories&acprop=size">api.php?action=query&list=allcategories&acprop=size</a> <a href="api.php?action=query&generator=allcategories&gacprefix=List&prop=info">api.php?action=query&generator=allcategories&gacprefix=List&prop=info</a> Generator: This module may be used as a generator <b>* list=allusers (au) *</b> Enumerate all registered users Parameters: aufrom - The user name to start enumerating from. auprefix - Search for all page titles that begin with this value. augroup - Limit users to a given group name One value: bot, sysop, bureaucrat, emailconfirmed, wikieditor, Dark Knight, epa, Linnaeus auprop - What pieces of information to include. `groups` property uses more server resources and may return fewer results than the limit. Values (separate with '|'): blockinfo, groups, editcount, registration aulimit - How many total user names to return. No more than 500 (5000 for bots) allowed. Default: 10 Example: <a href="api.php?action=query&list=allusers&aufrom=Y">api.php?action=query&list=allusers&aufrom=Y</a> <b>* list=backlinks (bl) *</b> Find all pages that link to the given page Parameters: bltitle - Title to search. If null, titles= parameter will be used instead, but will be obsolete soon. blcontinue - When more results are available, use this to continue. blnamespace - The namespace to enumerate. Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 blfilterredir - How to filter for redirects One value: all, redirects, nonredirects Default: all bllimit - How many total pages to return. If blredirect is enabled, limit applies to each level separately. No more than 500 (5000 for bots) allowed. Default: 10 blredirect - If linking page is a redirect, find all pages that link to that redirect as well. Maximum limit is halved. Examples: <a href="api.php?action=query&list=backlinks&bltitle=Main%20Page">api.php?action=query&list=backlinks&bltitle=Main%20Page</a> <a href="api.php?action=query&generator=backlinks&gbltitle=Main%20Page&prop=info">api.php?action=query&generator=backlinks&gbltitle=Main%20Page&prop=info</a> Generator: This module may be used as a generator <b>* list=blocks (bk) *</b> List all blocked users and IP addresses. Parameters: bkstart - The timestamp to start enumerating from bkend - The timestamp to stop enumerating at bkdir - The direction in which to enumerate One value: newer, older Default: older bkids - Pipe-separated list of block IDs to list (optional) bkusers - Pipe-separated list of users to search for (optional) bkip - Get all blocks applying to this IP or CIDR range, including range blocks. Cannot be used together with bkusers. CIDR ranges broader than /16 are not accepted. bklimit - The maximum amount of blocks to list No more than 500 (5000 for bots) allowed. Default: 10 bkprop - Which properties to get Values (separate with '|'): id, user, by, timestamp, expiry, reason, range, flags Default: id|user|by|timestamp|expiry|reason|flags Examples: <a href="api.php?action=query&list=blocks">api.php?action=query&list=blocks</a> <a href="api.php?action=query&list=blocks&bkusers=Alice|Bob">api.php?action=query&list=blocks&bkusers=Alice|Bob</a> <b>* list=categorymembers (cm) *</b> List all pages in a given category Parameters: cmtitle - Which category to enumerate (required). Must include Category: prefix cmprop - What pieces of information to include Values (separate with '|'): ids, title, sortkey, timestamp Default: ids|title cmnamespace - Only include pages in these namespaces Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 cmcontinue - For large categories, give the value retured from previous query cmlimit - The maximum number of pages to return. No more than 500 (5000 for bots) allowed. Default: 10 cmsort - Property to sort by One value: sortkey, timestamp Default: sortkey cmdir - In which direction to sort One value: asc, desc Default: asc cmstart - Timestamp to start listing from. Can only be used with cmsort=timestamp cmend - Timestamp to end listing at. Can only be used with cmsort=timestamp Examples: Get first 10 pages in [[Category:Physics]]: <a href="api.php?action=query&list=categorymembers&cmtitle=Category:Physics">api.php?action=query&list=categorymembers&cmtitle=Category:Physics</a> Get page info about first 10 pages in [[Category:Physics]]: <a href="api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info">api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info</a> Generator: This module may be used as a generator <b>* list=deletedrevs (dr) *</b> List deleted revisions. Parameters: drstart - The timestamp to start enumerating from drend - The timestamp to stop enumerating at drdir - The direction in which to enumerate One value: newer, older Default: older drlimit - The maximum amount of revisions to list No more than 500 (5000 for bots) allowed. Default: 10 drprop - Which properties to get Values (separate with '|'): revid, user, comment, minor, len, content, token Default: user|comment Examples: List the first 50 deleted revisions <a href="api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50">api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50</a> List the last deleted revisions of Main Page and Talk:Main Page, with content: <a href="api.php?action=query&list=deletedrevs&titles=Main%20Page|Talk:Main%20Page&drprop=user|comment|content">api.php?action=query&list=deletedrevs&titles=Main%20Page|Talk:Main%20Page&drprop=user|comment|content</a> <b>* list=embeddedin (ei) *</b> Find all pages that embed (transclude) the given title Parameters: eititle - Title to search. If null, titles= parameter will be used instead, but will be obsolete soon. eicontinue - When more results are available, use this to continue. einamespace - The namespace to enumerate. Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 eifilterredir - How to filter for redirects One value: all, redirects, nonredirects Default: all eilimit - How many total pages to return. No more than 500 (5000 for bots) allowed. Default: 10 Examples: <a href="api.php?action=query&list=embeddedin&eititle=Template:Stub">api.php?action=query&list=embeddedin&eititle=Template:Stub</a> <a href="api.php?action=query&generator=embeddedin&geititle=Template:Stub&prop=info">api.php?action=query&generator=embeddedin&geititle=Template:Stub&prop=info</a> Generator: This module may be used as a generator <b>* list=imageusage (iu) *</b> Find all pages that use the given image title. Parameters: iutitle - Title to search. If null, titles= parameter will be used instead, but will be obsolete soon. iucontinue - When more results are available, use this to continue. iunamespace - The namespace to enumerate. Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 iufilterredir - How to filter for redirects One value: all, redirects, nonredirects Default: all iulimit - How many total pages to return. If iuredirect is enabled, limit applies to each level separately. No more than 500 (5000 for bots) allowed. Default: 10 iuredirect - If linking page is a redirect, find all pages that link to that redirect as well. Maximum limit is halved. Examples: <a href="api.php?action=query&list=imageusage&iutitle=Image:Albert%20Einstein%20Head.jpg">api.php?action=query&list=imageusage&iutitle=Image:Albert%20Einstein%20Head.jpg</a> <a href="api.php?action=query&generator=imageusage&giutitle=Image:Albert%20Einstein%20Head.jpg&prop=info">api.php?action=query&generator=imageusage&giutitle=Image:Albert%20Einstein%20Head.jpg&prop=info</a> Generator: This module may be used as a generator <b>* list=logevents (le) *</b> Get events from logs. Parameters: leprop - Which properties to get Values (separate with '|'): ids, title, type, user, timestamp, comment, details Default: ids|title|type|user|timestamp|comment|details letype - Filter log entries to only this type(s) Can be empty, or One value: block, protect, rights, delete, upload, move, import, patrol, merge, suppress, renameuser, newusers lestart - The timestamp to start enumerating from. leend - The timestamp to end enumerating. ledir - In which direction to enumerate. One value: newer, older Default: older leuser - Filter entries to those made by the given user. letitle - Filter entries to those related to a page. lelimit - How many total event entries to return. No more than 500 (5000 for bots) allowed. Default: 10 Example: <a href="api.php?action=query&list=logevents">api.php?action=query&list=logevents</a> <b>* list=recentchanges (rc) *</b> Enumerate recent changes Parameters: rcstart - The timestamp to start enumerating from. rcend - The timestamp to end enumerating. rcdir - In which direction to enumerate. One value: newer, older Default: older rcnamespace - Filter log entries to only this namespace(s) Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 rctitles - Filter log entries to only these page titles rcprop - Include additional pieces of information Values (separate with '|'): user, comment, flags, timestamp, title, ids, sizes, redirect, patrolled Default: title|timestamp|ids rcshow - Show only items that meet this criteria. For example, to see only minor edits done by logged-in users, set show=minor|!anon Values (separate with '|'): minor, !minor, bot, !bot, anon, !anon, redirect, !redirect, patrolled, !patrolled rclimit - How many total changes to return. No more than 500 (5000 for bots) allowed. Default: 10 rctype - Which types of changes to show. Values (separate with '|'): edit, new, log Example: <a href="api.php?action=query&list=recentchanges">api.php?action=query&list=recentchanges</a> <b>* list=search (sr) *</b> Perform a full text search Parameters: srsearch - Search for all page titles (or content) that has this value. srnamespace - The namespace(s) to enumerate. Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 Default: 0 srwhat - Search inside the text or titles. One value: title, text Default: title srredirects - Include redirect pages in the search. sroffset - Use this value to continue paging (return by query) Default: 0 srlimit - How many total pages to return. No more than 500 (5000 for bots) allowed. Default: 10 Examples: <a href="api.php?action=query&list=search&srsearch=meaning">api.php?action=query&list=search&srsearch=meaning</a> <a href="api.php?action=query&list=search&srwhat=text&srsearch=meaning">api.php?action=query&list=search&srwhat=text&srsearch=meaning</a> <a href="api.php?action=query&generator=search&gsrsearch=meaning&prop=info">api.php?action=query&generator=search&gsrsearch=meaning&prop=info</a> Generator: This module may be used as a generator <b>* list=usercontribs (uc) *</b> Get all edits by a user Parameters: uclimit - The maximum number of contributions to return. No more than 500 (5000 for bots) allowed. Default: 10 ucstart - The start timestamp to return from. ucend - The end timestamp to return to. ucuser - The user to retrieve contributions for. ucuserprefix - Retrieve contibutions for all users whose names begin with this value. Overrides ucuser. ucdir - The direction to search (older or newer). One value: newer, older Default: older ucnamespace - Only list contributions in these namespaces Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 ucprop - Include additional pieces of information Values (separate with '|'): ids, title, timestamp, comment, flags Default: ids|title|timestamp|flags|comment ucshow - Show only items that meet this criteria, e.g. non minor edits only: show=!minor Values (separate with '|'): minor, !minor Examples: <a href="api.php?action=query&list=usercontribs&ucuser=YurikBot">api.php?action=query&list=usercontribs&ucuser=YurikBot</a> <a href="api.php?action=query&list=usercontribs&ucuserprefix=217.121.114.">api.php?action=query&list=usercontribs&ucuserprefix=217.121.114.</a> <b>* list=watchlist (wl) *</b> Get all recent changes to pages in the logged in user's watchlist Parameters: wlallrev - Include multiple revisions of the same page within given timeframe. wlstart - The timestamp to start enumerating from. wlend - The timestamp to end enumerating. wlnamespace - Filter changes to only the given namespace(s). Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 wldir - In which direction to enumerate pages. One value: newer, older Default: older wllimit - How many total results to return per request. No more than 500 (5000 for bots) allowed. Default: 10 wlprop - Which additional items to get (non-generator mode only). Values (separate with '|'): ids, title, flags, user, comment, timestamp, patrol, sizes Default: ids|title|flags wlshow - Show only items that meet this criteria. For example, to see only minor edits done by logged-in users, set show=minor|!anon Values (separate with '|'): minor, !minor, bot, !bot, anon, !anon Examples: <a href="api.php?action=query&list=watchlist">api.php?action=query&list=watchlist</a> <a href="api.php?action=query&list=watchlist&wlprop=ids|title|timestamp|user|comment">api.php?action=query&list=watchlist&wlprop=ids|title|timestamp|user|comment</a> <a href="api.php?action=query&list=watchlist&wlallrev&wlprop=ids|title|timestamp|user|comment">api.php?action=query&list=watchlist&wlallrev&wlprop=ids|title|timestamp|user|comment</a> <a href="api.php?action=query&generator=watchlist&prop=info">api.php?action=query&generator=watchlist&prop=info</a> <a href="api.php?action=query&generator=watchlist&gwlallrev&prop=revisions&rvprop=timestamp|user">api.php?action=query&generator=watchlist&gwlallrev&prop=revisions&rvprop=timestamp|user</a> Generator: This module may be used as a generator <b>* list=exturlusage (eu) *</b> Enumerate pages that contain a given URL Parameters: euprop - What pieces of information to include Values (separate with '|'): ids, title, url Default: ids|title|url euoffset - Used for paging. Use the value returned for "continue" euprotocol - Protocol of the url. If empty and euquery set, the protocol is http. Leave both this and euquery empty to list all external links Can be empty, or One value: http, https, ftp, irc, gopher, telnet, nntp, worldwind, mailto, news Default: euquery - Search string without protocol. See [[Special:LinkSearch]]. Leave empty to list all external links eunamespace - The page namespace(s) to enumerate. Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 eulimit - How many pages to return. No more than 500 (5000 for bots) allowed. Default: 10 Example: <a href="api.php?action=query&list=exturlusage&euquery=www.mediawiki.org">api.php?action=query&list=exturlusage&euquery=www.mediawiki.org</a> Generator: This module may be used as a generator <b>* list=users (us) *</b> Get information about a list of users Parameters: usprop - What pieces of information to include blockinfo - tags if the user is blocked, by whom, and for what reason groups - lists all the groups the user belongs to editcount - adds the user's edit count Values (separate with '|'): blockinfo, groups, editcount, registration ususers - A list of users to obtain the same information for Example: <a href="api.php?action=query&list=users&ususers=brion|TimStarling&usprop=groups|editcount">api.php?action=query&list=users&ususers=brion|TimStarling&usprop=groups|editcount</a> <b>* list=random (rn) *</b> Get a set of random pages NOTE: Pages are listed in a fixed sequence, only the starting point is random. This means that if, for example, "Main Page" is the first random page on your list, "List of fictional monkeys" will <b>*always*</b> be second, "List of people on stamps of Vanuatu" third, etc. NOTE: If the number of pages in the namespace is lower than rnlimit, you will get fewer pages. You will not get the same page twice. Parameters: rnnamespace - Return pages in these namespaces only Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 rnlimit - Limit how many random pages will be returned No more than 10 (20 for bots) allowed. Default: 1 Example: <a href="api.php?action=query&list=random&rnnamespace=0&rnlimit=2">api.php?action=query&list=random&rnnamespace=0&rnlimit=2</a> Generator: This module may be used as a generator --- --- --- --- --- --- --- --- Query: Meta --- --- --- --- --- --- --- --- <b>* meta=siteinfo (si) *</b> Return general information about the site. Parameters: siprop - Which sysinfo properties to get: "general" - Overall system information "namespaces" - List of registered namespaces (localized) "namespacealiases" - List of registered namespace aliases "specialpagealiases" - List of special page aliases "statistics" - Returns site statistics "interwikimap" - Returns interwiki map (optionally filtered) "dbrepllag" - Returns database server with the highest replication lag "usergroups" - Returns user groups and the associated permissions Values (separate with '|'): general, namespaces, namespacealiases, specialpagealiases, interwikimap, dbrepllag, statistics, usergroups Default: general sifilteriw - Return only local or only nonlocal entries of the interwiki map One value: local, !local sishowalldb - List all database servers, not just the one lagging the most Examples: <a href="api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics">api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics</a> <a href="api.php?action=query&meta=siteinfo&siprop=interwikimap&sifilteriw=local">api.php?action=query&meta=siteinfo&siprop=interwikimap&sifilteriw=local</a> <a href="api.php?action=query&meta=siteinfo&siprop=dbrepllag&sishowalldb">api.php?action=query&meta=siteinfo&siprop=dbrepllag&sishowalldb</a> <b>* meta=userinfo (ui) *</b> Get information about the current user Parameters: uiprop - What pieces of information to include blockinfo - tags if the current user is blocked, by whom, and for what reason hasmsg - adds a tag "message" if the current user has pending messages groups - lists all the groups the current user belongs to rights - lists of all rights the current user has options - lists all preferences the current user has set editcount - adds the current user's edit count ratelimits - lists all rate limits applying to the current user Values (separate with '|'): blockinfo, hasmsg, groups, rights, options, editcount, ratelimits Examples: <a href="api.php?action=query&meta=userinfo">api.php?action=query&meta=userinfo</a> <a href="api.php?action=query&meta=userinfo&uiprop=blockinfo|groups|rights|hasmsg">api.php?action=query&meta=userinfo&uiprop=blockinfo|groups|rights|hasmsg</a> <b>* meta=allmessages (am) *</b> Return messages from this site. Parameters: ammessages - Which messages to output. "*" means all messages Default: * amfilter - Return only messages that contain this string amlang - Return messages in this language Examples: <a href="api.php?action=query&meta=allmessages&amfilter=ipb-">api.php?action=query&meta=allmessages&amfilter=ipb-</a> <a href="api.php?action=query&meta=allmessages&ammessages=august|mainpage&amlang=de">api.php?action=query&meta=allmessages&ammessages=august|mainpage&amlang=de</a> <b>*** *** *** *** *** *** *** *** *** *** Modules: continuation *** *** *** *** *** *** *** *** *** ***</b> <b>* action=expandtemplates *</b> This module expand all templates in wikitext Parameters: title - Title of page Default: API text - Wikitext to convert generatexml - Generate XML parse tree Example: <a href="api.php?action=expandtemplates&text={{Project:Sandbox}}">api.php?action=expandtemplates&text={{Project:Sandbox}}</a> <b>* action=parse *</b> This module parses wikitext and returns parser output Parameters: title - Title of page the text belongs to Default: API text - Wikitext to parse page - Parse the content of this page. Cannot be used together with text and title oldid - Parse the content of this revision. Overrides page prop - Which pieces of information to get. NOTE: Section tree is only generated if there are more than 4 sections, or if the __TOC__ keyword is present Values (separate with '|'): text, langlinks, categories, links, templates, images, externallinks, sections, revid Default: text|langlinks|categories|links|templates|images|externallinks|sections|revid Example: <a href="api.php?action=parse&text={{Project:Sandbox}}">api.php?action=parse&text={{Project:Sandbox}}</a> <b>* action=opensearch *</b> This module implements OpenSearch protocol Parameters: search - Search string limit - Maximum amount of results to return No more than 100 (100 for bots) allowed. Default: 10 namespace - Namespaces to search Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105 Default: 0 Example: <a href="api.php?action=opensearch&search=Te">api.php?action=opensearch&search=Te</a> <b>* action=feedwatchlist *</b> This module returns a watchlist feed Parameters: feedformat - The format of the feed One value: rss, atom Default: rss hours - List pages modified within this many hours from now The value must be between 1 and 72 Default: 24 allrev - Include multiple revisions of the same page within given timeframe. Example: <a href="api.php?action=feedwatchlist">api.php?action=feedwatchlist</a> <b>* action=help *</b> Display this help screen. <b>* action=paraminfo *</b> Obtain information about certain API parameters Parameters: modules - List of module names (value of the action= parameter) querymodules - List of query module names (value of prop=, meta= or list= parameter) Example: <a href="api.php?action=paraminfo&modules=parse&querymodules=allpages|siteinfo">api.php?action=paraminfo&modules=parse&querymodules=allpages|siteinfo</a> <b>* action=rollback *</b> Undoes the last edit to the page. If the last user who edited the page made multiple edits in a row, they will all be rolled back. You need to be logged in as a sysop to use this function, see also action=login. This module only accepts POST requests. Parameters: title - Title of the page you want to rollback. user - Name of the user whose edits are to be rolled back. If set incorrectly, you'll get a badtoken error. token - A rollback token previously retrieved through prop=info summary - Custom edit summary. If not set, default summary will be used. markbot - Mark the reverted edits and the revert as bot edits Examples: <a href="api.php?action=rollback&title=Main%20Page&user=Catrope&token=123ABC">api.php?action=rollback&title=Main%20Page&user=Catrope&token=123ABC</a> <a href="api.php?action=rollback&title=Main%20Page&user=217.121.114.116&token=123ABC&summary=Reverting%20vandalism&markbot=1">api.php?action=rollback&title=Main%20Page&user=217.121.114.116&token=123ABC&summary=Reverting%20vandalism&markbot=1</a> <b>* action=delete *</b> Deletes a page. You need to be logged in as a sysop to use this function, see also action=login. This module only accepts POST requests. Parameters: title - Title of the page you want to delete. token - A delete token previously retrieved through prop=info reason - Reason for the deletion. If not set, an automatically generated reason will be used. watch - Add the page to your watchlist unwatch - Remove the page from your watchlist oldimage - The name of the old image to delete as provided by iiprop=archivename Examples: <a href="api.php?action=delete&title=Main%20Page&token=123ABC">api.php?action=delete&title=Main%20Page&token=123ABC</a> <a href="api.php?action=delete&title=Main%20Page&token=123ABC&reason=Preparing%20for%20move">api.php?action=delete&title=Main%20Page&token=123ABC&reason=Preparing%20for%20move</a> <b>* action=undelete *</b> Restore certain revisions of a deleted page. A list of deleted revisions (including timestamps) can be retrieved through list=deletedrevs This module only accepts POST requests. Parameters: title - Title of the page you want to restore. token - An undelete token previously retrieved through list=deletedrevs reason - Reason for restoring (optional) Default: timestamps - Timestamps of the revisions to restore. If not set, all revisions will be restored. Examples: <a href="api.php?action=undelete&title=Main%20Page&token=123ABC&reason=Restoring%20main%20page">api.php?action=undelete&title=Main%20Page&token=123ABC&reason=Restoring%20main%20page</a> <a href="api.php?action=undelete&title=Main%20Page&token=123ABC×tamps=20070703220045|20070702194856">api.php?action=undelete&title=Main%20Page&token=123ABC×tamps=20070703220045|20070702194856</a> <b>* action=protect *</b> Change the protection level of a page. This module only accepts POST requests. Parameters: title - Title of the page you want to restore. token - A protect token previously retrieved through prop=info protections - Pipe-separated list of protection levels, formatted action=group (e.g. edit=sysop) expiry - Expiry timestamp. If set to 'infinite', 'indefinite' or 'never', the protection will never expire. Default: infinite reason - Reason for (un)protecting (optional) Default: cascade - Enable cascading protection (i.e. protect pages included in this page) Examples: <a href="api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=sysop|move=sysop&cascade&expiry=20070901163000">api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=sysop|move=sysop&cascade&expiry=20070901163000</a> <a href="api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions">api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions</a> <b>* action=block *</b> Block a user. This module only accepts POST requests. Parameters: user - Username, IP address or IP range you want to block token - A block token previously obtained through the gettoken parameter gettoken - If set, a block token will be returned, and no other action will be taken expiry - Relative expiry time, e.g. '5 months' or '2 weeks'. If set to 'infinite', 'indefinite' or 'never', the block will never expire. Default: never reason - Reason for block (optional) anononly - Block anonymous users only (i.e. disable anonymous edits for this IP) nocreate - Prevent account creation autoblock - Automatically block the last used IP address, and any subsequent IP addresses they try to login from noemail - Prevent user from sending e-mail through the wiki. (Requires the "blockemail" right.) hidename - Hide the username from the block log. (Requires the "hideuser" right.) Examples: <a href="api.php?action=block&user=123.5.5.12&expiry=3%20days&reason=First%20strike">api.php?action=block&user=123.5.5.12&expiry=3%20days&reason=First%20strike</a> <a href="api.php?action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate&autoblock&noemail">api.php?action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate&autoblock&noemail</a> <b>* action=unblock *</b> Unblock a user. This module only accepts POST requests. Parameters: id - ID of the block you want to unblock (obtained through list=blocks). Cannot be used together with user user - Username, IP address or IP range you want to unblock. Cannot be used together with id token - An unblock token previously obtained through the gettoken parameter gettoken - If set, an unblock token will be returned, and no other action will be taken reason - Reason for unblock (optional) Examples: <a href="api.php?action=unblock&id=105">api.php?action=unblock&id=105</a> <a href="api.php?action=unblock&user=Bob&reason=Sorry%20Bob">api.php?action=unblock&user=Bob&reason=Sorry%20Bob</a> <b>* action=move *</b> Moves a page. This module only accepts POST requests. Parameters: from - Title of the page you want to move. to - Title you want to rename the page to. token - A move token previously retrieved through prop=info reason - Reason for the move (optional). movetalk - Move the talk page, if it exists. noredirect - Don't create a redirect watch - Add the page and the redirect to your watchlist unwatch - Remove the page and the redirect from your watchlist Example: <a href="api.php?action=move&from=Exampel&to=Example&token=123ABC&reason=Misspelled%20title&movetalk&noredirect">api.php?action=move&from=Exampel&to=Example&token=123ABC&reason=Misspelled%20title&movetalk&noredirect</a> <b>* action=edit *</b> Create and edit pages. This module only accepts POST requests. Parameters: title - Page title section - Section number. 0 for the top section, 'new' for a new section text - Page content token - Edit token. You can get one of these through prop=info summary - Edit summary. Also section title when section=new minor - Minor edit notminor - Non-minor edit bot - Mark this edit as bot basetimestamp - Timestamp of the base revision (gotten through prop=revisions&rvprop=timestamp). Used to detect edit conflicts; leave unset to ignore conflicts. recreate - Override any errors about the article having been deleted in the meantime createonly - Don't edit the page if it exists already nocreate - Throw an error if the page doesn't exist captchaword - Answer to the CAPTCHA captchaid - CAPTCHA ID from previous request watch - Add the page to your watchlist unwatch - Remove the page from your watchlist md5 - The MD5 hash of the text parameter, or the prependtext and appendtext parameters concatenated. If set, the edit won't be done unless the hash is correct prependtext - Add this text to the beginning of the page. Overrides text. Don't use together with section: that won't do what you expect. appendtext - Add this text to the end of the page. Overrides text Examples: Edit a page (anonymous user): <a href="api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\">api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\</a> <b>* action=emailuser *</b> Emails a user. This module only accepts POST requests. Parameters: target - User to send email to subject - Subject header text - Mail body token - A token previously acquired via prop=info ccme - Send a copy of this mail to me Example: <a href="api.php?action=emailuser&target=WikiSysop&text=Content">api.php?action=emailuser&target=WikiSysop&text=Content</a> <b>*** *** *** *** *** *** *** *** *** *** Formats *** *** *** *** *** *** *** *** *** ***</b> <b>* format=json *</b> Output data in JSON format Parameters: callback - If specified, wraps the output into a given function call. For safety, all user-specific data will be restricted. Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=json">api.php?action=query&meta=siteinfo&siprop=namespaces&format=json</a> <b>* format=jsonfm *</b> Output data in JSON format (pretty-print in HTML) Parameters: callback - If specified, wraps the output into a given function call. For safety, all user-specific data will be restricted. Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=jsonfm">api.php?action=query&meta=siteinfo&siprop=namespaces&format=jsonfm</a> <b>* format=php *</b> Output data in serialized PHP format Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=php">api.php?action=query&meta=siteinfo&siprop=namespaces&format=php</a> <b>* format=phpfm *</b> Output data in serialized PHP format (pretty-print in HTML) Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=phpfm">api.php?action=query&meta=siteinfo&siprop=namespaces&format=phpfm</a> <b>* format=wddx *</b> Output data in WDDX format Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=wddx">api.php?action=query&meta=siteinfo&siprop=namespaces&format=wddx</a> <b>* format=wddxfm *</b> Output data in WDDX format (pretty-print in HTML) Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=wddxfm">api.php?action=query&meta=siteinfo&siprop=namespaces&format=wddxfm</a> <b>* format=xml *</b> Output data in XML format Parameters: xmldoublequote - If specified, double quotes all attributes and content. Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=xml">api.php?action=query&meta=siteinfo&siprop=namespaces&format=xml</a> <b>* format=xmlfm *</b> Output data in XML format (pretty-print in HTML) Parameters: xmldoublequote - If specified, double quotes all attributes and content. Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=xmlfm">api.php?action=query&meta=siteinfo&siprop=namespaces&format=xmlfm</a> <b>* format=yaml *</b> Output data in YAML format Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=yaml">api.php?action=query&meta=siteinfo&siprop=namespaces&format=yaml</a> <b>* format=yamlfm *</b> Output data in YAML format (pretty-print in HTML) Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=yamlfm">api.php?action=query&meta=siteinfo&siprop=namespaces&format=yamlfm</a> <b>* format=rawfm *</b> Output data with the debuging elements in JSON format (pretty-print in HTML) Parameters: callback - If specified, wraps the output into a given function call. For safety, all user-specific data will be restricted. Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=rawfm">api.php?action=query&meta=siteinfo&siprop=namespaces&format=rawfm</a> <b>* format=txt *</b> Output data in PHP's print_r() format Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=txt">api.php?action=query&meta=siteinfo&siprop=namespaces&format=txt</a> <b>* format=txtfm *</b> Output data in PHP's print_r() format (pretty-print in HTML) Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=txtfm">api.php?action=query&meta=siteinfo&siprop=namespaces&format=txtfm</a> <b>* format=dbg *</b> Output data in PHP's var_export() format Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=dbg">api.php?action=query&meta=siteinfo&siprop=namespaces&format=dbg</a> <b>* format=dbgfm *</b> Output data in PHP's var_export() format (pretty-print in HTML) Example: <a href="api.php?action=query&meta=siteinfo&siprop=namespaces&format=dbgfm">api.php?action=query&meta=siteinfo&siprop=namespaces&format=dbgfm</a> <b>*** Credits: ***</b> API developers: Roan Kattouw <Firstname>.<Lastname>@home.nl (lead developer Sep 2007-present) Victor Vasiliev - vasilvv at gee mail dot com Yuri Astrakhan <Firstname><Lastname>@gmail.com (creator, lead developer Sep 2006-Sep 2007) Please send your comments, suggestions and questions to mediawiki-api@lists.wikimedia.org or file a bug report at <a href="http://bugzilla.wikimedia.org/">http://bugzilla.wikimedia.org/</a> <span style="color:blue;"></error></span> <span style="color:blue;"></api></span>
</body> </html>