CINXE.COM
InternetArchiveBot/API - Meta
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>InternetArchiveBot/API - Meta</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )metawikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"63cc5152-9ece-46d2-9807-468f269d4740","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"InternetArchiveBot/API","wgTitle":"InternetArchiveBot/API","wgCurRevisionId":27563063,"wgRevisionId":27563063,"wgArticleId":10344928,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Indexed pages"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"InternetArchiveBot/API","wgRelevantArticleId":10344928,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"meta","wgCiteReferencePreviewsActive":false,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgVisualEditor":{"pageLanguageCode":"en", "pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":30000,"wgEditSubmitButtonLabelPublish":true,"wgDiscussionToolsFeaturesEnabled":{"replytool":true,"newtopictool":true,"sourcemodetoolbar":true,"topicsubscription":false,"autotopicsub":false,"visualenhancements":true,"visualenhancements_reply":true,"visualenhancements_pageframe":true},"wgDiscussionToolsFallbackEditMode":"source","wgULSPosition":"personal","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading", "ext.discussionTools.init.styles":"ready","oojs-ui-core.styles":"ready","oojs-ui.styles.indicators":"ready","mediawiki.widgets.styles":"ready","oojs-ui-core.icons":"ready","oojs-ui.styles.icons-interactions":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.pt":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.AddTopic","ext.gadget.formWizard","ext.gadget.ReferenceTooltips","ext.gadget.WishlistTranslation","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.discussionTools.init","ext.eventLogging","ext.wikimediaEvents", "ext.navigationTiming","ext.uls.interface","ext.checkUser.clientHints"];</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.discussionTools.init.styles%7Cext.uls.pt%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cmediawiki.widgets.styles%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui.styles.icons-interactions%2Cindicators%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="InternetArchiveBot/API - Meta"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//meta.m.wikimedia.org/wiki/InternetArchiveBot/API"> <link rel="alternate" type="application/x-wiki" title="Edit" href="/w/index.php?title=InternetArchiveBot/API&action=edit"> <link rel="icon" href="/static/favicon/community.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Meta (en)"> <link rel="EditURI" type="application/rsd+xml" href="//meta.wikimedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://meta.wikimedia.org/wiki/InternetArchiveBot/API"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"> <link rel="alternate" type="application/atom+xml" title="Meta Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="ext-discussiontools-replytool-enabled ext-discussiontools-newtopictool-enabled ext-discussiontools-sourcemodetoolbar-enabled ext-discussiontools-visualenhancements-enabled ext-discussiontools-visualenhancements_reply-enabled ext-discussiontools-visualenhancements_pageframe-enabled skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-InternetArchiveBot_API rootpage-InternetArchiveBot skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-wikimedia-news-label" class="mw-list-item"><a href="/wiki/Wikimedia_News"><span>Wikimedia News</span></a></li><li id="n-translations-text" class="mw-list-item"><a href="/wiki/Special:LanguageStats"><span>Translations</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Load a random page [x]" accesskey="x"><span>Random page</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Help:Help" title="The place to find out"><span>Help</span></a></li><li id="n-Babel-text" class="mw-list-item"><a href="/wiki/Meta:Babel"><span>Babel</span></a></li> </ul> </div> </div> <div id="p-community" class="vector-menu mw-portlet mw-portlet-community" > <div class="vector-menu-heading"> Community </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-WikimediaResourceCenter-text" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Wikimedia_Resource_Center"><span>Wikimedia Resource Center</span></a></li><li id="n-WikimediaForum-text" class="mw-list-item"><a href="/wiki/Wikimedia_Forum"><span>Wikimedia Forum</span></a></li><li id="n-mailinglists-text" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Mailing_lists/Overview"><span>Mailing lists</span></a></li><li id="n-Requests-text" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Meta:Requests_and_proposals"><span>Requests</span></a></li><li id="n-Babylon-text" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Meta:Babylon"><span>Babylon</span></a></li><li id="n-Reports-text" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Wikimedia_Affiliates_Data_Portal"><span>Reports</span></a></li><li id="n-Research-text" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Research:Index"><span>Research</span></a></li><li id="n-planet" class="mw-list-item"><a href="//en.planet.wikimedia.org/" title="Weblog aggregator of Wikimedia-related posts"><span>Planet Wikimedia</span></a></li> </ul> </div> </div> <div id="p-beyond_the_web" class="vector-menu mw-portlet mw-portlet-beyond_the_web" > <div class="vector-menu-heading"> Beyond the Web </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-Meetup-text" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Meetup"><span>Meet Wikimedians</span></a></li><li id="n-Events-text" class="mw-list-item"><a href="/wiki/Events"><span>Events</span></a></li><li id="n-wikimedia-movement-affiliates-shortlabel" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Wikimedia_movement_affiliates"><span>Movement affiliates</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Special:MyLanguage/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/metawiki.svg" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikimedia Meta-Wiki" src="/static/images/mobile/copyright/metawiki-wordmark.svg" style="width: 7.5em; height: 1.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Meta [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Meta" aria-label="Search Meta" autocapitalize="sentences" title="Search Meta [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-uls" class="mw-list-item active user-links-collapsible-item"><a data-mw="interface" href="#" class="uls-trigger cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>English</span></a> </li> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_meta.wikimedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=InternetArchiveBot%2FAPI" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=InternetArchiveBot%2FAPI" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out user-links-collapsible-item" title="More options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_meta.wikimedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=InternetArchiveBot%2FAPI" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=InternetArchiveBot%2FAPI" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Beginning</div> </a> </li> <li id="toc-Authorizing_the_tool/bot/gadget_to_use_the_API" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Authorizing_the_tool/bot/gadget_to_use_the_API"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Authorizing the tool/bot/gadget to use the API</span> </div> </a> <button aria-controls="toc-Authorizing_the_tool/bot/gadget_to_use_the_API-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Authorizing the tool/bot/gadget to use the API subsection</span> </button> <ul id="toc-Authorizing_the_tool/bot/gadget_to_use_the_API-sublist" class="vector-toc-list"> <li id="toc-Differences_between_authorization_methods" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Differences_between_authorization_methods"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.1</span> <span>Differences between authorization methods</span> </div> </a> <ul id="toc-Differences_between_authorization_methods-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Authorizing_a_JS_gadget_or_another_tool_using_OAuth" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Authorizing_a_JS_gadget_or_another_tool_using_OAuth"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.2</span> <span>Authorizing a JS gadget or another tool using OAuth</span> </div> </a> <ul id="toc-Authorizing_a_JS_gadget_or_another_tool_using_OAuth-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Authorizing_a_bot_with_an_owner-only_consumer" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Authorizing_a_bot_with_an_owner-only_consumer"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.3</span> <span>Authorizing a bot with an owner-only consumer</span> </div> </a> <ul id="toc-Authorizing_a_bot_with_an_owner-only_consumer-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Helper_scripts_to_make_OAuth_easier" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Helper_scripts_to_make_OAuth_easier"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.4</span> <span>Helper scripts to make OAuth easier</span> </div> </a> <ul id="toc-Helper_scripts_to_make_OAuth_easier-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-API_functions_and_usage_and_limitations" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#API_functions_and_usage_and_limitations"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>API functions and usage and limitations</span> </div> </a> <button aria-controls="toc-API_functions_and_usage_and_limitations-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle API functions and usage and limitations subsection</span> </button> <ul id="toc-API_functions_and_usage_and_limitations-sublist" class="vector-toc-list"> <li id="toc-GET_or_POST?" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#GET_or_POST?"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>GET or POST?</span> </div> </a> <ul id="toc-GET_or_POST?-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Global_parameters" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Global_parameters"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Global parameters</span> </div> </a> <ul id="toc-Global_parameters-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Global_return_values" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Global_return_values"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Global return values</span> </div> </a> <ul id="toc-Global_return_values-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Global_return_values_on_error" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Global_return_values_on_error"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Global return values on error</span> </div> </a> <ul id="toc-Global_return_values_on_error-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Action_functions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Action_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Action functions</span> </div> </a> <ul id="toc-Action_functions-sublist" class="vector-toc-list"> <li id="toc-action=runpages" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=runpages"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.1</span> <span>action=runpages</span> </div> </a> <ul id="toc-action=runpages-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=getfalsepositives" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=getfalsepositives"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.2</span> <span>action=getfalsepositives</span> </div> </a> <ul id="toc-action=getfalsepositives-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=getbotqueue" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=getbotqueue"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.3</span> <span>action=getbotqueue</span> </div> </a> <ul id="toc-action=getbotqueue-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=reportfp" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=reportfp"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.4</span> <span>action=reportfp</span> </div> </a> <ul id="toc-action=reportfp-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=searchurldata" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=searchurldata"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.5</span> <span>action=searchurldata</span> </div> </a> <ul id="toc-action=searchurldata-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=searchpagefromurl" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=searchpagefromurl"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.6</span> <span>action=searchpagefromurl</span> </div> </a> <ul id="toc-action=searchpagefromurl-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=searchurlfrompage" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=searchurlfrompage"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.7</span> <span>action=searchurlfrompage</span> </div> </a> <ul id="toc-action=searchurlfrompage-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=modifyurl" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=modifyurl"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.8</span> <span>action=modifyurl</span> </div> </a> <ul id="toc-action=modifyurl-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=analyzepage" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=analyzepage"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.9</span> <span>action=analyzepage</span> </div> </a> <ul id="toc-action=analyzepage-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=submitbotjob" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=submitbotjob"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.10</span> <span>action=submitbotjob</span> </div> </a> <ul id="toc-action=submitbotjob-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=getbotjob" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=getbotjob"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.11</span> <span>action=getbotjob</span> </div> </a> <ul id="toc-action=getbotjob-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=statistics" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=statistics"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.12</span> <span>action=statistics</span> </div> </a> <ul id="toc-action=statistics-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-action=logout" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#action=logout"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5.13</span> <span>action=logout</span> </div> </a> <ul id="toc-action=logout-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">InternetArchiveBot/API</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="This article exist only in this language. Add the article for other languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-0" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">Add languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-add wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:NewItem?site=metawiki&page=InternetArchiveBot%2FAPI" title="Add interlanguage links" class="wbc-editpage">Add links</a></span></div> </div> </div> </div> <a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=new" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive" id="ca-addsection" data-event-name="addsection-header"><span class="vector-icon mw-ui-icon-speechBubbleAdd-progressive mw-ui-icon-wikimedia-speechBubbleAdd-progressive"></span> <span>Add topic</span> </a> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/InternetArchiveBot/API" title="View the content page [c]" accesskey="c"><span>Content page</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:InternetArchiveBot/API" rel="discussion" title="Discussion about the content page [t]" accesskey="t"><span>Discussion</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/InternetArchiveBot/API"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=InternetArchiveBot/API&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=InternetArchiveBot/API&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/InternetArchiveBot/API"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=InternetArchiveBot/API&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-addsection" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=new"><span>Add topic</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=InternetArchiveBot/API&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/InternetArchiveBot/API" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/InternetArchiveBot/API" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=InternetArchiveBot/API&oldid=27563063" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=InternetArchiveBot/API&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=InternetArchiveBot%2FAPI&id=27563063&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fmeta.wikimedia.org%2Fwiki%2FInternetArchiveBot%2FAPI"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fmeta.wikimedia.org%2Fwiki%2FInternetArchiveBot%2FAPI"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Special:Book&bookcmd=book_creator&referer=InternetArchiveBot%2FAPI"><span>Create a book</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=InternetArchiveBot%2FAPI&action=show-download-screen"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=InternetArchiveBot/API&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects emptyPortlet" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Meta, a Wikimedia project coordination wiki</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><div class="subpages">< <bdi dir="ltr"><a href="/wiki/InternetArchiveBot" title="InternetArchiveBot">InternetArchiveBot</a></bdi></div></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="plainlinks"> <style data-mw-deduplicate="TemplateStyles:r25171411">.mw-parser-output .navigation-header{margin:1em 0;box-sizing:border-box;clear:both;background:#fff}.mw-parser-output .navigation-header-tabs .plainlist li{margin:0;padding:0;border:none!important}.mw-parser-output .navigation-header-tabs ul{display:flex;flex-direction:column;flex-wrap:wrap;text-align:center;margin-bottom:1.5em;margin-left:0}.mw-parser-output .navigation-header-tabs #leadtab a{color:#fff}.mw-parser-output .navigation-header-tabs #emergencytab{border-top:0.5em solid red}.mw-parser-output .navigation-header-tabs #emergencytab a{color:red}.mw-parser-output .navigation-header-tabs li{flex:1 1 0;width:100%;margin:0;box-sizing:border-box;background-color:inherit;padding:1em;font-weight:bold;text-transform:uppercase}.mw-parser-output .navigation-header-tabs li.selected{background-color:#f8f9fa;border-left:0.5em solid #07015a}.mw-parser-output .navigation-header-tabs li a{color:#36c}.mw-parser-output .navigation-header-tabs .mw-selflink{color:#000}.mw-parser-output .navigation-header-tabs .navigation-header-content{font-size:1em;background-color:#07015a;border-bottom:2px solid #07015a;padding:1em}.mw-parser-output .navigation-header-tabs .navigation-header-icon{display:inline-block;margin:0 0.5em 0 0;vertical-align:text-bottom}.mw-parser-output .navigation-header-tabs .navigation-header-break{clear:both}.mw-parser-output .navigation-header-tabs #leadtab{display:inline-block;color:#fff;background:#07015a}@media(min-width:550px){.mw-parser-output .navigation-header-tabs ul{flex-direction:row;padding:0;margin-top:0!important}.mw-parser-output .navigation-header-tabs ul>li{display:inline-block;vertical-align:bottom;white-space:nowrap;width:auto;margin:.5em .5em 0 0;border-top:0.5em solid #07015a;font-size:1em}.mw-parser-output .navigation-header-tabs li.selected{border-left:0}}.mw-parser-output .navigation-header.blue-theme .navigation-header-tabs li{border-top:0.5em solid #07015a}.mw-parser-output .navigation-header.blue-theme .navigation-header-tabs li.selected{border-left:0.5em solid #07015a}.mw-parser-output .navigation-header.blue-theme .navigation-header-tabs .navigation-header-content{background-color:#07015a;border-bottom:2px solid #07015a}.mw-parser-output .navigation-header.blue-theme .navigation-header-tabs #leadtab{background:#07015a}.mw-parser-output .navigation-header.gray-theme .navigation-header-tabs li{border-top:0.5em solid #666}.mw-parser-output .navigation-header.gray-theme .navigation-header-tabs li.selected{border-left:0.5em solid #666}.mw-parser-output .navigation-header.gray-theme .navigation-header-tabs .navigation-header-content{background-color:#666;border-bottom:2px solid #666}.mw-parser-output .navigation-header.gray-theme .navigation-header-tabs #leadtab{background:#666}@media(min-width:1000px){.mw-parser-output .navigation-header-tabs ul>li{flex:0 1 0}}</style> <div class="navigation-header gray-theme"><div role="navigation" class="navigation-header-tabs"> <ul> <li id="leadtab"><div class="navigation-header-icon"><span class="mw-default-size" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/3/38/Font_Awesome_5_solid_robot_white.svg/23px-Font_Awesome_5_solid_robot_white.svg.png" decoding="async" width="23" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/38/Font_Awesome_5_solid_robot_white.svg/34px-Font_Awesome_5_solid_robot_white.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/38/Font_Awesome_5_solid_robot_white.svg/45px-Font_Awesome_5_solid_robot_white.svg.png 2x" data-file-width="512" data-file-height="410"/></span></span></div> <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/InternetArchiveBot" class="extiw" title="m:Special:MyLanguage/InternetArchiveBot">InternetArchiveBot</a></li> <li><div class="navigation-header-icon"><span class="mw-default-size" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/3/38/Font_Awesome_5_solid_bell.svg/16px-Font_Awesome_5_solid_bell.svg.png" decoding="async" width="16" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/38/Font_Awesome_5_solid_bell.svg/24px-Font_Awesome_5_solid_bell.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/38/Font_Awesome_5_solid_bell.svg/31px-Font_Awesome_5_solid_bell.svg.png 2x" data-file-width="512" data-file-height="585"/></span></span></div> <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/InternetArchiveBot/Problem" class="extiw" title="m:Special:MyLanguage/InternetArchiveBot/Problem">Report Problem</a></li> <li><div class="navigation-header-icon"><span class="mw-default-size" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Font_Awesome_5_solid_comment-dots.svg/18px-Font_Awesome_5_solid_comment-dots.svg.png" decoding="async" width="18" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Font_Awesome_5_solid_comment-dots.svg/27px-Font_Awesome_5_solid_comment-dots.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Font_Awesome_5_solid_comment-dots.svg/36px-Font_Awesome_5_solid_comment-dots.svg.png 2x" data-file-width="512" data-file-height="512"/></span></span></div> <a href="https://meta.wikimedia.org/wiki/User_talk:InternetArchiveBot" class="extiw" title="m:User talk:InternetArchiveBot">Contact Us</a></li> <li><div class="navigation-header-icon"><span class="mw-default-size" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/1/10/Font_Awesome_5_solid_book-open.svg/20px-Font_Awesome_5_solid_book-open.svg.png" decoding="async" width="20" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/10/Font_Awesome_5_solid_book-open.svg/30px-Font_Awesome_5_solid_book-open.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/1/10/Font_Awesome_5_solid_book-open.svg/41px-Font_Awesome_5_solid_book-open.svg.png 2x" data-file-width="512" data-file-height="455"/></span></span></div> <a href="https://meta.wikimedia.org/wiki/InternetArchiveBot/Documentation" class="extiw" title="m:InternetArchiveBot/Documentation">Documentation</a></li> <li><div class="navigation-header-icon"><span class="mw-default-size" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Font_Awesome_5_solid_cog.svg/18px-Font_Awesome_5_solid_cog.svg.png" decoding="async" width="18" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Font_Awesome_5_solid_cog.svg/27px-Font_Awesome_5_solid_cog.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Font_Awesome_5_solid_cog.svg/36px-Font_Awesome_5_solid_cog.svg.png 2x" data-file-width="512" data-file-height="512"/></span></span></div> <a rel="nofollow" class="external text" href="https://iabot.wmcloud.org/index.php?page=wikiconfig">Configure</a></li> <li><div class="navigation-header-icon"><span class="mw-default-size" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Font_Awesome_5_solid_language.svg/23px-Font_Awesome_5_solid_language.svg.png" decoding="async" width="23" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Font_Awesome_5_solid_language.svg/34px-Font_Awesome_5_solid_language.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Font_Awesome_5_solid_language.svg/45px-Font_Awesome_5_solid_language.svg.png 2x" data-file-width="512" data-file-height="410"/></span></span></div> <a rel="nofollow" class="external text" href="https://translatewiki.net/w/i.php?title=Special:Translate&group=internetarchivebot&language=en&action=translate&filter=%21translated">Translate</a></li> <li id="emergencytab"><div class="navigation-header-icon"><span class="mw-default-size" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Font_Awesome_5_solid_power-off_red.svg/18px-Font_Awesome_5_solid_power-off_red.svg.png" decoding="async" width="18" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Font_Awesome_5_solid_power-off_red.svg/27px-Font_Awesome_5_solid_power-off_red.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Font_Awesome_5_solid_power-off_red.svg/36px-Font_Awesome_5_solid_power-off_red.svg.png 2x" data-file-width="512" data-file-height="512"/></span></span></div> <a rel="nofollow" class="external text" href="https://iabot.wmcloud.org/index.php?page=runpages">Disable Bot</a></li> </ul> </div></div> </div> <p><br/> </p><p>The IABot Management Interface comes with a simple, fast, and easy to use API. This allows tools and gadgets to integrate with the tool and contribute to improving IABot's core as well as rely on the vast resources IABot has. Other Wikipedia bots can access the API as well and approved bots on Wikipedia are automatically given bot rights on the API. To access the API, go to <a rel="nofollow" class="external free" href="https://iabot.wmcloud.org/api.php">https://iabot.wmcloud.org/api.php</a>. </p> <meta property="mw:PageProp/toc"/> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Authorizing_the_tool/bot/gadget_to_use_the_API" data-mw-thread-id="h-Authorizing_the_tool/bot/gadget_to_use_the_API"><span id="Authorizing_the_tool.2Fbot.2Fgadget_to_use_the_API"></span><span data-mw-comment-start="" id="h-Authorizing_the_tool/bot/gadget_to_use_the_API"></span>Authorizing the tool/bot/gadget to use the API<span data-mw-comment-end="h-Authorizing_the_tool/bot/gadget_to_use_the_API"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=1" title="Edit section: Authorizing the tool/bot/gadget to use the API"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Unlike the primary interface, the API allows limited access to information without the need for authorization, however, to use the API fully, an OAuth authorization header must be passed to the API in every request. For bot's accessing the API, since conventional OAuth will not work, since it requires user input, the API uses a header relay system and relays your header to MW to obtain your bot's account details. The API will then pass back the payload, provided the header supplied was valid. Gadgets and onwiki JS scripts, can use the conventional authentication method which will direct the user to approve the tool's access to the user's account. </p> <div class="mw-heading mw-heading3"><h3 id="Differences_between_authorization_methods" data-mw-thread-id="h-Differences_between_authorization_methods-Authorizing_the_tool/bot/gadget_to_use_the_API"><span data-mw-comment-start="" id="h-Differences_between_authorization_methods-Authorizing_the_tool/bot/gadget_to_use_the_API"></span>Differences between authorization methods<span data-mw-comment-end="h-Differences_between_authorization_methods-Authorizing_the_tool/bot/gadget_to_use_the_API"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=2" title="Edit section: Differences between authorization methods"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The conventional method of authorization typically involves users clicking the login button on the tool interface directing them to an authorization window to authorize the access to the tool, which afterwards they are directed back to the original location. This allows the tool to fully access the user's account, within the grants allowed, and make edits on behalf of the user. </p><p>The method for API access for a bot account needs to be done in a manner where popup dialogs don't need to be answered since they are JS based. As such the API will accept the bot's OAuth header, and will pass that to the MW software to obtain the identification of the bot. The header is generated by the bot, and the payload from the response is passed back to the bot. The API will not always use the header and as such will not always pass back a payload. Bot's are encouraged to validate the payload at least once every run and whenever a payload is passed back to the bot. To force a payload response, the "returnpayload" parameter can be set, either POST or GET. This will however slow down the response of the request as it tries to retrieve a payload. This method of authorization only allows the tool to identify what account just connected to the API, and cannot make edits on behalf of the bot. As such some API features will be disabled. </p> <div class="mw-heading mw-heading3"><h3 id="Authorizing_a_JS_gadget_or_another_tool_using_OAuth" data-mw-thread-id="h-Authorizing_a_JS_gadget_or_another_tool_using_OAuth-Authorizing_the_tool/bot/gadget_to_use_the_API"><span data-mw-comment-start="" id="h-Authorizing_a_JS_gadget_or_another_tool_using_OAuth-Authorizing_the_tool/bot/gadget_to_use_the_API"></span>Authorizing a JS gadget or another tool using OAuth<span data-mw-comment-end="h-Authorizing_a_JS_gadget_or_another_tool_using_OAuth-Authorizing_the_tool/bot/gadget_to_use_the_API"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=3" title="Edit section: Authorizing a JS gadget or another tool using OAuth"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>If the tools using the API are on wiki JS gadgets, or other OAuth supported tools, users can simply call the URL <a rel="nofollow" class="external free" href="https://iabot.wmcloud.org/oauthcallback.php?action=login&returnto={returnurl}">https://iabot.wmcloud.org/oauthcallback.php?action=login&returnto={returnurl}</a>, where {returnurl} is the URL of the location to direct the user back to on successful login, to authorize the user for the API. </p><p>To log the users back out, call the URL <a rel="nofollow" class="external free" href="https://iabot.wmcloud.org/oauthcallback.php?action=logout&returnto={returnurl}">https://iabot.wmcloud.org/oauthcallback.php?action=logout&returnto={returnurl}</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Authorizing_a_bot_with_an_owner-only_consumer" data-mw-thread-id="h-Authorizing_a_bot_with_an_owner-only_consumer-Authorizing_the_tool/bot/gadget_to_use_the_API"><span data-mw-comment-start="" id="h-Authorizing_a_bot_with_an_owner-only_consumer-Authorizing_the_tool/bot/gadget_to_use_the_API"></span>Authorizing a bot with an <a href="https://www.mediawiki.org/wiki/OAuth/Owner-only_consumers" class="extiw" title="mw:OAuth/Owner-only consumers">owner-only consumer</a><span data-mw-comment-end="h-Authorizing_a_bot_with_an_owner-only_consumer-Authorizing_the_tool/bot/gadget_to_use_the_API"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=4" title="Edit section: Authorizing a bot with an owner-only consumer"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This method is more complicated, and limits some API functions that require direct access to the account. Because the method being used to authenticate is relaying the OAuth header to MW, it is important to note the destination URL being encoded into the OAuth signature is not the tool API URL, but MW's OAuth /identify URL. Not encoding the correct URL into the signature will result in an invalid signature response. In addition to that, the correct identify URL to the correct wiki needs to be used. Since this is a multi-wiki interface, the tool needs to know which wiki you are working on. The default wiki is enwiki. To change the wiki, you can set the <code>wiki</code> parameter to the appropriate wiki. You can set it in the same request as the authorization. For example if you want the Swedish Wikipedia, your request needs to have <code>wiki=svwiki</code> in either the POST or GET fields. When signing the header, the URL being encoded must match the format <a rel="nofollow" class="external free" href="https://{domain}/w/index.php?title=Special:OAuth/identify">https://{domain}/w/index.php?title=Special:OAuth/identify</a>, where {domain} is the wiki being worked on. </p><p>If you are planning to run on the English Wikipedia, you would pass <code>wiki=enwiki</code> in the GET or POST fields, and encode the URL <a class="external free" href="https://en.wikipedia.org/w/index.php?title=Special:OAuth/identify">https://en.wikipedia.org/w/index.php?title=Special:OAuth/identify</a> into your OAuth signature. You would then pass it to the tool API to authenticate you. </p><p>If you are not familiar with OAuth may use the provided 2 scripts that can be called from the shell mentioned in the section below. </p><p>If the OAuth header passed to the tool is valid, it will be able to identify the bot connecting to the application, and it will pass back an encrypted payload. It is important to note that the header is only used to identify the bot. To prevent unexpected session failures, it is recommended to always pass a header and validate the payload whenever one is returned. It is also recommended to validate the payload at least once every run. To force a payload in the response, you can set the <code>returnpayload</code> parameter. This however slows down the request as the API now tries to perform the identify request. More details about the parameters are explained below. </p> <div class="mw-heading mw-heading3"><h3 id="Helper_scripts_to_make_OAuth_easier" data-mw-thread-id="h-Helper_scripts_to_make_OAuth_easier-Authorizing_the_tool/bot/gadget_to_use_the_API"><span data-mw-comment-start="" id="h-Helper_scripts_to_make_OAuth_easier-Authorizing_the_tool/bot/gadget_to_use_the_API"></span>Helper scripts to make OAuth easier<span data-mw-comment-end="h-Helper_scripts_to_make_OAuth_easier-Authorizing_the_tool/bot/gadget_to_use_the_API"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=5" title="Edit section: Helper scripts to make OAuth easier"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>OAuth can be difficult to implement for some users. There are 2 scripts meant to be executed externally that can do the hard work for you. </p><p>The first is the MWOAuthGenerateHeader: </p> <ol><li>Download: MWOAuthGenerateHeader.php</li> <li>Execute the script in the command line interface or via some form of exec function as follows <dl><dd><code>php MWOAuthGenerateHeader.php <consumerkey> <consumersecret> <accesstoken> <accesssecret> <identifyurl></code></dd> <dd>Replace the bracketed placeholders with the appropriate values</dd></dl></li> <li>On success, the output of the script will be a properly formatted OAuth header to be passed to the tool via the headers. If something went wrong, it will output "FAIL" instead.</li></ol> <p>The second is the MWOAuthDecodePayload: </p> <ol><li>Download: <a rel="nofollow" class="external text" href="https://github.com/cyberpower678/Cyberbot_II/blob/test/IABot/MWOAuthDecodePayload.php">MWOAuthDecodePayload.php</a></li> <li>When the tool passes back the payload, execute this script as follows <dl><dd><code>php MWOAuthDecodePayload.php <consumersecret> <payload></code></dd> <dd>Replace the bracketed placeholders with the appropriate values</dd></dl></li> <li>On success, the output of the script will be a JSON object with your account details. If any part of the payload fails to pass validation, it will output an error message instead. If you know the script was properly executed, it could suggest some form of interception or attack took place during the request, and execution should be aborted.</li></ol> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="API_functions_and_usage_and_limitations" data-mw-thread-id="h-API_functions_and_usage_and_limitations"><span data-mw-comment-start="" id="h-API_functions_and_usage_and_limitations"></span>API functions and usage and limitations<span data-mw-comment-end="h-API_functions_and_usage_and_limitations"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=6" title="Edit section: API functions and usage and limitations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="GET_or_POST?" data-mw-thread-id="h-GET_or_POST?-API_functions_and_usage_and_limitations"><span id="GET_or_POST.3F"></span><span data-mw-comment-start="" id="h-GET_or_POST?-API_functions_and_usage_and_limitations"></span>GET or POST?<span data-mw-comment-end="h-GET_or_POST?-API_functions_and_usage_and_limitations"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=7" title="Edit section: GET or POST?"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The API accepts either, and can be interchanged. POST parameters with the same parameter as a GET will take priority. It is recommended to POST all requests. </p> <div class="mw-heading mw-heading3"><h3 id="Global_parameters" data-mw-thread-id="h-Global_parameters-API_functions_and_usage_and_limitations"><span data-mw-comment-start="" id="h-Global_parameters-API_functions_and_usage_and_limitations"></span>Global parameters<span data-mw-comment-end="h-Global_parameters-API_functions_and_usage_and_limitations"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=8" title="Edit section: Global parameters"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The API allows some information to be obtained without the need for authorization, such as obtaining URL information and pages they're found on, but the remaining functions require authorization. </p><p>There are global parameters when passed affect all requests and how the API operations. </p> <table class="wikitable"> <tbody><tr> <th>Parameter name</th> <th>Possible values</th> <th>Description </th></tr> <tr> <td><b>action</b></td> <td>See the section below</td> <td>This is the primary parameter to direct the API. This tells the API what action to carry out. </td></tr> <tr> <td><b>returnpayload</b></td> <td><i>anything</i></td> <td>Forces the API to pass the header to the wiki's OAuth and try to get a payload. If successful, a payload will be returned with the request. A failure will result in an error getting returned with the response. The bot will not be logged out on a request failure however. </td></tr> <tr> <td><b>token</b></td> <td>The token echoed from the previous response</td> <td>This is a required parameter for all write requests making some form of a change. This is the CSRF token. Missing this will return a 400 error. </td></tr> <tr> <td><b>checksum</b></td> <td>The checksum token echoed from the previous response</td> <td>This is a required parameter for all write requests making some form of change. This is the checksum token which is used to validate the request as valid. A bad token will result in a 409 error and a missing token will result in a 400 error. </td></tr> <tr> <td><b>wiki</b></td> <td>'enwiki', 'svwiki', or any other support wiki</td> <td>This directs the tool which wiki to switch to. Bots should generally use their home wiki. Changing this also means changing the identify URL mentioned in the above section for owner-only consumers. </td></tr> <tr> <td><b>offset</b></td> <td><i>string</i></td> <td>This is a parameter used for requests requiring pagination. When omitted, only the first 1000 entries are returned in the result. When moving between pages, pass the value defined in the <b>continue</b> value, when defined, to move through the result set, by passing the same request and this parameter. </td></tr></tbody></table> <div class="mw-heading mw-heading3"><h3 id="Global_return_values" data-mw-thread-id="h-Global_return_values-API_functions_and_usage_and_limitations"><span data-mw-comment-start="" id="h-Global_return_values-API_functions_and_usage_and_limitations"></span>Global return values<span data-mw-comment-end="h-Global_return_values-API_functions_and_usage_and_limitations"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=9" title="Edit section: Global return values"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>All API responses are in JSON. </p><p>In every response there are values that get returned when completing a request. </p> <table class="wikitable"> <tbody><tr> <th>Value name</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>loggedon</b></td> <td><i>boolean</i></td> <td>Indicates whether or not the client is logged onto the API. </td></tr> <tr> <td><b>username</b></td> <td><i>string</i></td> <td>Only defined if the client is logged in. Contains the identified user connected to the API. </td></tr> <tr> <td><b>csrf</b></td> <td><i>string</i></td> <td>Only defined if the client is logged in. Contains the CSRF token required for all write requests. </td></tr> <tr> <td><b>checksum</b></td> <td><i>string</i></td> <td>Only defined if the client is logged in. Contains the checksum token required to execute a write request. </td></tr> <tr> <td><b>servetime</b></td> <td><i>float</i></td> <td>The length of time in seconds the webserver took to service the request. </td></tr> <tr> <td><b>result</b></td> <td><i>string</i></td> <td>Defined when a write request is being made. Successful requests have the value "success". Other requests have a value of "fail". </td></tr> <tr> <td><b>continue</b></td> <td><i>string</i></td> <td>Defined when a request uses pagination and has more results. This is the value for the next set of entries which can be up to 1000 per set. Pass to the <b>offset</b> parameter to go to the next set of entries when repeating the request. </td></tr></tbody></table> <div class="mw-heading mw-heading3"><h3 id="Global_return_values_on_error" data-mw-thread-id="h-Global_return_values_on_error-API_functions_and_usage_and_limitations"><span data-mw-comment-start="" id="h-Global_return_values_on_error-API_functions_and_usage_and_limitations"></span>Global return values on error<span data-mw-comment-end="h-Global_return_values_on_error-API_functions_and_usage_and_limitations"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=10" title="Edit section: Global return values on error"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <table class="wikitable"> <tbody><tr> <th>Value name</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>noaccess</b></td> <td><i>string</i></td> <td>Returned when the API is inaccessible. Possible codes are, "disabledinterface", "maintenance", and "Missing authorization". Respectively, they mean the tool has been disabled by a developer, the tool developers are performing maintenance, and that client is not logged in to the API to execute the desired function. </td></tr> <tr> <td><b>notavailable</b></td> <td><i>string</i></td> <td>Usually is passed back when a function of the API being accessed is not executable with an owner-only consumer. </td></tr> <tr> <td><b>errormessage</b></td> <td><i>string</i></td> <td>Defined whenever an error occurs during a request. It's usually accompanied with an error code for bot's to identify. This contains an English description of the error. </td></tr> <tr> <td><b>noaction</b></td> <td><i>string</i></td> <td>Default response for the API if no action is being performed. </td></tr> <tr> <td><b>validationerror</b></td> <td><i>string</i></td> <td>Defined when <b>returnpayload</b> is set in the request. Possible values are "noheader" and "invalidheader". </td></tr> <tr> <td><b>usedheader</b></td> <td><i>string</i></td> <td>Returned with <b>validationerror</b> and <b>autherror</b>. Contains the header the API attempted to use. </td></tr> <tr> <td><b>autherror</b></td> <td><i>string</i></td> <td>Defined when initial login to the API failed. </td></tr> <tr> <td><b>requesterror</b></td> <td><i>string</i></td> <td>Defined when a request couldn't be executed due to an issue with the request. Possible values are "invalidchecksum", "missingchecksum", "blocked", "dberror", "404", "invalidtoken", and "missingtoken" </td></tr> <tr> <td><b>ratelimit</b></td> <td><i>string</i></td> <td>Default response for the API if the number of allowed requests were exceeded during the last minute. Limits are 5 requests/minute for anonymous users, 500 requests/minute for logged in users, and 5000 requests/minute for authorized bots. </td></tr> <tr> <td><b>missingpermission</b></td> <td><i>string</i></td> <td>Default response for the API if the requested action requires a permission that the client lacks. Contains the permission required. </td></tr> <tr> <td><b>accessibletogroups</b></td> <td><i>array</i></td> <td>Defined with <b>missingpermission</b> listing the usergroups that have access to the requested function. </td></tr> <tr> <td><b>missingvalue</b></td> <td><i>string</i></td> <td>Defined when a required value for a request is missing, or has bad data. </td></tr></tbody></table> <div class="mw-heading mw-heading3"><h3 id="Action_functions" data-mw-thread-id="h-Action_functions-API_functions_and_usage_and_limitations"><span data-mw-comment-start="" id="h-Action_functions-API_functions_and_usage_and_limitations"></span>Action functions<span data-mw-comment-end="h-Action_functions-API_functions_and_usage_and_limitations"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=11" title="Edit section: Action functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="action=runpages" data-mw-thread-id="h-action=runpages-Action_functions"><span id="action.3Drunpages"></span><span data-mw-comment-start="" id="h-action=runpages-Action_functions"></span>action=runpages<span data-mw-comment-end="h-action=runpages-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=12" title="Edit section: action=runpages"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to fetch the run statuses of the bot on the wikis it is configured to run on and who last toggled the run state of a given wiki. </p><p>This action has no parameters. </p><p>This action has no unique responses for successful requests. </p><p>This action has no errors specific to this action. </p><p>This action can be called without authorization. </p> <div class="mw-heading mw-heading4"><h4 id="action=getfalsepositives" data-mw-thread-id="h-action=getfalsepositives-Action_functions"><span id="action.3Dgetfalsepositives"></span><span data-mw-comment-start="" id="h-action=getfalsepositives-Action_functions"></span>action=getfalsepositives<span data-mw-comment-end="h-action=getfalsepositives-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=13" title="Edit section: action=getfalsepositives"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to fetch reported false positives, from either bots or tool users. This action requires the "viewfpreviewpage" permission, and logically is not available to anonymous clients. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>displayopen</b></td> <td>Default option</td> <td><i>Anything</i></td> <td>Setting this parameter will return all false positives that have been reported but not acted on. </td></tr> <tr> <td><b>displayfixed</b></td> <td>No</td> <td><i>Anything</i></td> <td>Setting this parameter will return all false positives that were reported and fixed. </td></tr> <tr> <td><b>displaydeclined</b></td> <td>No</td> <td><i>Anything</i></td> <td>Setting this parameter will return all false positives that were reported and declined as an invalid report. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>openreports</b></td> <td><i>int</i></td> <td>The number of active unacted reports. </td></tr> <tr> <td><b>fpreports</b></td> <td><i>array</i></td> <td>All of the reports in the request. </td></tr></tbody></table> <p>This function does not return action specific errors. </p> <div class="mw-heading mw-heading4"><h4 id="action=getbotqueue" data-mw-thread-id="h-action=getbotqueue-Action_functions"><span id="action.3Dgetbotqueue"></span><span data-mw-comment-start="" id="h-action=getbotqueue-Action_functions"></span>action=getbotqueue<span data-mw-comment-end="h-action=getbotqueue-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=14" title="Edit section: action=getbotqueue"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to fetch bot jobs in the bot queue submitted from either bots or tool users. This action requires the "viewbotqueue" permission, and logically is not available to anonymous clients. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>displayqueued</b></td> <td>No</td> <td><i>Anything</i></td> <td>Setting this parameter will return all bot jobs still pending completion. </td></tr> <tr> <td><b>displayrunning</b></td> <td>Default option</td> <td><i>Anything</i></td> <td>Setting this parameter will return all bot jobs actively being worked on. </td></tr> <tr> <td><b>displayfinished</b></td> <td>No</td> <td><i>Anything</i></td> <td>Setting this parameter will return all bot jobs that have been successfully finished. </td></tr> <tr> <td><b>displaykilled</b></td> <td>No</td> <td><i>Anything</i></td> <td>Setting this parameter will return all bot jobs that have been killed by the requesting users or tool maintainers. </td></tr> <tr> <td><b>displaysuspended</b></td> <td>No</td> <td><i>Anything</i></td> <td>Setting this parameter will return all bot jobs that have been suspended by the tool maintainers. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>queued</b></td> <td><i>int</i></td> <td>The number of bot jobs still pending. </td></tr> <tr> <td><b>running</b></td> <td><i>int</i></td> <td>The number of bot jobs in operation. </td></tr> <tr> <td><b>botqueue</b></td> <td><i>array</i></td> <td>Details of all of the bot queue jobs requested. </td></tr></tbody></table> <p>This function does not return action specific errors. </p> <div class="mw-heading mw-heading4"><h4 id="action=reportfp" data-mw-thread-id="h-action=reportfp-Action_functions"><span id="action.3Dreportfp"></span><span data-mw-comment-start="" id="h-action=reportfp-Action_functions"></span>action=reportfp<span data-mw-comment-end="h-action=reportfp-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=15" title="Edit section: action=reportfp"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to report false positives, to the interface and tool maintainers. This action requires the "reportfp" permission, and logically is not available to anonymous clients. This action requires the CSRF and Checksum tokens to work. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>fplist</b></td> <td>Yes</td> <td>Newline separated <i>string</i></td> <td>This parameter is a list of URLs separated by a newline, to be reported as false positives. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>toreport</b></td> <td><i>array</i></td> <td>The URLs that were reported to the maintainers. </td></tr> <tr> <td><b>toreset</b></td> <td><i>array</i></td> <td>The URLs that were automatically corrected during reporting. </td></tr> <tr> <td><b>notdead</b></td> <td><i>array</i></td> <td>The URLs already found to be alive and are being ignored. </td></tr> <tr> <td><b>notfound</b></td> <td><i>array</i></td> <td>The URLs IABot hasn't encountered and are being ignored. </td></tr> <tr> <td><b>alreadyreported</b></td> <td><i>array</i></td> <td>The URLs that already reported and will not be reported again. </td></tr></tbody></table> <p>This action has the following possible errors: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>reportfperror</b></td> <td><i>string</i></td> <td>Defined when an error specific to the action has occured. </td></tr></tbody></table> <div class="mw-heading mw-heading4"><h4 id="action=searchurldata" data-mw-thread-id="h-action=searchurldata-Action_functions"><span id="action.3Dsearchurldata"></span><span data-mw-comment-start="" id="h-action=searchurldata-Action_functions"></span>action=searchurldata<span data-mw-comment-end="h-action=searchurldata-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=16" title="Edit section: action=searchurldata"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to fetch URL data for any encountered URL on Wikipedia. This action is available to anonymous clients. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>urls</b></td> <td>No</td> <td>Newline separated <i>string</i></td> <td>This parameter is required if <b>urlids</b> or any of the search filters are not set. A list of URLs, separated by newlines, to lookup and provide details about. </td></tr> <tr> <td><b>urlids</b></td> <td>No</td> <td>Newline separated <i>int</i></td> <td>This parameter is required if <b>urls</b> or any of the search filters are not set. A list of URL IDs, separated by newlines, to lookup and provide details about. </td></tr> <tr> <td><b>hasarchive</b></td> <td>No</td> <td>0 or 1</td> <td>This parameter is required if <b>urls</b> and <b>urlids</b> or any of the other search filters are not set. Set to 0 to retrieve all URLs with no archive associated with it. Set to 1 to retrieve all URLs with an archive associated with it. </td></tr> <tr> <td><b>livestate</b></td> <td>No</td> <td>Pipe separated <i>string</i></td> <td>This parameter is required if <b>urls</b> and <b>urlids</b> or any of the other search filters are not set. Filters records to the given states of the URLs. Available options are: <ul><li><b>dead</b> - Retrieve all URLs that are considered dead.</li> <li><b>dying</b> - Retrieve all unstable URLs that are likely dead, but not yet considered dead.</li> <li><b>alive</b> - Retrieve all URLs considered alive.</li> <li><b>unknown</b> - Retrieve all URLs where their states are unknown.</li> <li><b>paywall</b> - Retrieve all URLs that are considered closed access and therefore undeterminable.</li> <li><b>whitelisted</b> - Retrieve all URLs that are whitelisted and considered alive. Not populated with <b>alive</b>.</li> <li><b>blacklisted</b> - Retrieve all URLs that are blacklisted and considered dead. Not populated with <b>dead</b>.</li></ul> </td></tr> <tr> <td><b>isarchived</b></td> <td>No</td> <td><i>string</i></td> <td>This parameter is required if <b>urls</b> and <b>urlids</b> or any of the other search filters are not set. Filters records based on if they have a known available archive in the Wayback Machine. Returns true or false in the <i>archived</i> field for each URL. For URLs where it's uncertain an archive exists, NULL is returned instead. Available options are: (only one can be picked) <ul><li><b>yes</b> - Retrieve all URLs that have a confirmed archive available at the Wayback Machine, or other archives.</li> <li><b>no</b> - Retrieve all URLs that are confirmed unavailable at the Wayback Machine.</li> <li><b>unknown</b> - Retrieve all URLs that are not confirmed available at the Wayback Machine.</li> <li><b>missing</b> - Retrieve all URLs that are either not confirmed available or confirmed unavailable at the Wayback Machine.</li></ul> </td></tr> <tr> <td><b>reviewed</b></td> <td>No</td> <td>0 or 1</td> <td>This parameter is required if <b>urls</b> and <b>urlids</b> or any of the other search filters are not set. Set to 0 to retrieve all URLs that haven't been reviewed by a user or another bot. Set to 1 to retrieve all URLs that have been reviewed by a user or another bot. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>urls</b></td> <td><i>array</i></td> <td>Details of all of the URLs requested. </td></tr></tbody></table> <p>This function does not return action specific errors. </p> <div class="mw-heading mw-heading4"><h4 id="action=searchpagefromurl" data-mw-thread-id="h-action=searchpagefromurl-Action_functions"><span id="action.3Dsearchpagefromurl"></span><span data-mw-comment-start="" id="h-action=searchpagefromurl-Action_functions"></span>action=searchpagefromurl<span data-mw-comment-end="h-action=searchpagefromurl-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=17" title="Edit section: action=searchpagefromurl"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to fetch pages encountered URLs were found on. This action is available to anonymous clients. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>url</b></td> <td>No</td> <td><i>string</i></td> <td>This parameter is required if <b>urlid</b> is not set. A URL to lookup found pages with. Using <b>urlid</b> is recommended. </td></tr> <tr> <td><b>urlid</b></td> <td>No</td> <td>int</td> <td>This parameter is required if <b>url</b> is not set. Look up the pages based on the URL's ID. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>pages</b></td> <td><i>array</i></td> <td>A list of all pages the URL was found on. </td></tr></tbody></table> <p>This function does not return action specific errors. </p> <div class="mw-heading mw-heading4"><h4 id="action=searchurlfrompage" data-mw-thread-id="h-action=searchurlfrompage-Action_functions"><span id="action.3Dsearchurlfrompage"></span><span data-mw-comment-start="" id="h-action=searchurlfrompage-Action_functions"></span>action=searchurlfrompage<span data-mw-comment-end="h-action=searchurlfrompage-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=18" title="Edit section: action=searchurlfrompage"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to fetch URLs encountered on given pages were found on. This action is available to anonymous clients. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>pageids</b></td> <td>Yes</td> <td>Pipe separated <i>int</i></td> <td>A list of page IDs to lookup. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>urls</b></td> <td><i>array</i></td> <td>A list of all URLs that were found on the given pages. </td></tr></tbody></table> <p>This function does not return action specific errors. </p><p>Wikipedia page ID's can be retrieved using the MediaWiki API. For example for 'Albert Einstein': </p> <dl><dd><dl><dd><a class="external free" href="https://en.wikipedia.org/w/api.php?action=query&titles=Albert%20Einstein&prop=info">https://en.wikipedia.org/w/api.php?action=query&titles=Albert%20Einstein&prop=info</a></dd></dl></dd></dl> <div class="mw-heading mw-heading4"><h4 id="action=modifyurl" data-mw-thread-id="h-action=modifyurl-Action_functions"><span id="action.3Dmodifyurl"></span><span data-mw-comment-start="" id="h-action=modifyurl-Action_functions"></span>action=modifyurl<span data-mw-comment-end="h-action=modifyurl-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=19" title="Edit section: action=modifyurl"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to modify URL data IABot uses. This action requires the "changeurldata" permission, as well as the "alteraccesstime" permission to alter the access time, the "deblacklisturls" permission to remove URLs from the blacklist, the "dewhitelisturls" permission to remove URLs from the whitelist, the "blacklisturls" to add URLs to the blacklist, the "whitelisturls" to add URLs to the whitelist, the "alterarchiveurl" permission to alter the archive URL of URLs, and the "overridearchivevalidation" permission to bypass the archive validation checks, and logically is not available to anonymous clients. This action requires the CSRF and Checksum tokens to work. Not all permissions are needed to perform the desired functions. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>urlid</b></td> <td>Yes</td> <td><i>int</i></td> <td>The URL ID of the URL to modify. </td></tr> <tr> <td><b>accesstime</b></td> <td>No</td> <td>A PHP recognized timestamp</td> <td>The timestamp of the access time. The bot uses this when searching for new archives. Requires the "alteraccesstime" permission to modify. </td></tr> <tr> <td><b>livestateselect</b></td> <td>No</td> <td>0, 3, 5, 6, or 7</td> <td>The live state to set the URL to. <ul><li>Set to 0 to mark the URL as dead.</li> <li>Set to 3 to mark the URL as alive.</li> <li>Set to 5 to mark the URL as a paywall.</li> <li>Set to 6 to blacklist the URL. This requires the "blacklisturls" permission to set.</li> <li>Set to 7 to whitelist the URL. This requires the "whitelisturls" permission to set. <dl><dd>Conversely, if the URL is already blacklisted or whitelisted, the "deblacklisturls" or "dewhitelisturls" permission are required to set the new state.</dd></dl></li></ul> </td></tr> <tr> <td><b>archiveurl</b></td> <td>No</td> <td><i>string</i></td> <td>A URL of an archive snapshot of the original URL. Requires the "alterarchiveurl" permission to modify. </td></tr> <tr> <td><b>reason</b></td> <td>No</td> <td><i>string</i></td> <td>An optional reason describing the changes being made and why. It's recommended to provide one. </td></tr> <tr> <td><b>overridearchivevalidation</b></td> <td>No</td> <td>1 or "on"</td> <td>Bypass the checks on the archive snapshot. The snapshot will still be checked to ensure it is an archive snapshot, but making sure it matches the original will be bypassed. Requires the "overridearchivevalidation" permission to set. </td></tr></tbody></table> <p>This action has no unique output responses for successful requests. </p><p>This action has the following possible errors: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>urldataerror</b></td> <td><i>string</i></td> <td>Defined when an error specific to URL modification occured. Possible values are "illegalaccesstime", "stateblockedatdomain", "illegalstate", "invalidarchive", "urlmismatch", and "404". </td></tr></tbody></table> <div class="mw-heading mw-heading4"><h4 id="action=analyzepage" data-mw-thread-id="h-action=analyzepage-Action_functions"><span id="action.3Danalyzepage"></span><span data-mw-comment-start="" id="h-action=analyzepage-Action_functions"></span>action=analyzepage<span data-mw-comment-end="h-action=analyzepage-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=20" title="Edit section: action=analyzepage"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to run the bot library on a page and make an edit on the clients behalf This action requires the "analyzepage" permission, and logically is not available to anonymous clients. This action requires the CSRF and Checksum tokens to work. This action is only available for fully authenticated clients. Owner-only consumers will not work. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>pagesearch</b></td> <td>Yes</td> <td><i>string</i></td> <td>The page title of the page to analyze. </td></tr> <tr> <td><b>reason</b></td> <td>No</td> <td><i>string</i></td> <td>An option reason for analyzing the page. </td></tr> <tr> <td><b>archiveall</b></td> <td>No</td> <td>"on"</td> <td>Attempt to add archives to all non-dead references and save non-existent copies to the Wayback Machine. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>linksanalyzed</b></td> <td><i>int</i></td> <td>The number of URLs the bot found and analyzed. </td></tr> <tr> <td><b>linksarchived</b></td> <td><i>int</i></td> <td>The number of URLs the bot archived to the Wayback Machine </td></tr> <tr> <td><b>linksrescued</b></td> <td><i>int</i></td> <td>The number of URLs it fixed on wiki, either through adding archives, or correcting formatting. </td></tr> <tr> <td><b>linkstagged</b></td> <td><i>int</i></td> <td>The number or URLs it tagged as dead on wiki. </td></tr> <tr> <td><b>pagemodified</b></td> <td><i>bool</i></td> <td>Whether the page was edited or not. </td></tr> <tr> <td><b>waybacksadded</b></td> <td><i>int</i></td> <td>The number of Wayback Machine archives added to the page. </td></tr> <tr> <td><b>othersadded</b></td> <td><i>int</i></td> <td>The number of other archives added to the page. </td></tr> <tr> <td><b>revid</b></td> <td><i>int</i> OR <i>bool</i></td> <td>The revision ID of the edit. False if no edit was made. </td></tr> <tr> <td><b>modifiedlinks</b></td> <td><i>array</i></td> <td>The list of links it modified on the page. </td></tr></tbody></table> <p>This action has the following possible errors: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>analyzeerror</b></td> <td><i>string</i></td> <td>Defined when an error specific to the action has occured. Possible values are "404" and "apierror". </td></tr></tbody></table> <div class="mw-heading mw-heading4"><h4 id="action=submitbotjob" data-mw-thread-id="h-action=submitbotjob-Action_functions"><span id="action.3Dsubmitbotjob"></span><span data-mw-comment-start="" id="h-action=submitbotjob-Action_functions"></span>action=submitbotjob<span data-mw-comment-end="h-action=submitbotjob-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=21" title="Edit section: action=submitbotjob"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to submit bot jobs for InternetArchiveBot to carry out. This action requires the "submitbotjobs" permission, and logically is not available to anonymous clients. This action requires the CSRF and Checksum tokens to work. Additionally, bot jobs larger 500 pages require the "botsubmitlimit5000" permission, bot jobs larger than 5000 pages require the "botsubmitlimit50000" permissions, and bot jobs larger than 50000 pages require the "botsubmitlimitnolimit" permission. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>pagelist</b></td> <td>Yes</td> <td>Newline separated <i>string</i></td> <td>A list of page titles to process, separated by newlines. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>id</b></td> <td><i>int</i></td> <td>The job ID number </td></tr> <tr> <td><b>status</b></td> <td><i>string</i></td> <td>The current job run status. Possible values are "queued", "running", "complete", "killed", and "suspended" </td></tr> <tr> <td><b>requestedby</b></td> <td><i>string</i></td> <td>The user that requested the bot job. </td></tr> <tr> <td><b>targetwiki</b></td> <td><i>string</i></td> <td>The wiki code of the target wiki. </td></tr> <tr> <td><b>queued</b></td> <td><i>string</i></td> <td>Timestamp of when the job was submitted. </td></tr> <tr> <td><b>lastupdate</b></td> <td><i>string</i></td> <td>Timestamp of the last update to the job. </td></tr> <tr> <td><b>totalpages</b></td> <td><i>int</i></td> <td>The total number of pages in the bot job. </td></tr> <tr> <td><b>completedpages</b></td> <td><i>int</i></td> <td>The number of pages completed by the bot. </td></tr> <tr> <td><b>runstats</b></td> <td><i>array</i></td> <td>An array of statistics during the run. </td></tr></tbody></table> <p>This action has the following possible errors: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>bqsubmiterror</b></td> <td><i>string</i></td> <td>Defined when an error specific to the action has occured. </td></tr></tbody></table> <div class="mw-heading mw-heading4"><h4 id="action=getbotjob" data-mw-thread-id="h-action=getbotjob-Action_functions"><span id="action.3Dgetbotjob"></span><span data-mw-comment-start="" id="h-action=getbotjob-Action_functions"></span>action=getbotjob<span data-mw-comment-end="h-action=getbotjob-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=22" title="Edit section: action=getbotjob"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to submit bot jobs for InternetArchiveBot to carry out. This action requires the "submitbotjobs" permission, and logically is not available to anonymous clients. This action requires the CSRF and Checksum tokens to work. Additionally, bot jobs larger 500 pages require the "botsubmitlimit5000" permission, bot jobs larger than 5000 pages require the "botsubmitlimit50000" permissions, and bot jobs larger than 50000 pages require the "botsubmitlimitnolimit" permission. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>id</b></td> <td>Yes</td> <td><i>int</i></td> <td>The job ID to lookup. </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>id</b></td> <td><i>int</i></td> <td>The job ID number </td></tr> <tr> <td><b>status</b></td> <td><i>string</i></td> <td>The current job run status. Possible values are "queued", "running", "complete", "killed", and "suspended" </td></tr> <tr> <td><b>requestedby</b></td> <td><i>string</i></td> <td>The user that requested the bot job. </td></tr> <tr> <td><b>targetwiki</b></td> <td><i>string</i></td> <td>The wiki code of the target wiki. </td></tr> <tr> <td><b>queued</b></td> <td><i>string</i></td> <td>Timestamp of when the job was submitted. </td></tr> <tr> <td><b>lastupdate</b></td> <td><i>string</i></td> <td>Timestamp of the last update to the job. </td></tr> <tr> <td><b>totalpages</b></td> <td><i>int</i></td> <td>The total number of pages in the bot job. </td></tr> <tr> <td><b>completedpages</b></td> <td><i>int</i></td> <td>The number of pages completed by the bot. </td></tr> <tr> <td><b>runstats</b></td> <td><i>array</i></td> <td>An array of statistics during the run. </td></tr></tbody></table> <p>This function does not return action specific errors. </p> <div class="mw-heading mw-heading4"><h4 id="action=statistics" data-mw-thread-id="h-action=statistics-Action_functions"><span id="action.3Dstatistics"></span><span data-mw-comment-start="" id="h-action=statistics-Action_functions"></span>action=statistics<span data-mw-comment-end="h-action=statistics-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=23" title="Edit section: action=statistics"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes to query bot statistics of on wiki activity. This action can be used by anonymous clients. </p><p>This action offers the following parameters: </p> <table class="wikitable"> <tbody><tr> <th>Parameter</th> <th>Required</th> <th>Accepted values</th> <th>Description </th></tr> <tr> <td><b>time-start</b></td> <td>No</td> <td><i>timestamp</i></td> <td>Do not include data points pre-dating this timestamp. </td></tr> <tr> <td><b>time-end</b></td> <td>No</td> <td><i>timestamp</i></td> <td>Do not include data points post-dating this timestamp. </td></tr> <tr> <td><b>only-day</b></td> <td>No</td> <td><i>int</i></td> <td>Only include data points if it was made on particular day(s) of a month. Can accept multiple pipe-separated list of ints from 1-31. </td></tr> <tr> <td><b>only-month</b></td> <td>No</td> <td><i>int</i></td> <td>Only include data points if it was made on particular month(s) of a year. Can accept multiple pipe-separated list of ints from 1-12. </td></tr> <tr> <td><b>only-year</b></td> <td>No</td> <td><i>int</i></td> <td>Only include data points if it was made on particular year(s). Can accept multiple pipe-separated list of ints from 2015-2024. </td></tr> <tr> <td><b>only-wiki</b></td> <td>No</td> <td><i>string</i></td> <td>Only include data points for a certain wiki. Accepts wiki codes (ie. enwiki). Can accept multiple pipe-separated list of strings. </td></tr> <tr> <td><b>only-key</b></td> <td>No</td> <td><i>string</i></td> <td>Only include data points for certain key values. Can accept multiple pipe-separated list of strings. </td></tr> <tr> <td><b>min-value</b></td> <td>No</td> <td><i>int</i></td> <td>Do not include data points if value of Key is less than given int. Must be greater than 0. </td></tr> <tr> <td><b>max-value</b></td> <td>No</td> <td><i>int</i></td> <td>Do not include data points if value of Key is greater than given int. Must be greater than 1 or min-value. </td></tr> <tr> <td><b>format</b></td> <td>No</td> <td><i>string</i></td> <td>Format the dataset. <ul><li><b>flat</b>: Flatten the data set. Every object in the array is a day from a wiki.</li> <li><b>tsv</b>: Flatten the data set to a TSV format. Formatted like JSON, but as a TSV.</li> <li><b>group-time-flat</b>: Groups the data by timestamps. Each timestamp contains every wiki that has seen activity for a given day.</li> <li><b>group-wiki-flat</b>: Groups the data by wiki. Each wiki contains an array of timestamps with a summary of activity for the respective days.</li> <li><b>group-time</b>: Groups the data by time, in groups of years, with a subgroup of months, with each month containing a group of days. Each day contains a group of wikis that has seen activity on that day.</li> <li><b>group-wiki</b>: Groups the data by wiki. Each wiki contains a group of years, with a subgroup of months, with each month containing a group of days, with each day summarizing the activity for that day.</li></ul> </td></tr></tbody></table> <p>The action has the following possible return values: </p> <table class="wikitable"> <tbody><tr> <th>Value</th> <th>Type</th> <th>Description </th></tr> <tr> <td><b>statistics</b></td> <td><i>array</i></td> <td>An array of statistics requested. </td></tr></tbody></table> <p>This function does not return action specific errors. </p> <div class="mw-heading mw-heading4"><h4 id="action=logout" data-mw-thread-id="h-action=logout-Action_functions"><span id="action.3Dlogout"></span><span data-mw-comment-start="" id="h-action=logout-Action_functions"></span>action=logout<span data-mw-comment-end="h-action=logout-Action_functions"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=InternetArchiveBot/API&action=edit&section=24" title="Edit section: action=logout"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This action allows automated processes logout from the API. </p><p>This action has no parameters. </p><p>This function does not return any action specific values. </p><p>This function does not return action specific errors. </p><p><br/> </p> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐57b59b5979‐d6hdf Cached time: 20241127004601 Cache expiry: 864000 Reduced expiry: true Complications: [show‐toc] DiscussionTools time usage: 0.036 seconds CPU time usage: 0.158 seconds Real time usage: 0.183 seconds Preprocessor visited node count: 171/1000000 Post‐expand include size: 6104/2097152 bytes Template argument size: 25/2097152 bytes Highest expansion depth: 6/100 Expensive parser function count: 2/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 2942/5000000 bytes Lua time usage: 0.046/10.000 seconds Lua memory usage: 654894/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 73.583 1 -total 100.00% 73.583 1 Template:TNT 61.56% 45.299 1 Template:Navigation_tabs --> <!-- Saved in parser cache with key metawiki:pcache:idhash:10344928-0!canonical and timestamp 20241127004601 and revision id 27563063. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://meta.wikimedia.org/w/index.php?title=InternetArchiveBot/API&oldid=27563063">https://meta.wikimedia.org/w/index.php?title=InternetArchiveBot/API&oldid=27563063</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden category: <ul><li><a href="/wiki/Category:Indexed_pages" title="Category:Indexed pages">Indexed pages</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 6 October 2024, at 10:32.</li> <li id="footer-info-copyright">Text is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-ShareAlike License</a>; additional terms may apply. See <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a> for details.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Meta:About">About Meta</a></li> <li id="footer-places-disclaimers"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:General_disclaimer">Disclaimers</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/meta.wikimedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//meta.m.wikimedia.org/w/index.php?title=InternetArchiveBot/API&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c59558b9d-8n4qm","wgBackendResponseTime":129,"wgDiscussionToolsPageThreads":[{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Authorizing_the_tool/bot/gadget_to_use_the_API","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Differences_between_authorization_methods-Authorizing_the_tool/bot/gadget_to_use_the_API","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Authorizing_a_JS_gadget_or_another_tool_using_OAuth-Authorizing_the_tool/bot/gadget_to_use_the_API","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Authorizing_a_bot_with_an_owner-only_consumer-Authorizing_the_tool/bot/gadget_to_use_the_API","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Helper_scripts_to_make_OAuth_easier-Authorizing_the_tool/bot/gadget_to_use_the_API","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-API_functions_and_usage_and_limitations","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-GET_or_POST?-API_functions_and_usage_and_limitations","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Global_parameters-API_functions_and_usage_and_limitations","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Global_return_values-API_functions_and_usage_and_limitations","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Global_return_values_on_error-API_functions_and_usage_and_limitations","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Action_functions-API_functions_and_usage_and_limitations","replies":[{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=runpages-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=getfalsepositives-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=getbotqueue-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=reportfp-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=searchurldata-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=searchpagefromurl-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=searchurlfrompage-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=modifyurl-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=analyzepage-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=submitbotjob-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=getbotjob-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=statistics-Action_functions","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-action=logout-Action_functions","replies":[]}]}]}],"wgPageParseReport":{"discussiontools":{"limitreport-timeusage":"0.036"},"limitreport":{"cputime":"0.158","walltime":"0.183","ppvisitednodes":{"value":171,"limit":1000000},"postexpandincludesize":{"value":6104,"limit":2097152},"templateargumentsize":{"value":25,"limit":2097152},"expansiondepth":{"value":6,"limit":100},"expensivefunctioncount":{"value":2,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":2942,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 73.583 1 -total","100.00% 73.583 1 Template:TNT"," 61.56% 45.299 1 Template:Navigation_tabs"]},"scribunto":{"limitreport-timeusage":{"value":"0.046","limit":"10.000"},"limitreport-memusage":{"value":654894,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-57b59b5979-d6hdf","timestamp":"20241127004601","ttl":864000,"transientcontent":true}}});});</script> </body> </html>