CINXE.COM
MediaWiki API help - MediaWiki
<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>MediaWiki API help - MediaWiki</title> <script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"981961a1-7c79-4b07-a312-2af8ace10b02","wgCanonicalNamespace":"Special","wgCanonicalSpecialPageName":"ApiHelp","wgNamespaceNumber":-1,"wgPageName":"Special:ApiHelp","wgTitle":"ApiHelp","wgCurRevisionId":0,"wgRevisionId":0,"wgArticleId":0,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Special:ApiHelp","wgRelevantArticleId":0,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgNoticeProject":"mediawiki","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true, "wgMediaViewerEnabledByDefault":true,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":0,"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true};RLSTATE={"user.options":"loading","mediawiki.hlist":"ready","mediawiki.apipretty":"ready","mediawiki.skinning.interface":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["mediawiki.page.ready","ext.centralNotice.geoIP","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cmediawiki.apipretty%2Chlist%7Cmediawiki.skinning.interface&only=styles&skin=apioutput"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=apioutput"></script> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,nofollow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:site_name" content="MediaWiki"> <meta property="og:title" content="MediaWiki API help - MediaWiki"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//m.mediawiki.org/wiki/Special:ApiHelp"> <link rel="apple-touch-icon" href="/static/apple-touch/mediawiki.png"> <link rel="icon" href="/static/favicon/mediawiki.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="MediaWiki (en)"> <link rel="EditURI" type="application/rsd+xml" href="//www.mediawiki.org/w/api.php?action=rsd"> <link rel="canonical" href="https://www.mediawiki.org/wiki/Special:ApiHelp"> <link rel="license" href="https://www.mediawiki.org/wiki/Special:MyLanguage/Copyright"> <link rel="alternate" type="application/atom+xml" title="MediaWiki Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns--1 ns-special mw-special-ApiHelp page-Special_ApiHelp rootpage-Special_ApiHelp skin-apioutput action-view"><div class="mw-body" role="main"> <h1 id="firstHeading">MediaWiki API help</h1> <div class="mw-body-content"> <div id="mw-content-text" class="mw-body-content"><p>This is an auto-generated MediaWiki API documentation page. </p><p>Documentation and examples: <a class="external free" href="https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page">https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page</a> </p><h2 class="apihelp-header apihelp-module-name" dir="ltr" lang="en" id="query+pageimages">prop=pageimages (pi)</h2><div class="apihelp-linktrail">(<a href="/wiki/Special:ApiHelp/main" class="apihelp-linktrail" dir="ltr" lang="en">main</a> | <a href="/wiki/Special:ApiHelp/query" class="apihelp-linktrail" dir="ltr" lang="en">query</a> | <b dir="ltr" lang="en">pageimages</b>)</div> <div class="apihelp-block apihelp-flags"><ul><li><span class="apihelp-flag-readrights">This module requires read rights.</span></li><li><span class="apihelp-source">Source: <span dir="ltr" lang="en">PageImages</span></span></li><li><span class="apihelp-license">License: <a href="/wiki/Special:Version/License/PageImages" title="Special:Version/License/PageImages"><span dir="ltr" lang="en">WTFPL</span></a></span></li></ul></div> <p>Returns information about images on the page, such as thumbnail and presence of photos. </p> <div class="apihelp-block apihelp-help-urls"><ul><li><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:PageImages#API" dir="ltr">https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:PageImages#API</a></li></ul></div> <div class="apihelp-block apihelp-parameters"><div class="apihelp-block-head">Specific parameters:</div><div class="apihelp-block-header">Other general parameters are available.</div><dl><dt><span dir="ltr" lang="en" id="query+pageimages:piprop">piprop</span></dt><dd class="description"><p>Which information to return: </p><dl><dt><span dir="ltr" lang="en">thumbnail</span></dt> <dd>URL and dimensions of thumbnail image associated with page, if any.</dd> <dt><span dir="ltr" lang="en">name</span></dt> <dd>Image title.</dd> <dt><span dir="ltr" lang="en">original</span></dt> <dd>URL and original dimensions of image associated with page, if any.</dd></dl></dd><dd class="info">Values (separate with <kbd>|</kbd> or <a href="/w/api.php?action=help&modules=main#main/datatypes">alternative</a>): name, original, thumbnail</dd><dd class="info">Default: thumbnail|name</dd><dt><span dir="ltr" lang="en" id="query+pageimages:pithumbsize">pithumbsize</span></dt><dd class="description"><p>Maximum width in pixels of thumbnail images. </p></dd><dd class="info">Type: integer</dd><dd class="info">Default: 50</dd><dt><span dir="ltr" lang="en" id="query+pageimages:pilimit">pilimit</span></dt><dd class="description"><p>Properties of how many pages to return. </p></dd><dd class="info">Type: integer or <kbd>max</kbd></dd><dd class="info">The value must be between 1 and 50.</dd><dd class="info">Default: 50</dd><dt><span dir="ltr" lang="en" id="query+pageimages:pilicense">pilicense</span></dt><dd class="description"><p>Limit page images to a certain license type: </p><dl><dt><span dir="ltr" lang="en">free</span></dt> <dd>Only free images.</dd> <dt><span dir="ltr" lang="en">any</span></dt> <dd>Best image, whether free or non-free.</dd></dl></dd><dd class="info">One of the following values: any, free</dd><dd class="info">Default: free</dd><dt><span dir="ltr" lang="en" id="query+pageimages:picontinue">picontinue</span></dt><dd class="description"><p>When more results are available, use this to continue. More detailed information on how to continue queries <a href="/wiki/Special:MyLanguage/API:Continue" title="Special:MyLanguage/API:Continue">can be found on mediawiki.org</a>. </p></dd><dd class="info">Type: integer</dd><dt><span dir="ltr" lang="en" id="query+pageimages:pilangcode">pilangcode</span></dt><dd class="description"><p>Code for the language the image is going to be rendered in if multiple languages are supported </p></dd></dl></div> <div class="apihelp-block apihelp-examples"><div class="apihelp-block-head">Example:</div><dl><dt>Get name and <kbd>100</kbd>-pixel thumbnail of an image on the <kbd>Albert Einstein</kbd> page.</dt><dd><a href="/w/api.php?action=query&prop=pageimages&titles=Albert%20Einstein&pithumbsize=100" dir="ltr" rel="nofollow">api.php?action=query&prop=pageimages&titles=Albert%20Einstein&pithumbsize=100</a> <a href="/wiki/Special:ApiSandbox#action=query&prop=pageimages&titles=Albert%20Einstein&pithumbsize=100"><small>[open in sandbox]</small></a></dd></dl></div> <!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://www.mediawiki.org/wiki/Special:ApiHelp">https://www.mediawiki.org/wiki/Special:ApiHelp</a>"</div></div> </div> </div> <script>(RLQ=window.RLQ||[]).push(function(){mw.log.warn("This page is using the deprecated ResourceLoader module \"mediawiki.skinning.interface\".\n[1.43] The use of the `interface-message-box` feature with SkinModule is deprecated in favor of CodexModule. Please remove this feature.More information can be found at [[mw:Manual:ResourceLoaderSkinModule]]. ");mw.config.set({"wgHostname":"mw-api-ext.codfw.main-7556f8b5dd-62snj","wgBackendResponseTime":97});});</script> </body> </html>