MediaWiki API ヘルプ

このページは自動生成された MediaWiki API の説明文書ページです。

説明文書と例: https://www.mediawiki.org/wiki/API

メイン モジュール

Status: All features shown on this page should be working, but the API is still in active development, and may change at any time. Subscribe to the mediawiki-api-announce mailing list for notice of updates.

Erroneous requests: When erroneous requests are sent to the API, an HTTP header will be sent with the key "MediaWiki-API-Error" and then both the value of the header and the error code sent back will be set to the same value. For more information see API: Errors and warnings.

パラメーター:
action

実行する操作です。

値 (いずれか1つ): blockchecktokenclearhasmsgcomparecreateaccountdeleteeditemailuserexpandtemplatesfeedcontributionsfeedrecentchangesfeedwatchlistfilereverthelpimagerotateimportloginlogoutmanagetagsmoveopensearchoptionsparaminfoparsepatrolprotectpurgequeryrevisiondeleterollbackrsdsetnotificationtimestampstashedittagtokensunblockundeleteuploaduserrightswatch
既定値: help
format

出力する形式です。

値 (いずれか1つ): dbgdbgfmdumpdumpfmjsonjsonfmnonephpphpfmrawfmtxttxtfmwddxwddxfmxmlxmlfmyamlyamlfm
既定値: jsonfm
maxlag

Maximum lag can be used when MediaWiki is installed on a database replicated cluster. To save actions causing any more site replication lag, this parameter can make the client wait until the replication lag is less than the specified value. In case of excessive lag, error code maxlag is returned with a message like Waiting for $host: $lag seconds lagged.
See Manual: Maxlag parameter for more information.

smaxage

s-maxage ヘッダーにこの秒数を設定します。エラーがキャッシュされることはありません。

既定値: 0
maxage

max-age ヘッダーにこの秒数を設定します。エラーがキャッシュされることはありません。

既定値: 0
assert

user を設定した場合は利用者がログイン済みかどうかを、bot を指定した場合はボット権限があるかどうかを、それぞれ検証します。

値 (いずれか1つ): user、bot
requestid

任意の値を指定でき、その値が結果に含められます。リクエストを識別するために使用できます。

servedby

リクエストを処理したホスト名を結果に含めます。

curtimestamp

現在のタイムスタンプを結果に含めます。

origin

When accessing the API using a cross-domain AJAX request (CORS), set this to the originating domain. This must be included in any pre-flight request, and therefore must be part of the request URI (not the POST body). This must match one of the origins in the Origin header exactly, so it has to be set to something like https://en.wikipedia.org or https://meta.wikimedia.org. If this parameter does not match the Origin header, a 403 response will be returned. If this parameter matches the Origin header and the origin is whitelisted, an Access-Control-Allow-Origin header will be set.

uselang

メッセージの翻訳に使用する言語です。コードの一覧は action=query&meta=siteinfosiprop=languages を付けることで取得できます。user を指定することで現在の利用者の個人設定の言語を、content を指定することでこのウィキの本文の言語を使用することもできます。

既定値: user
例:
メイン モジュールのヘルプ
api.php?action=help
すべてのヘルプを1つのページに
api.php?action=help&recursivesubmodules=1
権限:
writeapi
書き込みAPIを使用
権限を持つグループ: all、user、bot
apihighlimits
Use higher limits in API queries (slow queries: 500; fast queries: 5000). The limits for slow queries also apply to multivalue parameters.
権限を持つグループ: bot、sysop

action=block

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

利用者をブロックします。

パラメーター:
user

ブロックする利用者名、IPアドレスまたはIPレンジ。

このパラメーターは必須です。
expiry

Expiry time. May be relative (e.g. 5 months or 2 weeks) or absolute (e.g. 2014-09-18T12:34:56Z). If set to infinite, indefinite, or never, the block will never expire.

既定値: never
reason

ブロックの理由。

既定値: (空)
anononly

匿名利用者のみブロックします(つまり、このIPアドレスからの匿名での編集を不可能にします)。

nocreate

アカウントの作成を禁止します。

autoblock

その利用者が最後に使用したIPアドレスと、ブロック後に編集を試みた際のIPアドレスを自動的にブロックします。

noemail

Wikiを通して電子メールを送信することを禁止します。(blockemail 権限が必要です)

hidename

ブロック記録から利用者名を秘匿します。(hideuser 権限が必要です)

allowusertalk

Allow the user to edit their own talk page (depends on $wgBlockAllowsUTEdit).

reblock

その利用者がすでにブロックされている場合、ブロックを上書きします。

watchuser

その利用者またはIPアドレスの利用者ページとトークページをウォッチします。

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。
例:
IPアドレス 192.0.2.5First strike という理由で3日ブロックする
api.php?action=block&user=192.0.2.5&expiry=3%20days&reason=First%20strike&token=123ABC
利用者 VandalVandalism という理由で無期限ブロックし、新たなアカウント作成とメールの送信を禁止する。
api.php?action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate=&autoblock=&noemail=&token=123ABC

action=checktoken

  • このモジュールは読み取りの権限を必要とします。

Check the validity of a token from action=query&meta=tokens.

パラメーター:
type

調べるトークンの種類。

このパラメーターは必須です。
値 (いずれか1つ): csrf、patrol、rollback、userrights、watch
token

調べるトークン。

このパラメーターは必須です。
maxtokenage

Maximum allowed age of the token, in seconds.

例:
csrf トークンの妥当性を調べる。
api.php?action=checktoken&type=csrf&token=123ABC

action=clearhasmsg

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。

Clears the hasmsg flag for the current user.

例:
Clear the hasmsg flag for the current user.
api.php?action=clearhasmsg

action=compare

  • このモジュールは読み取りの権限を必要とします。

Get the difference between 2 pages.

A revision number, a page title, or a page ID for both "from" and "to" must be passed.

パラメーター:
fromtitle

First title to compare.

fromid

First page ID to compare.

fromrev

First revision to compare.

totitle

Second title to compare.

toid

Second page ID to compare.

torev

Second revision to compare.

例:
版1と2の差分を生成する。
api.php?action=compare&fromrev=1&torev=2

action=createaccount

  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

新しい利用者アカウントを作成します。

パラメーター:
name

利用者名。

このパラメーターは必須です。
password

パスワード (mailpassword が設定されると無視されます)。

domain

Domain for external authentication (optional).

token

最初のリクエストで得られたアカウント作成用トークンです。

email

利用者の電子メールアドレス (任意)。

realname

利用者の本名 (省略可能)。

mailpassword

設定されると (その値を問わず)、ランダムなパスワードがその利用者に電子メールで送られます。

reason

ログに記録されるアカウント作成の理由 (任意)。

language

Language code to set as default for the user (optional, defaults to content language).

例:
利用者 testuser をパスワード test123 として作成する。
api.php?action=createaccount&name=testuser&password=test123
利用者 testuserを作成し、ランダムに生成されたパスワードをメールで送る
api.php?action=createaccount&name=testmailuser&mailpassword=true&reason=MyReason

action=delete

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

ページを削除します。

パラメーター:
title

削除するページ名です。pageid とは同時に使用できません。

pageid

削除するページIDです。title とは同時に使用できません。

reason

削除の理由です。入力しない場合、自動的に生成された理由が使用されます。

watch
廃止予定です。

そのページを現在の利用者のウォッチリストに追加します。

watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

値 (いずれか1つ): watch、unwatch、preferences、nochange
既定値: preferences
unwatch
廃止予定です。

そのページを現在の利用者のウォッチリストから除去します。

oldimage

The name of the old image to delete as provided by action=query&prop=imageinfo&iiprop=archivename.

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。
例:
Main Page を削除する
api.php?action=delete&title=Main%20Page&token=123ABC
Preparing for move という理由で Main Page を削除する
api.php?action=delete&title=Main%20Page&token=123ABC&reason=Preparing%20for%20move

action=edit

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

ページを作成、編集します。

パラメーター:
title

編集するページ名です。pageid とは同時に使用できません。

pageid

編集するページIDです。title とは同時に使用できません。

section

節番号です。先頭の節の場合は 0、新しい節の場合は newを指定します。

sectiontitle

新しい節の名前です。

text

ページの本文。

summary

Edit summary. Also section title when section=new and sectiontitle is not set.

tags

Change tags to apply to the revision.

値 (|で区切る):
minor

細部の編集

notminor

Non-minor edit.

bot

Mark this edit as bot.

basetimestamp

Timestamp of the base revision, used to detect edit conflicts. May be obtained through action=query&prop=revisions&rvprop=timestamp.

starttimestamp

Timestamp when the editing process began, used to detect edit conflicts. An appropriate value may be obtained using curtimestamp when beginning the edit process (e.g. when loading the page content to edit).

recreate

Override any errors about the page having been deleted in the meantime.

createonly

すでにそのページが存在する場合は編集を行いません。

nocreate

そのページが存在しない場合にエラーを返します。

watch
廃止予定です。

そのページを現在の利用者のウォッチリストに追加します。

unwatch
廃止予定です。

そのページを現在の利用者のウォッチリストから除去します。

watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

値 (いずれか1つ): watch、unwatch、preferences、nochange
既定値: preferences
md5

The MD5 hash of the text parameter, or the prependtext and appendtext parameters concatenated. If set, the edit won't be done unless the hash is correct.

prependtext

Add this text to the beginning of the page. Overrides text.

appendtext

Add this text to the end of the page. Overrides text.

Use section=new to append a new section, rather than this parameter.

undo

Undo this revision. Overrides text, prependtext and appendtext.

undoafter

Undo all revisions from undo to this one. If not set, just undo one revision.

redirect

Automatically resolve redirects.

contentformat

Content serialization format used for the input text.

値 (いずれか1つ): text/x-wiki、text/javascript、application/json、text/css、text/plain
contentmodel

Content model of the new content.

値 (いずれか1つ): wikitext、javascript、json、css、text
token

action=query&meta=tokens から取得した「csrf」トークン

このトークンは常に最後のパラメーターとして、または少なくとも text パラメーターより後に送信されるべきです。

このパラメーターは必須です。

action=emailuser

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

利用者に電子メールを送信します。

パラメーター:
target

送信先の利用者名。

このパラメーターは必須です。
subject

Subject header.

text

電子メールの本文。

このパラメーターは必須です。
ccme

電子メールの複製を自分にも送信します。

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。
例:
利用者 WikiSysopContent という本文の電子メールを送信。
api.php?action=emailuser&target=WikiSysop&text=Content&token=123ABC

action=expandtemplates

  • このモジュールは読み取りの権限を必要とします。

ウィキテキストに含まれるすべてのテンプレートを展開します。

パラメーター:
title

ページの名前です。

既定値: API
text

変換するウィキテキストです。

このパラメーターは必須です。
revid

Revision ID, for {{REVISIONID}} and similar variables.

prop

Which pieces of information to get:

wikitext
The expanded wikitext.
categories
Any categories present in the input that are not represented in the wikitext output.
properties
Page properties defined by expanded magic words in the wikitext.
volatile
Whether the output is volatile and should not be reused elsewhere within the page.
ttl
The maximum time after which caches of the result should be invalidated.
parsetree
The XML parse tree of the input.

Note that if no values are selected, the result will contain the wikitext, but the output will be in a deprecated format.

値 (|で区切る): wikitext、categories、properties、volatile、ttl、parsetree
includecomments

Whether to include HTML comments in the output.

generatexml
廃止予定です。

Generate XML parse tree (replaced by prop=parsetree).

例:
ウィキテキスト {{Project:Sandbox}} を展開する。
api.php?action=expandtemplates&text={{Project:Sandbox}}

action=feedcontributions

  • このモジュールは読み取りの権限を必要とします。

Returns a user contributions feed.

パラメーター:
feedformat

The format of the feed.

値 (いずれか1つ): rss、atom
既定値: rss
user

What users to get the contributions for.

このパラメーターは必須です。
namespace

Which namespace to filter the contributions by.

値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
year

From year (and earlier).

month

From month (and earlier).

tagfilter

Filter contributions that have these tags.

値 (|で区切る):
既定値: (空)
deletedonly

削除された投稿記録のみ表示します。

toponly

最新版の編集のみ表示します。

newonly

ページ作成を伴う編集のみを表示します。

showsizediff

Show the size difference between revisions.

例:
利用者 Example の投稿記録を取得する。
api.php?action=feedcontributions&user=Example

action=feedrecentchanges

  • このモジュールは読み取りの権限を必要とします。

Returns a recent changes feed.

パラメーター:
feedformat

The format of the feed.

値 (いずれか1つ): rss、atom
既定値: rss
namespace

Namespace to limit the results to.

値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
invert

All namespaces but the selected one.

associated

Include associated (talk or main) namespace.

days

Days to limit the results to.

値は 1 以上にしてください。
既定値: 7
limit

返す結果の最大数。

値は 1 以上 50 以下にしてください。
既定値: 50
from

Show changes since then.

hideminor

細部の変更を隠す。

hidebots

ボットによる変更を隠す。

hideanons

未登録利用者による変更を隠す。

hideliu

登録利用者による変更を隠す。

hidepatrolled

巡回済みの変更を隠す。

hidemyself

Hide changes made by the current user.

tagfilter

Filter by tag.

target

Show only changes on pages linked from this page.

showlinkedto

Show changes on pages linked to the selected page instead.

例:
最近の更新を表示する。
api.php?action=feedrecentchanges
最近30日間の変更を表示する。
api.php?action=feedrecentchanges&days=30

action=feedwatchlist

  • このモジュールは読み取りの権限を必要とします。

Returns a watchlist feed.

パラメーター:
feedformat

The format of the feed.

値 (いずれか1つ): rss、atom
既定値: rss
hours

List pages modified within this many hours from now.

値は 1 以上 72 以下にしてください。
既定値: 24
linktosections

Link directly to changed sections if possible.

allrev

Include multiple revisions of the same page within given timeframe.

wlowner

Used along with token to access a different user's watchlist.

wltoken

A security token (available in the user's preferences) to allow access to another user's watchlist.

wlshow

Show only items that meet these criteria. For example, to see only minor edits done by logged-in users, set show=minor|!anon.

値 (|で区切る): minor、!minor、bot、!bot、anon、!anon、patrolled、!patrolled、unread、!unread
wltype

Which types of changes to show:

edit
Regular page edits.
external
External changes.
new
Page creations.
log
Log entries.
値 (|で区切る): edit、external、new、log
既定値: edit|new|log
wlexcludeuser

Don't list changes by this user.

例:
Show the watchlist feed.
api.php?action=feedwatchlist
Show all changes to watched pages in the past 6 hours.
api.php?action=feedwatchlist&allrev=&hours=6

action=filerevert

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Revert a file to an old version.

パラメーター:
filename

Target filename, without the File: prefix.

このパラメーターは必須です。
comment

Upload comment.

既定値: (空)
archivename

Archive name of the revision to revert to.

このパラメーターは必須です。
token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=help

指定したモジュールのヘルプを表示します。

パラメーター:
modules

ヘルプを表示するモジュールです (action パラメーターおよび format パラメーターの値、または main)。+ を使用して下位モジュールを指定できます。

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
既定値: main
submodules

指定したモジュールの下位モジュールのヘルプを含めます。

recursivesubmodules

下位モジュールのヘルプを再帰的に含めます。

wrap

Wrap the output in a standard API response structure.

toc

HTML 出力に目次を含めます。

例:
メイン モジュールのヘルプ
api.php?action=help
すべてのヘルプを1つのページに
api.php?action=help&recursivesubmodules=1
ヘルプ モジュール自身のヘルプ
api.php?action=help&modules=help
2つの下位モジュールのヘルプ
api.php?action=help&modules=query+info|query+categorymembers

action=imagerotate

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Rotate one or more images.

パラメーター:
rotation

Degrees to rotate image clockwise.

このパラメーターは必須です。
値 (いずれか1つ): 90、180、270
continue

When more results are available, use this to continue.

titles

A list of titles to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
pageids

A list of page IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
revids

A list of revision IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
generator

Get the list of pages to work on by executing the specified query module.

Note: Generator parameter names must be prefixed with a "g", see examples.

値 (いずれか1つ): allcategoriesalldeletedrevisionsallfileusagesallimagesalllinksallpagesallredirectsalltransclusionsbacklinkscategoriescategorymembersdeletedrevisionsduplicatefilesembeddedinexturlusagefileusageimagesimageusageiwbacklinkslangbacklinkslinkslinksherepageswithpropprefixsearchprotectedtitlesquerypagerandomrecentchangesredirectsrevisionssearchtemplatestranscludedinwatchlistwatchlistraw
redirects

Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.

converttitles

Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan、iu、kk、ku、shi、sr、tg、uz、zh.

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=import

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Import a page from another wiki, or an XML file.

Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when sending a file for the xml parameter.

パラメーター:
summary

Import summary.

xml

XMLファイルをアップロード

multipart/form-data 形式でファイルをアップロードしてください。
interwikisource

For interwiki imports: wiki to import from.

値 (いずれか1つ):
interwikipage

For interwiki imports: page to import.

fullhistory

For interwiki imports: import the full history, not just the current version.

templates

For interwiki imports: import all included templates as well.

namespace

For interwiki imports: import to this namespace.

値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
rootpage

このページの下位ページとしてインポートする。

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=login (lg)

  • このモジュールは POST リクエストのみを受け付けます。

Log in and get authentication cookies.

In the event of a successful log-in, the needed cookies will be included in the HTTP response headers. In the event of a failed log-in, further attempts may be throttled to limit automated password guessing attacks.

パラメーター:
lgname

利用者名。

lgpassword

パスワード。

lgdomain

Domain (optional).

lgtoken

最初のリクエストで取得したログイントークンです。

action=logout

ログアウトしてセッションデータを消去します。

例:
現在の利用者をログアウトする。
api.php?action=logout

action=managetags

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Perform management tasks relating to change tags.

パラメーター:
operation

Which operation to perform:

create
Create a new change tag for manual use.
delete
Remove a change tag from the database, including removing the tag from all revisions, recent change entries and log entries on which it is used.
activate
Activate a change tag, allowing users to apply it manually.
deactivate
Deactivate a change tag, preventing users from applying it manually.
このパラメーターは必須です。
値 (いずれか1つ): create、delete、activate、deactivate
tag

Tag to create, delete, activate or deactivate. For tag creation, the tag must not exist. For tag deletion, the tag must exist. For tag activation, the tag must exist and not be in use by an extension. For tag deactivation, the tag must be currently active and manually defined.

このパラメーターは必須です。
reason

An optional reason for creating, deleting, activating or deactivating the tag.

ignorewarnings

Whether to ignore any warnings that are issued during the operation.

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=move

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

ページを移動します。

パラメーター:
from

移動するページのページ名です。fromid とは同時に使用できません。

fromid

移動するページのページIDです。from とは同時に使用できません。

to

移動後のページ名。

このパラメーターは必須です。
reason

名称変更の理由。

既定値: (空)
movetalk

存在する場合、トークページも名前を変更します。

movesubpages

可能であれば、下位ページも名前を変更します。

noredirect

転送ページを作成しません。

watch
廃止予定です。

そのページと転送ページを現在の利用者のウォッチリストに追加します。

unwatch
廃止予定です。

そのページと転送ページを現在の利用者のウォッチリストから除去します。

watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

値 (いずれか1つ): watch、unwatch、preferences、nochange
既定値: preferences
ignorewarnings

あらゆる警告を無視

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=opensearch

  • このモジュールは読み取りの権限を必要とします。

Search the wiki using the OpenSearch protocol.

パラメーター:
search

検索文字列。

limit

返す結果の最大数。

No more than 100 (100 for bots) allowed.
既定値: 10
namespace

検索する名前空間。

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
既定値: 0
suggest

$wgEnableOpenSearchSuggest が false の場合、何もしません。

redirects

How to handle redirects:

return
Return the redirect itself.
resolve
Return the target page. May return fewer than limit results.

For historical reasons, the default is "return" for format=json and "resolve" for other formats.

値 (いずれか1つ): return、resolve
format

The format of the output.

値 (いずれか1つ): json、jsonfm、xml、xmlfm
既定値: json
warningsaserror

If warnings are raised with format=json, return an API error instead of ignoring them.

例:
Find pages beginning with Te.
api.php?action=opensearch&search=Te

action=options

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Change preferences of the current user.

Only options which are registered in core or in one of installed extensions, or options with keys prefixed with "userjs-" (intended to be used by user scripts), can be set.

パラメーター:
reset

Resets preferences to the site defaults.

resetkinds

List of types of options to reset when the reset option is set.

値 (|で区切る): registered、registered-multiselect、registered-checkmatrix、userjs、special、unused、all
既定値: all
change

List of changes, formatted name=value (e.g. skin=vector). Value cannot contain pipe characters. If no value is given (not even an equals sign), e.g., optionname|otheroption|..., the option will be reset to its default value.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
optionname

A name of a option which should be set to the value given by optionvalue.

optionvalue

A value of the option specified by optionname, can contain pipe characters.

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=paraminfo

API モジュールに関する情報を取得します。

パラメーター:
modules

List of module names (values of the action and format parameters, or main). Can specify submodules with a +.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
helpformat

Format of help strings.

値 (いずれか1つ): html、wikitext、raw、none
既定値: none
querymodules
廃止予定です。

List of query module names (value of prop, meta or list parameter). Use modules=query+foo instead of querymodules=foo.

値 (|で区切る): allcategories、alldeletedrevisions、allfileusages、allimages、alllinks、allmessages、allpages、allredirects、alltransclusions、allusers、backlinks、blocks、categories、categoryinfo、categorymembers、contributors、deletedrevisions、deletedrevs、duplicatefiles、embeddedin、extlinks、exturlusage、filearchive、filerepoinfo、fileusage、imageinfo、images、imageusage、info、iwbacklinks、iwlinks、langbacklinks、langlinks、links、linkshere、logevents、pagepropnames、pageprops、pageswithprop、prefixsearch、protectedtitles、querypage、random、recentchanges、redirects、revisions、search、siteinfo、stashimageinfo、tags、templates、tokens、transcludedin、usercontribs、userinfo、users、watchlist、watchlistraw
値の最大値は 50 (ボットの場合は 500) です。
mainmodule
廃止予定です。

Get information about the main (top-level) module as well. Use modules=main instead.

pagesetmodule
廃止予定です。

Get information about the pageset module (providing titles= and friends) as well.

formatmodules
廃止予定です。

List of format module names (value of format parameter). Use modules instead.

値 (|で区切る): dbg、dbgfm、dump、dumpfm、json、jsonfm、none、php、phpfm、rawfm、txt、txtfm、wddx、wddxfm、xml、xmlfm、yaml、yamlfm

action=parse

  • このモジュールは読み取りの権限を必要とします。

Parses content and returns parser output.

See the various prop-modules of action=query to get information from the current version of a page.

There are several ways to specify the text to parse:

  1. Specify a page or revision, using page, pageid, or oldid.
  2. Specify content explicitly, using text, title, and contentmodel.
  3. Specify only a summary to parse. prop should be given an empty value.
パラメーター:
title

Title of page the text belongs to. If omitted, contentmodel must be specified, and API will be used as the title.

text

Text to parse. Use title or contentmodel to control the content model.

summary

Summary to parse.

page

Parse the content of this page. Cannot be used together with text and title.

pageid

Parse the content of this page. Overrides page.

redirects

If page or pageid is set to a redirect, resolve it.

oldid

Parse the content of this revision. Overrides page and pageid.

prop

Which pieces of information to get:

text
Gives the parsed text of the wikitext.
langlinks
Gives the language links in the parsed wikitext.
categories
Gives the categories in the parsed wikitext.
categorieshtml
Gives the HTML version of the categories.
links
Gives the internal links in the parsed wikitext.
templates
Gives the templates in the parsed wikitext.
images
Gives the images in the parsed wikitext.
externallinks
Gives the external links in the parsed wikitext.
sections
Gives the sections in the parsed wikitext.
revid
Adds the revision ID of the parsed page.
displaytitle
Adds the title of the parsed wikitext.
headitems
Gives items to put in the <head> of the page.
headhtml
Gives parsed <head> of the page.
modules
Gives the ResourceLoader modules used on the page.
indicators
Gives the HTML of page status indicators used on the page.
iwlinks
Gives interwiki links in the parsed wikitext.
wikitext
Gives the original wikitext that was parsed.
properties
Gives various properties defined in the parsed wikitext.
limitreportdata
Gives the limit report in a structured way. Gives no data, when disablepp is set.
limitreporthtml
Gives the HTML version of the limit report. Gives no data, when disablepp is set.
値 (|で区切る): text、langlinks、categories、categorieshtml、links、templates、images、externallinks、sections、revid、displaytitle、headitems、headhtml、modules、indicators、iwlinks、wikitext、properties、limitreportdata、limitreporthtml
既定値: text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle|iwlinks|properties
pst

Do a pre-save transform on the input before parsing it. Only valid when used with text.

onlypst

Do a pre-save transform (PST) on the input, but don't parse it. Returns the same wikitext, after a PST has been applied. Only valid when used with text.

effectivelanglinks

Includes language links supplied by extensions (for use with prop=langlinks).

section

Only retrieve the content of this section number or when new generate a new section.

new section is only honored when specifying text.

sectiontitle

New section title when section is new.

Unlike page editing, this does not fall back to summary when omitted or empty.

disablepp

Disable the PP Report from the parser output.

disableeditsection

Disable edit section links from the parser output.

generatexml

Generate XML parse tree (requires content model wikitext).

preview

Parse in preview mode.

sectionpreview

Parse in section preview mode (enables preview mode too).

disabletoc

Disable table of contents in output.

contentformat

Content serialization format used for the input text. Only valid when used with text.

値 (いずれか1つ): text/x-wiki、text/javascript、application/json、text/css、text/plain
contentmodel

Content model of the input text. If omitted, title must be specified, and default will be the model of the specified title. Only valid when used with text.

値 (いずれか1つ): wikitext、javascript、json、css、text

action=patrol

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

ページまたは版を巡回済みにします。

パラメーター:
rcid

Recentchanges ID to patrol.

revid

巡回済みにする版ID。

token

action=query&meta=tokens から取得した「patrol」トークン

このパラメーターは必須です。

action=protect

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

ページの保護レベルを変更します。

パラメーター:
title

保護(解除)するページ名です。pageid とは同時に指定できません。

pageid

保護(解除)するページIDです。title とは同時に指定できません。

protections

List of protection levels, formatted action=level (e.g. edit=sysop).

Note: Any actions not listed will have restrictions removed.

このパラメーターは必須です。
複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
expiry

有効期限です。タイムスタンプがひとつだけ指定された場合は、それがすべての保護に適用されます。無期限の保護を行う場合はinfinite, indefinite, infinity, または never を指定します。

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
既定値: infinite
reason

保護(解除)の理由。

既定値: (空)
cascade

Enable cascading protection (i.e. protect pages included in this page). Ignored if all protection levels given do not support cascading.

watch
廃止予定です。

指定されると、保護(解除)するページが現在の利用者のウォッチリストに追加されます。

watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

値 (いずれか1つ): watch、unwatch、preferences、nochange
既定値: preferences
token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=purge

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Purge the cache for the given titles.

Requires a POST request if the user is not logged in.

パラメーター:
forcelinkupdate

Update the links tables.

forcerecursivelinkupdate

Update the links table, and update the links tables for any page that uses this page as a template.

continue

When more results are available, use this to continue.

titles

A list of titles to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
pageids

A list of page IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
revids

A list of revision IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
generator

Get the list of pages to work on by executing the specified query module.

Note: Generator parameter names must be prefixed with a "g", see examples.

値 (いずれか1つ): allcategoriesalldeletedrevisionsallfileusagesallimagesalllinksallpagesallredirectsalltransclusionsbacklinkscategoriescategorymembersdeletedrevisionsduplicatefilesembeddedinexturlusagefileusageimagesimageusageiwbacklinkslangbacklinkslinkslinksherepageswithpropprefixsearchprotectedtitlesquerypagerandomrecentchangesredirectsrevisionssearchtemplatestranscludedinwatchlistwatchlistraw
redirects

Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.

converttitles

Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan、iu、kk、ku、shi、sr、tg、uz、zh.

例:
Purge the Main Page and the API page.
api.php?action=purge&titles=Main_Page|API
Purge the first 10 pages in the main namespace.
api.php?action=purge&generator=allpages&gapnamespace=0&gaplimit=10

action=query

  • このモジュールは読み取りの権限を必要とします。

Fetch data from and about MediaWiki.

All data modifications will first have to use query to acquire a token to prevent abuse from malicious sites.

パラメーター:
prop

Which properties to get for the queried pages.

値 (|で区切る): categoriescategoryinfocontributorsdeletedrevisionsduplicatefilesextlinksfileusageimageinfoimagesinfoiwlinkslanglinkslinkslinksherepagepropsredirectsrevisionsstashimageinfotemplatestranscludedin
list

Which lists to get.

値 (|で区切る): allcategoriesalldeletedrevisionsallfileusagesallimagesalllinksallpagesallredirectsalltransclusionsallusersbacklinksblockscategorymembersdeletedrevsembeddedinexturlusagefilearchiveimageusageiwbacklinkslangbacklinkslogeventspagepropnamespageswithpropprefixsearchprotectedtitlesquerypagerandomrecentchangessearchtagsusercontribsuserswatchlistwatchlistraw
meta

Which metadata to get.

値 (|で区切る): allmessagesfilerepoinfositeinfotokensuserinfo
indexpageids

Include an additional pageids section listing all returned page IDs.

export

Export the current revisions of all given or generated pages.

exportnowrap

Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export.

iwurl

Whether to get the full URL if the title is an interwiki link.

continue

When present, formats query-continue as key-value pairs that should simply be merged into the original request. This parameter must be set to an empty string in the initial query.

This parameter is recommended for all new development, and will be made default in the next API version.

rawcontinue

Currently ignored. In the future, continue will become the default and this will be needed to receive the raw query-continue data.

titles

A list of titles to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
pageids

A list of page IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
revids

A list of revision IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
generator

Get the list of pages to work on by executing the specified query module.

Note: Generator parameter names must be prefixed with a "g", see examples.

値 (いずれか1つ): allcategoriesalldeletedrevisionsallfileusagesallimagesalllinksallpagesallredirectsalltransclusionsbacklinkscategoriescategorymembersdeletedrevisionsduplicatefilesembeddedinexturlusagefileusageimagesimageusageiwbacklinkslangbacklinkslinkslinksherepageswithpropprefixsearchprotectedtitlesquerypagerandomrecentchangesredirectsrevisionssearchtemplatestranscludedinwatchlistwatchlistraw
redirects

Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.

converttitles

Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan、iu、kk、ku、shi、sr、tg、uz、zh.

prop=categories (cl)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all categories the pages belong to.

パラメーター:
clprop

Which additional properties to get for each category:

sortkey
Adds the sortkey (hexadecimal string) and sortkey prefix (human-readable part) for the category.
timestamp
Adds timestamp of when the category was added.
hidden
Tags categories that are hidden with __HIDDENCAT__.
値 (|で区切る): sortkey、timestamp、hidden
clshow

Which kind of categories to show.

値 (|で区切る): hidden、!hidden
cllimit

How many categories to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
clcontinue

When more results are available, use this to continue.

clcategories

Only list these categories. Useful for checking whether a certain page is in a certain category.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
cldir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
例:
Get a list of categories the page Albert Einstein belongs to.
api.php?action=query&prop=categories&titles=Albert%20Einstein
Get information about all categories used in the page Albert Einstein.
api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info

prop=categoryinfo (ci)

  • このモジュールは読み取りの権限を必要とします。

Returns information about the given categories.

パラメーター:
cicontinue

When more results are available, use this to continue.

例:
Get information about Category:Foo and Category:Bar.
api.php?action=query&prop=categoryinfo&titles=Category:Foo|Category:Bar

prop=contributors (pc)

  • このモジュールは読み取りの権限を必要とします。

Get the list of logged-in contributors and the count of anonymous contributors to a page.

パラメーター:
pcgroup

Only include users in the given groups. Does not include implicit or auto-promoted groups like *, user, or autoconfirmed.

値 (|で区切る): bot、sysop、bureaucrat
pcexcludegroup

Exclude users in the given groups. Does not include implicit or auto-promoted groups like *, user, or autoconfirmed.

値 (|で区切る): bot、sysop、bureaucrat
pcrights

Only include users having the given rights. Does not include rights granted by implicit or auto-promoted groups like *, user, or autoconfirmed.

値 (|で区切る): apihighlimits、applychangetags、autoconfirmed、autopatrol、bigdelete、block、blockemail、bot、browsearchive、changetags、createaccount、createpage、createtalk、delete、deletedhistory、deletedtext、deletelogentry、deleterevision、edit、editcontentmodel、editinterface、editprotected、editmyoptions、editmyprivateinfo、editmyusercss、editmyuserjs、editmywatchlist、editsemiprotected、editusercssjs、editusercss、edituserjs、hideuser、import、importupload、ipblock-exempt、managechangetags、markbotedits、mergehistory、minoredit、move、movefile、move-categorypages、move-rootuserpages、move-subpages、nominornewtalk、noratelimit、override-export-depth、pagelang、passwordreset、patrol、patrolmarks、protect、proxyunbannable、purge、read、reupload、reupload-own、reupload-shared、rollback、sendemail、siteadmin、suppressionlog、suppressredirect、suppressrevision、unblockself、undelete、unwatchedpages、upload、upload_by_url、userrights、userrights-interwiki、viewmyprivateinfo、viewmywatchlist、viewsuppressed、writeapi
値の最大値は 50 (ボットの場合は 500) です。
pcexcluderights

Exclude users having the given rights. Does not include rights granted by implicit or auto-promoted groups like *, user, or autoconfirmed.

値 (|で区切る): apihighlimits、applychangetags、autoconfirmed、autopatrol、bigdelete、block、blockemail、bot、browsearchive、changetags、createaccount、createpage、createtalk、delete、deletedhistory、deletedtext、deletelogentry、deleterevision、edit、editcontentmodel、editinterface、editprotected、editmyoptions、editmyprivateinfo、editmyusercss、editmyuserjs、editmywatchlist、editsemiprotected、editusercssjs、editusercss、edituserjs、hideuser、import、importupload、ipblock-exempt、managechangetags、markbotedits、mergehistory、minoredit、move、movefile、move-categorypages、move-rootuserpages、move-subpages、nominornewtalk、noratelimit、override-export-depth、pagelang、passwordreset、patrol、patrolmarks、protect、proxyunbannable、purge、read、reupload、reupload-own、reupload-shared、rollback、sendemail、siteadmin、suppressionlog、suppressredirect、suppressrevision、unblockself、undelete、unwatchedpages、upload、upload_by_url、userrights、userrights-interwiki、viewmyprivateinfo、viewmywatchlist、viewsuppressed、writeapi
値の最大値は 50 (ボットの場合は 500) です。
pclimit

How many contributors to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
pccontinue

When more results are available, use this to continue.

例:
Main Page への投稿者を表示する。
api.php?action=query&prop=contributors&titles=Main_Page

prop=deletedrevisions (drv)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Get deleted revision information.

May be used in several ways:

  1. Get deleted revisions for a set of pages, by setting titles or pageids. Ordered by title and timestamp.
  2. Get data about a set of deleted revisions by setting their IDs with revids. Ordered by revision ID.
パラメーター:
drvprop

Which properties to get for each revision:

ids
The ID of the revision.
flags
Revision flags (minor).
timestamp
The timestamp of the revision.
user
User that made the revision.
userid
User ID of the revision creator.
size
Length (bytes) of the revision.
sha1
SHA-1 (base 16) of the revision.
contentmodel
Content model ID of the revision.
comment
Comment by the user for the revision.
parsedcomment
Parsed comment by the user for the revision.
content
Text of the revision.
tags
Tags for the revision.
値 (|で区切る): ids、flags、timestamp、user、userid、size、sha1、contentmodel、comment、parsedcomment、content、tags
既定値: ids|timestamp|flags|comment|user
drvlimit

Limit how many revisions will be returned.

No more than 500 (5,000 for bots) allowed.
drvexpandtemplates

Expand templates in revision content (requires drvprop=content).

drvgeneratexml

Generate XML parse tree for revision content (requires drvprop=content).

drvparse

Parse revision content (requires drvprop=content). For performance reasons, if this option is used, drvlimit is enforced to 1.

drvsection

Only retrieve the content of this section number.

drvdiffto

Revision ID to diff each revision to. Use prev, next and cur for the previous, next and current revision respectively.

drvdifftotext

Text to diff each revision to. Only diffs a limited number of revisions. Overrides drvdiffto. If drvsection is set, only that section will be diffed against this text

drvcontentformat

Serialization format used for drvdifftotext and expected for output of content.

値 (いずれか1つ): text/x-wiki、text/javascript、application/json、text/css、text/plain
drvstart

The timestamp to start enumerating from. Ignored when processing a list of revision IDs.

drvend

The timestamp to stop enumerating at. Ignored when processing a list of revision IDs.

drvdir

In which direction to enumerate:

newer
List oldest first. Note: drvstart has to be before drvend.
older
List newest first (default). Note: drvstart has to be later than drvend.
値 (いずれか1つ): newer、older
既定値: older
drvtag

Only list revisions tagged with this tag.

drvuser

この利用者による版のみを一覧表示。

drvexcludeuser

この利用者による版を一覧表示しない。

drvcontinue

When more results are available, use this to continue.

例:
ページ Main Page および Talk:Main Page の削除された版とその内容を一覧表示する。
api.php?action=query&prop=deletedrevisions&titles=Main%20Page|Talk:Main%20Page&drvprop=user|comment|content
削除された版 123456 に関する情報を一覧表示する。
api.php?action=query&prop=deletedrevisions&revids=123456

prop=duplicatefiles (df)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all files that are duplicates of the given files based on hash values.

パラメーター:
dflimit

How many duplicate files to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
dfcontinue

When more results are available, use this to continue.

dfdir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
dflocalonly

Look only for files in the local repository.

  • このモジュールは読み取りの権限を必要とします。

Returns all external URLs (not interwikis) from the given pages.

パラメーター:
ellimit

How many links to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
eloffset

When more results are available, use this to continue.

elprotocol

Protocol of the URL. If empty and elquery is set, the protocol is http. Leave both this and elquery empty to list all external links.

値 (いずれか1つ): 空欄にするか、または bitcoin、ftp、ftps、geo、git、gopher、http、https、irc、ircs、magnet、mailto、mms、news、nntp、redis、sftp、sip、sips、sms、ssh、svn、tel、telnet、urn、worldwind、xmpp
既定値: (空)
elquery

Search string without protocol. Useful for checking whether a certain page contains a certain external url.

elexpandurl

Expand protocol-relative URLs with the canonical protocol.

例:
Get a list of external links on Main Page.
api.php?action=query&prop=extlinks&titles=Main%20Page

prop=fileusage (fu)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Find all pages that use the given files.

パラメーター:
fuprop

Which properties to get:

pageid
Page ID of each page.
title
Title of each page.
redirect
Flag if the page is a redirect.
値 (|で区切る): pageid、title、redirect
既定値: pageid|title|redirect
funamespace

Only include pages in these namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
fushow

Show only items that meet these criteria:

redirect
Only show redirects.
!redirect
Only show non-redirects.
値 (|で区切る): redirect、!redirect
fulimit

How many to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
fucontinue

When more results are available, use this to continue.

prop=imageinfo (ii)

  • このモジュールは読み取りの権限を必要とします。

Returns file information and upload history.

パラメーター:
iiprop

Which file information to get:

timestamp
Adds timestamp for the uploaded version.
user
Adds the user who uploaded each file version.
userid
Add the user ID that uploaded each file version.
comment
Comment on the version.
parsedcomment
Parse the comment on the version.
canonicaltitle
Adds the canonical title of the file.
url
Gives URL to the file and the description page.
size
Adds the size of the file in bytes and the height, width and page count (if applicable).
dimensions
Alias for size.
sha1
Adds SHA-1 hash for the file.
mime
Adds MIME type of the file.
thumbmime
Adds MIME type of the image thumbnail (requires url and param iiurlwidth).
mediatype
Adds the media type of the file.
metadata
Lists Exif metadata for the version of the file.
commonmetadata
Lists file format generic metadata for the version of the file.
extmetadata
Lists formatted metadata combined from multiple sources. Results are HTML formatted.
archivename
Adds the filename of the archive version for non-latest versions.
bitdepth
Adds the bit depth of the version.
uploadwarning
Used by the Special:Upload page to get information about an existing file. Not intended for use outside MediaWiki core.
値 (|で区切る): timestamp、user、userid、comment、parsedcomment、canonicaltitle、url、size、dimensions、sha1、mime、thumbmime、mediatype、metadata、commonmetadata、extmetadata、archivename、bitdepth、uploadwarning
既定値: timestamp|user
iilimit

How many file revisions to return per file.

No more than 500 (5,000 for bots) allowed.
既定値: 1
iistart

Timestamp to start listing from.

iiend

Timestamp to stop listing at.

iiurlwidth

If iiprop=url is set, a URL to an image scaled to this width will be returned. For performance reasons if this option is used, no more than 50 scaled images will be returned.

既定値: -1
iiurlheight

Similar to iiurlwidth.

既定値: -1
iimetadataversion

Version of metadata to use. If latest is specified, use latest version. Defaults to 1 for backwards compatibility.

既定値: 1
iiextmetadatalanguage

What language to fetch extmetadata in. This affects both which translation to fetch, if multiple are available, as well as how things like numbers and various values are formatted.

既定値: ja
iiextmetadatamultilang

If translations for extmetadata property are available, fetch all of them.

iiextmetadatafilter

If specified and non-empty, only these keys will be returned for iiprop=extmetadata.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
iiurlparam

A handler specific parameter string. For example, PDFs might use page15-100px. iiurlwidth must be used and be consistent with iiurlparam.

既定値: (空)
iicontinue

When more results are available, use this to continue.

iilocalonly

Look only for files in the local repository.

prop=images (im)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Returns all files contained on the given pages.

パラメーター:
imlimit

How many files to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
imcontinue

When more results are available, use this to continue.

imimages

Only list these files. Useful for checking whether a certain page has a certain file.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
imdir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending

prop=info (in)

  • このモジュールは読み取りの権限を必要とします。

ページの基本的な情報を取得します。

パラメーター:
inprop

Which additional properties to get:

protection
それぞれのページの保護レベルを一覧表示する。
talkid
The page ID of the talk page for each non-talk page.
watched
List the watched status of each page.
watchers
The number of watchers, if allowed.
notificationtimestamp
The watchlist notification timestamp of each page.
subjectid
The page ID of the parent page for each talk page.
url
Gives a full URL, an edit URL, and the canonical URL for each page.
readable
Whether the user can read this page.
preload
Gives the text returned by EditFormPreloadText.
displaytitle
Gives the way the page title is actually displayed.
値 (|で区切る): protection、talkid、watched、watchers、notificationtimestamp、subjectid、url、readable、preload、displaytitle
intestactions

Test whether the current user can perform certain actions on the page.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
intoken
廃止予定です。

Use action=query&meta=tokens instead.

値 (|で区切る): edit、delete、protect、move、block、unblock、email、import、watch
incontinue

When more results are available, use this to continue.

例:
Main Page に関する情報を取得する。
api.php?action=query&prop=info&titles=Main%20Page
Get general and protection information about the page Main Page.
api.php?action=query&prop=info&inprop=protection&titles=Main%20Page
  • このモジュールは読み取りの権限を必要とします。

Returns all interwiki links from the given pages.

パラメーター:
iwprop

Which additional properties to get for each interlanguage link:

url
Adds the full URL.
値 (|で区切る): url
iwprefix

Only return interwiki links with this prefix.

iwtitle

Interwiki link to search for. Must be used with iwprefix.

iwdir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
iwlimit

How many interwiki links to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
iwcontinue

When more results are available, use this to continue.

iwurl
廃止予定です。

Whether to get the full URL (cannot be used with iwprop).

例:
Get interwiki links from the page Main Page.
api.php?action=query&prop=iwlinks&titles=Main%20Page
  • このモジュールは読み取りの権限を必要とします。

Returns all interlanguage links from the given pages.

パラメーター:
llprop

Which additional properties to get for each interlanguage link:

url
Adds the full URL.
langname
Adds the localised language name (best effort). Use llinlanguagecode to control the language.
autonym
Adds the native language name.
値 (|で区切る): url、langname、autonym
lllang

Only return language links with this language code.

lltitle

Link to search for. Must be used with lllang.

lldir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
llinlanguagecode

Language code for localised language names.

既定値: ja
lllimit

How many langlinks to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
llcontinue

When more results are available, use this to continue.

llurl
廃止予定です。

Whether to get the full URL (cannot be used with llprop).

例:
Get interlanguage links from the page Main Page.
api.php?action=query&prop=langlinks&titles=Main%20Page&redirects=
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Returns all links from the given pages.

パラメーター:
plnamespace

Show links in these namespaces only.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
pllimit

How many links to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
plcontinue

When more results are available, use this to continue.

pltitles

Only list links to these titles. Useful for checking whether a certain page links to a certain title.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
pldir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
例:
Get links from the page Main Page
api.php?action=query&prop=links&titles=Main%20Page
Get information about the link pages in the page Main Page.
api.php?action=query&generator=links&titles=Main%20Page&prop=info
Get links from the page Main Page in the 利用者 and テンプレート namespaces.
api.php?action=query&prop=links&titles=Main%20Page&plnamespace=2|10

prop=linkshere (lh)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Find all pages that link to the given pages.

パラメーター:
lhprop

Which properties to get:

pageid
Page ID of each page.
title
Title of each page.
redirect
Flag if the page is a redirect.
値 (|で区切る): pageid、title、redirect
既定値: pageid|title|redirect
lhnamespace

Only include pages in these namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
lhshow

Show only items that meet these criteria:

redirect
Only show redirects.
!redirect
Only show non-redirects.
値 (|で区切る): redirect、!redirect
lhlimit

How many to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
lhcontinue

When more results are available, use this to continue.

prop=pageprops (pp)

  • このモジュールは読み取りの権限を必要とします。

Get various properties defined in the page content.

パラメーター:
ppcontinue

When more results are available, use this to continue.

ppprop

Only list these props. Useful for checking whether a certain page uses a certain page prop.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。

prop=redirects (rd)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Returns all redirects to the given pages.

パラメーター:
rdprop

Which properties to get:

pageid
Page ID of each redirect.
title
Title of each redirect.
fragment
Fragment of each redirect, if any.
値 (|で区切る): pageid、title、fragment
既定値: pageid|title
rdnamespace

Only include pages in these namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
rdshow

Show only items that meet these criteria:

fragment
Only show redirects with a fragment.
!fragment
Only show redirects without a fragment.
値 (|で区切る): fragment、!fragment
rdlimit

How many redirects to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
rdcontinue

When more results are available, use this to continue.

prop=revisions (rv)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Get revision information.

May be used in several ways:

  1. Get data about a set of pages (last revision), by setting titles or pageids.
  2. Get revisions for one given page, by using titles or pageids with start, end, or limit.
  3. Get data about a set of revisions by setting their IDs with revids.
パラメーター:
rvprop

Which properties to get for each revision:

ids
The ID of the revision.
flags
Revision flags (minor).
timestamp
The timestamp of the revision.
user
User that made the revision.
userid
User ID of the revision creator.
size
Length (bytes) of the revision.
sha1
SHA-1 (base 16) of the revision.
contentmodel
Content model ID of the revision.
comment
Comment by the user for the revision.
parsedcomment
Parsed comment by the user for the revision.
content
Text of the revision.
tags
Tags for the revision.
値 (|で区切る): ids、flags、timestamp、user、userid、size、sha1、contentmodel、comment、parsedcomment、content、tags
既定値: ids|timestamp|flags|comment|user
rvlimit

Limit how many revisions will be returned.

May only be used with a single page (mode #2).
No more than 500 (5,000 for bots) allowed.
rvexpandtemplates

Expand templates in revision content (requires rvprop=content).

rvgeneratexml

Generate XML parse tree for revision content (requires rvprop=content).

rvparse

Parse revision content (requires rvprop=content). For performance reasons, if this option is used, rvlimit is enforced to 1.

rvsection

Only retrieve the content of this section number.

rvdiffto

Revision ID to diff each revision to. Use prev, next and cur for the previous, next and current revision respectively.

rvdifftotext

Text to diff each revision to. Only diffs a limited number of revisions. Overrides rvdiffto. If rvsection is set, only that section will be diffed against this text

rvcontentformat

Serialization format used for rvdifftotext and expected for output of content.

値 (いずれか1つ): text/x-wiki、text/javascript、application/json、text/css、text/plain
rvstartid

From which revision ID to start enumeration.

May only be used with a single page (mode #2).
rvendid

Stop revision enumeration on this revision ID.

May only be used with a single page (mode #2).
rvstart

From which revision timestamp to start enumeration.

May only be used with a single page (mode #2).
rvend

Enumerate up to this timestamp.

May only be used with a single page (mode #2).
rvdir

In which direction to enumerate:

newer
List oldest first. Note: rvstart has to be before rvend.
older
List newest first (default). Note: rvstart has to be later than rvend.
May only be used with a single page (mode #2).
値 (いずれか1つ): newer、older
既定値: older
rvuser

Only include revisions made by user.

May only be used with a single page (mode #2).
rvexcludeuser

Exclude revisions made by user.

May only be used with a single page (mode #2).
rvtag

Only list revisions tagged with this tag.

rvtoken
廃止予定です。

Which tokens to obtain for each revision.

値 (|で区切る): rollback
rvcontinue

When more results are available, use this to continue.

prop=stashimageinfo (sii)

  • このモジュールは読み取りの権限を必要とします。

Returns file information for stashed files.

パラメーター:
siifilekey

Key that identifies a previous upload that was stashed temporarily.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
siisessionkey
廃止予定です。

Alias for siifilekey, for backward compatibility.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
siiprop

Which file information to get:

timestamp
Adds timestamp for the uploaded version.
canonicaltitle
Adds the canonical title of the file.
url
Gives URL to the file and the description page.
size
Adds the size of the file in bytes and the height, width and page count (if applicable).
dimensions
Alias for size.
sha1
Adds SHA-1 hash for the file.
mime
Adds MIME type of the file.
thumbmime
Adds MIME type of the image thumbnail (requires url and param siiurlwidth).
metadata
Lists Exif metadata for the version of the file.
commonmetadata
Lists file format generic metadata for the version of the file.
extmetadata
Lists formatted metadata combined from multiple sources. Results are HTML formatted.
bitdepth
Adds the bit depth of the version.
値 (|で区切る): timestamp、canonicaltitle、url、size、dimensions、sha1、mime、thumbmime、metadata、commonmetadata、extmetadata、bitdepth
既定値: timestamp|url
siiurlwidth

If siiprop=url is set, a URL to an image scaled to this width will be returned. For performance reasons if this option is used, no more than 50 scaled images will be returned.

既定値: -1
siiurlheight

Similar to siiurlwidth.

既定値: -1
siiurlparam

A handler specific parameter string. For example, PDFs might use page15-100px. siiurlwidth must be used and be consistent with siiurlparam.

既定値: (空)

prop=templates (tl)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Returns all pages transcluded on the given pages.

パラメーター:
tlnamespace

Show templates in this namespaces only.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
tllimit

How many templates to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
tlcontinue

When more results are available, use this to continue.

tltemplates

Only list these templates. Useful for checking whether a certain page uses a certain template.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
tldir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
例:
Get the templates used on the page Main Page.
api.php?action=query&prop=templates&titles=Main%20Page
Get information about the template pages used on Main Page.
api.php?action=query&generator=templates&titles=Main%20Page&prop=info
Get pages in the 利用者 and テンプレート namespaces that are transcluded on the page Main Page.
api.php?action=query&prop=templates&titles=Main%20Page&tlnamespace=2|10

prop=transcludedin (ti)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Find all pages that transclude the given pages.

パラメーター:
tiprop

Which properties to get:

pageid
Page ID of each page.
title
Title of each page.
redirect
Flag if the page is a redirect.
値 (|で区切る): pageid、title、redirect
既定値: pageid|title|redirect
tinamespace

Only include pages in these namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
tishow

Show only items that meet these criteria:

redirect
Only show redirects.
!redirect
Only show non-redirects.
値 (|で区切る): redirect、!redirect
tilimit

How many to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
ticontinue

When more results are available, use this to continue.

例:
Get a list of pages transcluding Main Page.
api.php?action=query&prop=transcludedin&titles=Main%20Page
Get information about pages transcluding Main Page.
api.php?action=query&generator=transcludedin&titles=Main%20Page&prop=info

list=allcategories (ac)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Enumerate all categories.

パラメーター:
acfrom

The category to start enumerating from.

accontinue

When more results are available, use this to continue.

acto

The category to stop enumerating at.

acprefix

Search for all category titles that begin with this value.

acdir

Direction to sort in.

値 (いずれか1つ): ascending、descending
既定値: ascending
acmin

Only return categories with at least this many members.

acmax

Only return categories with at most this many members.

aclimit

How many categories to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
acprop

Which properties to get:

size
Adds number of pages in the category.
hidden
Tags categories that are hidden with __HIDDENCAT__.
値 (|で区切る): size、hidden
既定値: (空)
例:
List categories with information on the number of pages in each.
api.php?action=query&list=allcategories&acprop=size
Retrieve info about the category page itself for categories beginning List.
api.php?action=query&generator=allcategories&gacprefix=List&prop=info

list=alldeletedrevisions (adr)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all deleted revisions by a user or in a namespace.

パラメーター:
adrprop

Which properties to get for each revision:

ids
The ID of the revision.
flags
Revision flags (minor).
timestamp
The timestamp of the revision.
user
User that made the revision.
userid
User ID of the revision creator.
size
Length (bytes) of the revision.
sha1
SHA-1 (base 16) of the revision.
contentmodel
Content model ID of the revision.
comment
Comment by the user for the revision.
parsedcomment
Parsed comment by the user for the revision.
content
Text of the revision.
tags
Tags for the revision.
値 (|で区切る): ids、flags、timestamp、user、userid、size、sha1、contentmodel、comment、parsedcomment、content、tags
既定値: ids|timestamp|flags|comment|user
adrlimit

Limit how many revisions will be returned.

No more than 500 (5,000 for bots) allowed.
adrexpandtemplates

Expand templates in revision content (requires adrprop=content).

adrgeneratexml

Generate XML parse tree for revision content (requires adrprop=content).

adrparse

Parse revision content (requires adrprop=content). For performance reasons, if this option is used, adrlimit is enforced to 1.

adrsection

Only retrieve the content of this section number.

adrdiffto

Revision ID to diff each revision to. Use prev, next and cur for the previous, next and current revision respectively.

adrdifftotext

Text to diff each revision to. Only diffs a limited number of revisions. Overrides adrdiffto. If adrsection is set, only that section will be diffed against this text

adrcontentformat

Serialization format used for adrdifftotext and expected for output of content.

値 (いずれか1つ): text/x-wiki、text/javascript、application/json、text/css、text/plain
adruser

この利用者による版のみを一覧表示する。

adrnamespace

この名前空間に含まれるページのみを一覧表示します。

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
adrstart

The timestamp to start enumerating from.

May only be used with adruser.
adrend

The timestamp to stop enumerating at.

May only be used with adruser.
adrdir

In which direction to enumerate:

newer
List oldest first. Note: adrstart has to be before adrend.
older
List newest first (default). Note: adrstart has to be later than adrend.
値 (いずれか1つ): newer、older
既定値: older
adrfrom

Start listing at this title.

adruser と同時に指定できません。
adrto

Stop listing at this title.

adruser と同時に指定できません。
adrprefix

Search for all page titles that begin with this value.

adruser と同時に指定できません。
adrexcludeuser

この利用者による版を一覧表示しない。

adruser と同時に指定できません。
adrtag

Only list revisions tagged with this tag.

adrcontinue

When more results are available, use this to continue.

adrgeneratetitles

When being used as a generator, generate titles rather than revision IDs.

例:
List the last 50 deleted contributions by user Example.
api.php?action=query&list=alldeletedrevisions&adruser=Example&adrlimit=50
標準名前空間にある削除された最初の50版を一覧表示する。
api.php?action=query&list=alldeletedrevisions&adrdir=newer&adrlimit=50

list=allfileusages (af)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all file usages, including non-existing.

パラメーター:
afcontinue

When more results are available, use this to continue.

affrom

The title of the file to start enumerating from.

afto

The title of the file to stop enumerating at.

afprefix

Search for all file titles that begin with this value.

afunique

Only show distinct file titles. Cannot be used with afprop=ids. When used as a generator, yields target pages instead of source pages.

afprop

Which pieces of information to include:

ids
Adds the page ID of the using page (cannot be used with afunique).
title
Adds the title of the file.
値 (|で区切る): ids、title
既定値: title
aflimit

How many total items to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
afdir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
例:
List file titles, including missing ones, with page IDs they are from, starting at B.
api.php?action=query&list=allfileusages&affrom=B&afprop=ids|title
List unique file titles.
api.php?action=query&list=allfileusages&afunique=&affrom=B
Gets all file titles, marking the missing ones.
api.php?action=query&generator=allfileusages&gafunique=&gaffrom=B
Gets pages containing the files.
api.php?action=query&generator=allfileusages&gaffrom=B

list=allimages (ai)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Enumerate all images sequentially.

パラメーター:
aisort

Property to sort by.

値 (いずれか1つ): name、timestamp
既定値: name
aidir

The direction in which to list.

値 (いずれか1つ): ascending、descending、newer、older
既定値: ascending
aifrom

The image title to start enumerating from. Can only be used with aisort=name.

aito

The image title to stop enumerating at. Can only be used with aisort=name.

aicontinue

When more results are available, use this to continue.

aistart

The timestamp to start enumerating from. Can only be used with aisort=timestamp.

aiend

The timestamp to end enumerating. Can only be used with aisort=timestamp.

aiprop

Which file information to get:

timestamp
Adds timestamp for the uploaded version.
user
Adds the user who uploaded each file version.
userid
Add the user ID that uploaded each file version.
comment
Comment on the version.
parsedcomment
Parse the comment on the version.
canonicaltitle
Adds the canonical title of the file.
url
Gives URL to the file and the description page.
size
Adds the size of the file in bytes and the height, width and page count (if applicable).
dimensions
Alias for size.
sha1
Adds SHA-1 hash for the file.
mime
Adds MIME type of the file.
mediatype
Adds the media type of the file.
metadata
Lists Exif metadata for the version of the file.
commonmetadata
Lists file format generic metadata for the version of the file.
extmetadata
Lists formatted metadata combined from multiple sources. Results are HTML formatted.
bitdepth
Adds the bit depth of the version.
値 (|で区切る): timestamp、user、userid、comment、parsedcomment、canonicaltitle、url、size、dimensions、sha1、mime、mediatype、metadata、commonmetadata、extmetadata、bitdepth
既定値: timestamp|url
aiprefix

Search for all image titles that begin with this value. Can only be used with aisort=name.

aiminsize

Limit to images with at least this many bytes.

aimaxsize

Limit to images with at most this many bytes.

aisha1

SHA1 hash of image. Overrides aisha1base36.

aisha1base36

SHA1 hash of image in base 36 (used in MediaWiki).

aiuser

Only return files uploaded by this user. Can only be used with aisort=timestamp. Cannot be used together with aifilterbots.

aifilterbots

How to filter files uploaded by bots. Can only be used with aisort=timestamp. Cannot be used together with aiuser.

値 (いずれか1つ): all、bots、nobots
既定値: all
aimime

What MIME types to search for, e.g. image/jpeg.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
ailimit

How many images in total to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
例:
Show a list of files starting at the letter B.
api.php?action=query&list=allimages&aifrom=B
Show a list of recently uploaded files, similar to Special:NewFiles.
api.php?action=query&list=allimages&aiprop=user|timestamp|url&aisort=timestamp&aidir=older
Show a list of files with MIME type image/png or image/gif
api.php?action=query&list=allimages&aimime=image/png|image/gif
Show info about 4 files starting at the letter T.
api.php?action=query&generator=allimages&gailimit=4&gaifrom=T&prop=imageinfo
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Enumerate all links that point to a given namespace.

パラメーター:
alcontinue

When more results are available, use this to continue.

alfrom

The title of the link to start enumerating from.

alto

The title of the link to stop enumerating at.

alprefix

Search for all linked titles that begin with this value.

alunique

Only show distinct linked titles. Cannot be used with alprop=ids. When used as a generator, yields target pages instead of source pages.

alprop

Which pieces of information to include:

ids
Adds the page ID of the linking page (cannot be used with alunique).
title
Adds the title of the link.
値 (|で区切る): ids、title
既定値: title
alnamespace

The namespace to enumerate.

値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
既定値: 0
allimit

How many total items to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
aldir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
例:
List linked titles, including missing ones, with page IDs they are from, starting at B.
api.php?action=query&list=alllinks&alfrom=B&alprop=ids|title
List unique linked titles.
api.php?action=query&list=alllinks&alunique=&alfrom=B
Gets all linked titles, marking the missing ones.
api.php?action=query&generator=alllinks&galunique=&galfrom=B
Gets pages containing the links.
api.php?action=query&generator=alllinks&galfrom=B

list=allpages (ap)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Enumerate all pages sequentially in a given namespace.

パラメーター:
apfrom

The page title to start enumerating from.

apcontinue

When more results are available, use this to continue.

apto

The page title to stop enumerating at.

apprefix

Search for all page titles that begin with this value.

apnamespace

The namespace to enumerate.

値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
既定値: 0
apfilterredir

Which pages to list.

値 (いずれか1つ): all、redirects、nonredirects
既定値: all
apminsize

Limit to pages with at least this many bytes.

apmaxsize

Limit to pages with at most this many bytes.

apprtype

Limit to protected pages only.

値 (|で区切る): edit、move、upload
apprlevel

Filter protections based on protection level (must be used with apprtype= parameter).

値 (|で区切る): 空欄にするか、または autoconfirmed、sysop
apprfiltercascade

Filter protections based on cascadingness (ignored when apprtype isn't set).

値 (いずれか1つ): cascading、noncascading、all
既定値: all
aplimit

How many total pages to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
apdir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
apfilterlanglinks

Filter based on whether a page has langlinks. Note that this may not consider langlinks added by extensions.

値 (いずれか1つ): withlanglinks、withoutlanglinks、all
既定値: all
apprexpiry

Which protection expiry to filter the page on:

indefinite
Get only pages with indefinite protection expiry.
definite
Get only pages with a definite (specific) protection expiry.
all
Get pages with any protections expiry.
値 (いずれか1つ): indefinite、definite、all
既定値: all
例:
Show a list of pages starting at the letter B.
api.php?action=query&list=allpages&apfrom=B
Show info about 4 pages starting at the letter T.
api.php?action=query&generator=allpages&gaplimit=4&gapfrom=T&prop=info
Show content of first 2 non-redirect pages beginning at Re.
api.php?action=query&generator=allpages&gaplimit=2&gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content

list=allredirects (ar)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all redirects to a namespace.

パラメーター:
arcontinue

When more results are available, use this to continue.

arfrom

The title of the redirect to start enumerating from.

arto

The title of the redirect to stop enumerating at.

arprefix

Search for all target pages that begin with this value.

arunique

Only show distinct target pages. Cannot be used with arprop=ids|fragment|interwiki. When used as a generator, yields target pages instead of source pages.

arprop

Which pieces of information to include:

ids
Adds the page ID of the redirecting page (cannot be used with arunique).
title
Adds the title of the redirect.
fragment
Adds the fragment from the redirect, if any (cannot be used with arunique).
interwiki
Adds the interwiki prefix from the redirect, if any (cannot be used with arunique).
値 (|で区切る): ids、title、fragment、interwiki
既定値: title
arnamespace

The namespace to enumerate.

値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
既定値: 0
arlimit

How many total items to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
ardir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
例:
List target pages, including missing ones, with page IDs they are from, starting at B.
api.php?action=query&list=allredirects&arfrom=B&arprop=ids|title
List unique target pages.
api.php?action=query&list=allredirects&arunique=&arfrom=B
Gets all target pages, marking the missing ones.
api.php?action=query&generator=allredirects&garunique=&garfrom=B
Gets pages containing the redirects.
api.php?action=query&generator=allredirects&garfrom=B

list=alltransclusions (at)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all transclusions (pages embedded using {{x}}), including non-existing.

パラメーター:
atcontinue

When more results are available, use this to continue.

atfrom

The title of the transclusion to start enumerating from.

atto

The title of the transclusion to stop enumerating at.

atprefix

Search for all transcluded titles that begin with this value.

atunique

Only show distinct transcluded titles. Cannot be used with atprop=ids. When used as a generator, yields target pages instead of source pages.

atprop

Which pieces of information to include:

ids
Adds the page ID of the transcluding page (cannot be used with atunique).
title
Adds the title of the transclusion.
値 (|で区切る): ids、title
既定値: title
atnamespace

The namespace to enumerate.

値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
既定値: 10
atlimit

How many total items to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
atdir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
例:
List transcluded titles, including missing ones, with page IDs they are from, starting at B.
api.php?action=query&list=alltransclusions&atfrom=B&atprop=ids|title
List unique transcluded titles.
api.php?action=query&list=alltransclusions&atunique=&atfrom=B
Gets all transcluded titles, marking the missing ones.
api.php?action=query&generator=alltransclusions&gatunique=&gatfrom=B
Gets pages containing the transclusions.
api.php?action=query&generator=alltransclusions&gatfrom=B

list=allusers (au)

  • このモジュールは読み取りの権限を必要とします。

Enumerate all registered users.

パラメーター:
aufrom

The user name to start enumerating from.

auto

The user name to stop enumerating at.

auprefix

Search for all users that begin with this value.

audir

Direction to sort in.

値 (いずれか1つ): ascending、descending
既定値: ascending
augroup

Only include users in the given groups.

値 (|で区切る): bot、sysop、bureaucrat
auexcludegroup

Exclude users in the given groups.

値 (|で区切る): bot、sysop、bureaucrat
aurights

Only include users with the given rights. Does not include rights granted by implicit or auto-promoted groups like *, user, or autoconfirmed.

値 (|で区切る): apihighlimits、applychangetags、autoconfirmed、autopatrol、bigdelete、block、blockemail、bot、browsearchive、changetags、createaccount、createpage、createtalk、delete、deletedhistory、deletedtext、deletelogentry、deleterevision、edit、editcontentmodel、editinterface、editprotected、editmyoptions、editmyprivateinfo、editmyusercss、editmyuserjs、editmywatchlist、editsemiprotected、editusercssjs、editusercss、edituserjs、hideuser、import、importupload、ipblock-exempt、managechangetags、markbotedits、mergehistory、minoredit、move、movefile、move-categorypages、move-rootuserpages、move-subpages、nominornewtalk、noratelimit、override-export-depth、pagelang、passwordreset、patrol、patrolmarks、protect、proxyunbannable、purge、read、reupload、reupload-own、reupload-shared、rollback、sendemail、siteadmin、suppressionlog、suppressredirect、suppressrevision、unblockself、undelete、unwatchedpages、upload、upload_by_url、userrights、userrights-interwiki、viewmyprivateinfo、viewmywatchlist、viewsuppressed、writeapi
値の最大値は 50 (ボットの場合は 500) です。
auprop

Which pieces of information to include:

blockinfo
Adds the information about a current block on the user.
groups
Lists groups that the user is in. This uses more server resources and may return fewer results than the limit.
implicitgroups
Lists all the groups the user is automatically in.
rights
Lists rights that the user has.
editcount
Adds the edit count of the user.
registration
Adds the timestamp of when the user registered if available (may be blank).
値 (|で区切る): blockinfo、groups、implicitgroups、rights、editcount、registration
aulimit

How many total user names to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
auwitheditsonly

Only list users who have made edits.

auactiveusers

Only list users active in the last 30 days.

例:
List users starting at Y.
api.php?action=query&list=allusers&aufrom=Y
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Find all pages that link to the given page.

パラメーター:
bltitle

Title to search. Cannot be used together with blpageid.

blpageid

Page ID to search. Cannot be used together with bltitle.

blcontinue

When more results are available, use this to continue.

blnamespace

The namespace to enumerate.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
bldir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
blfilterredir

How to filter for redirects. If set to nonredirects when blredirect is enabled, this is only applied to the second level.

値 (いずれか1つ): all、redirects、nonredirects
既定値: all
bllimit

How many total pages to return. If blredirect is enabled, limit applies to each level separately (which means up to 2 * bllimit results may be returned).

No more than 500 (5,000 for bots) allowed.
既定値: 10
blredirect

If linking page is a redirect, find all pages that link to that redirect as well. Maximum limit is halved.

list=blocks (bk)

  • このモジュールは読み取りの権限を必要とします。

List all blocked users and IP addresses.

パラメーター:
bkstart

The timestamp to start enumerating from.

bkend

The timestamp to stop enumerating at.

bkdir

In which direction to enumerate:

newer
List oldest first. Note: bkstart has to be before bkend.
older
List newest first (default). Note: bkstart has to be later than bkend.
値 (いずれか1つ): newer、older
既定値: older
bkids

List of block IDs to list (optional).

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
bkusers

List of users to search for (optional).

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
bkip

Get all blocks applying to this IP or CIDR range, including range blocks. Cannot be used together with bkusers. CIDR ranges broader than IPv4/16 or IPv6/19 are not accepted.

bklimit

The maximum number of blocks to list.

No more than 500 (5,000 for bots) allowed.
既定値: 10
bkprop

Which properties to get:

id
Adds the ID of the block.
user
Adds the username of the blocked user.
userid
Adds the user ID of the blocked user.
by
Adds the username of the blocking user.
byid
Adds the user ID of the blocking user.
timestamp
Adds the timestamp of when the block was given.
expiry
Adds the timestamp of when the block expires.
reason
Adds the reason given for the block.
range
Adds the range of IP addresses affected by the block.
flags
Tags the ban with (autoblock, anononly, etc.).
値 (|で区切る): id、user、userid、by、byid、timestamp、expiry、reason、range、flags
既定値: id|user|by|timestamp|expiry|reason|flags
bkshow

Show only items that meet these criteria. For example, to see only indefinite blocks on IP addresses, set bkshow=ip|!temp.

値 (|で区切る): account、!account、temp、!temp、ip、!ip、range、!range
bkcontinue

When more results are available, use this to continue.

list=categorymembers (cm)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all pages in a given category.

パラメーター:
cmtitle

Which category to enumerate (required). Must include the カテゴリ: prefix. Cannot be used together with cmpageid.

cmpageid

Page ID of the category to enumerate. Cannot be used together with cmtitle.

cmprop

Which pieces of information to include:

ids
Adds the page ID.
title
Adds the title and namespace ID of the page.
sortkey
Adds the sortkey used for sorting in the category (hexadecimal string).
sortkeyprefix
Adds the sortkey prefix used for sorting in the category (human-readable part of the sortkey).
type
Adds the type that the page has been categorised as (page, subcat or file).
timestamp
Adds the timestamp of when the page was included.
値 (|で区切る): ids、title、sortkey、sortkeyprefix、type、timestamp
既定値: ids|title
cmnamespace

Only include pages in these namespaces. Note that cmtype=subcat or cmtype=file may be used instead of cmnamespace=14 or 6.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
cmtype

Which type of category members to include. Ignored when cmsort=timestamp is set.

値 (|で区切る): page、subcat、file
既定値: page|subcat|file
cmcontinue

When more results are available, use this to continue.

cmlimit

The maximum number of pages to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
cmsort

Property to sort by.

値 (いずれか1つ): sortkey、timestamp
既定値: sortkey
cmdir

In which direction to sort.

値 (いずれか1つ): asc、desc、ascending、descending、newer、older
既定値: ascending
cmstart

Timestamp to start listing from. Can only be used with cmsort=timestamp.

cmend

Timestamp to end listing at. Can only be used with cmsort=timestamp.

cmstarthexsortkey

Sortkey to start listing from, as returned by cmprop=sortkey. Can only be used with cmsort=sortkey.

cmendhexsortkey

Sortkey to end listing from, as returned by cmprop=sortkey. Can only be used with cmsort=sortkey.

cmstartsortkeyprefix

Sortkey prefix to start listing from. Can only be used with cmsort=sortkey. Overrides cmstarthexsortkey.

cmendsortkeyprefix

Sortkey prefix to end listing BEFORE (not at, if this value occurs it will not be included!). Can only be used with cmsort=sortkey. Overrides cmendhexsortkey.

cmstartsortkey
廃止予定です。

Use cmstarthexsortkey instead.

cmendsortkey
廃止予定です。

Use cmendhexsortkey instead.

例:
Category:Physics に含まれる最初の10ページを取得する。
api.php?action=query&list=categorymembers&cmtitle=Category:Physics
Category:Physics に含まれる最初の10ページのページ情報を取得する。
api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info

list=deletedrevs (dr)

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

List deleted revisions.

Operates in three modes:

  1. List deleted revisions for the given titles, sorted by timestamp.
  2. List deleted contributions for the given user, sorted by timestamp (no titles specified).
  3. List all deleted revisions in the given namespace, sorted by title and timestamp (no titles specified, druser not set).

Certain parameters only apply to some modes and are ignored in others.

パラメーター:
drstart

The timestamp to start enumerating from.

Modes: 1、2
drend

The timestamp to stop enumerating at.

Modes: 1、2
drdir

In which direction to enumerate:

newer
List oldest first. Note: drstart has to be before drend.
older
List newest first (default). Note: drstart has to be later than drend.
Modes: 1、3
値 (いずれか1つ): newer、older
既定値: older
drfrom

Start listing at this title.

Mode: 3
drto

Stop listing at this title.

Mode: 3
drprefix

Search for all page titles that begin with this value.

Mode: 3
drunique

List only one revision for each page.

Mode: 3
drnamespace

Only list pages in this namespace.

Mode: 3
値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
既定値: 0
drtag

Only list revisions tagged with this tag.

druser

Only list revisions by this user.

drexcludeuser

Don't list revisions by this user.

drprop

Which properties to get:

revid
Adds the revision ID of the deleted revision.
parentid
Adds the revision ID of the previous revision to the page.
user
Adds the user who made the revision.
userid
Adds the user ID whom made the revision.
comment
Adds the comment of the revision.
parsedcomment
Adds the parsed comment of the revision.
minor
Tags if the revision is minor.
len
Adds the length (bytes) of the revision.
sha1
Adds the SHA-1 (base 16) of the revision.
content
Adds the content of the revision.
token
Deprecated. Gives the edit token.
tags
Tags for the revision.
値 (|で区切る): revid、parentid、user、userid、comment、parsedcomment、minor、len、sha1、content、token、tags
既定値: user|comment
drlimit

The maximum amount of revisions to list.

No more than 500 (5,000 for bots) allowed.
既定値: 10
drcontinue

When more results are available, use this to continue.

例:
List the last deleted revisions of the pages Main Page and Talk:Main Page, with content (mode 1).
api.php?action=query&list=deletedrevs&titles=Main%20Page|Talk:Main%20Page&drprop=user|comment|content
List the last 50 deleted contributions by Bob (mode 2).
api.php?action=query&list=deletedrevs&druser=Bob&drlimit=50
List the first 50 deleted revisions in the main namespace (mode 3).
api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50
List the first 50 deleted pages in the トーク namespace (mode 3).
api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50&drnamespace=1&drunique=

list=embeddedin (ei)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Find all pages that embed (transclude) the given title.

パラメーター:
eititle

Title to search. Cannot be used together with eipageid.

eipageid

Page ID to search. Cannot be used together with eititle.

eicontinue

When more results are available, use this to continue.

einamespace

The namespace to enumerate.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
eidir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
eifilterredir

How to filter for redirects.

値 (いずれか1つ): all、redirects、nonredirects
既定値: all
eilimit

How many total pages to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
例:
Show pages transcluding Template:Stub.
api.php?action=query&list=embeddedin&eititle=Template:Stub
Get information about pages transcluding Template:Stub.
api.php?action=query&generator=embeddedin&geititle=Template:Stub&prop=info

list=exturlusage (eu)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Enumerate pages that contain a given URL.

パラメーター:
euprop

Which pieces of information to include:

ids
Adds the ID of page.
title
Adds the title and namespace ID of the page.
url
Adds the URL used in the page.
値 (|で区切る): ids、title、url
既定値: ids|title|url
euoffset

When more results are available, use this to continue.

euprotocol

Protocol of the URL. If empty and euquery set, the protocol is http. Leave both this and euquery empty to list all external links.

値 (いずれか1つ): 空欄にするか、または bitcoin、ftp、ftps、geo、git、gopher、http、https、irc、ircs、magnet、mailto、mms、news、nntp、redis、sftp、sip、sips、sms、ssh、svn、tel、telnet、urn、worldwind、xmpp
既定値: (空)
euquery

Search string without protocol. See Special:LinkSearch. Leave empty to list all external links.

eunamespace

The page namespaces to enumerate.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
eulimit

How many pages to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
euexpandurl

Expand protocol-relative URLs with the canonical protocol.

list=filearchive (fa)

  • このモジュールは読み取りの権限を必要とします。

Enumerate all deleted files sequentially.

パラメーター:
fafrom

The image title to start enumerating from.

fato

The image title to stop enumerating at.

faprefix

Search for all image titles that begin with this value.

fadir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
fasha1

SHA1 hash of image. Overrides fasha1base36.

fasha1base36

SHA1 hash of image in base 36 (used in MediaWiki).

faprop

Which image information to get:

sha1
Adds SHA-1 hash for the image.
timestamp
Adds timestamp for the uploaded version.
user
Adds user who uploaded the image version.
size
Adds the size of the image in bytes and the height, width and page count (if applicable).
dimensions
Alias for size.
description
Adds description the image version.
parseddescription
Parse the description on the version.
mime
Adds MIME of the image.
mediatype
Adds the media type of the image.
metadata
Lists Exif metadata for the version of the image.
bitdepth
Adds the bit depth of the version.
archivename
Adds the filename of the archive version for non-latest versions.
値 (|で区切る): sha1、timestamp、user、size、dimensions、description、parseddescription、mime、mediatype、metadata、bitdepth、archivename
既定値: timestamp
falimit

How many images to return in total.

No more than 500 (5,000 for bots) allowed.
既定値: 10
facontinue

When more results are available, use this to continue.

例:
Show a list of all deleted files.
api.php?action=query&list=filearchive

list=imageusage (iu)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Find all pages that use the given image title.

パラメーター:
iutitle

Title to search. Cannot be used together with iupageid.

iupageid

Page ID to search. Cannot be used together with iutitle.

iucontinue

When more results are available, use this to continue.

iunamespace

The namespace to enumerate.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
iudir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
iufilterredir

How to filter for redirects. If set to nonredirects when iuredirect is enabled, this is only applied to the second level.

値 (いずれか1つ): all、redirects、nonredirects
既定値: all
iulimit

How many total pages to return. If iuredirect is enabled, the limit applies to each level separately (which means up to 2 * iulimit results may be returned).

No more than 500 (5,000 for bots) allowed.
既定値: 10
iuredirect

If linking page is a redirect, find all pages that link to that redirect as well. Maximum limit is halved.

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Find all pages that link to the given interwiki link.

Can be used to find all links with a prefix, or all links to a title (with a given prefix). Using neither parameter is effectively "all interwiki links".

パラメーター:
iwblprefix

Prefix for the interwiki.

iwbltitle

Interwiki link to search for. Must be used with iwblblprefix.

iwblcontinue

When more results are available, use this to continue.

iwbllimit

How many total pages to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
iwblprop

Which properties to get:

iwprefix
Adds the prefix of the interwiki.
iwtitle
Adds the title of the interwiki.
値 (|で区切る): iwprefix、iwtitle
既定値: (空)
iwbldir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Find all pages that link to the given language link.

Can be used to find all links with a language code, or all links to a title (with a given language). Using neither parameter is effectively "all language links".

Note that this may not consider language links added by extensions.

パラメーター:
lbllang

Language for the language link.

lbltitle

Language link to search for. Must be used with lbllang.

lblcontinue

When more results are available, use this to continue.

lbllimit

How many total pages to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
lblprop

Which properties to get:

lllang
Adds the language code of the language link.
lltitle
Adds the title of the language link.
値 (|で区切る): lllang、lltitle
既定値: (空)
lbldir

The direction in which to list.

値 (いずれか1つ): ascending、descending
既定値: ascending
例:
fr:Test へリンクしているページを取得する。
api.php?action=query&list=langbacklinks&lbltitle=Test&lbllang=fr
fr:Test へリンクしているページの情報を取得する。
api.php?action=query&generator=langbacklinks&glbltitle=Test&glbllang=fr&prop=info

list=logevents (le)

  • このモジュールは読み取りの権限を必要とします。

Get events from logs.

パラメーター:
leprop

Which properties to get:

ids
Adds the ID of the log event.
title
Adds the title of the page for the log event.
type
Adds the type of log event.
user
Adds the user responsible for the log event.
userid
Adds the user ID who was responsible for the log event.
timestamp
Adds the timestamp for the event.
comment
Adds the comment of the event.
parsedcomment
Adds the parsed comment of the event.
details
Lists additional details about the event.
tags
Lists tags for the event.
値 (|で区切る): ids、title、type、user、userid、timestamp、comment、parsedcomment、details、tags
既定値: ids|title|type|user|timestamp|comment|details
letype

Filter log entries to only this type.

値 (いずれか1つ): 空欄にするか、または block、protect、rights、delete、upload、move、import、patrol、merge、suppress、tag、managetags、newusers
leaction

Filter log actions to only this action. Overrides letype. Wildcard actions like action/* allows to specify any string for the asterisk.

値 (いずれか1つ): protect/protect、protect/modify、protect/unprotect、protect/move_prot、move/move、move/move_redir、delete/delete、delete/restore、delete/revision、delete/event、suppress/revision、suppress/event、suppress/delete、patrol/patrol、rights/rights、rights/autopromote、upload/upload、upload/overwrite、upload/revert、merge/merge、tag/update、managetags/create、managetags/delete、managetags/activate、managetags/deactivate、block/block、block/unblock、block/reblock、suppress/block、suppress/reblock、import/upload、import/interwiki、newusers/newusers、newusers/create、newusers/create2、newusers/byemail、newusers/autocreate
lestart

The timestamp to start enumerating from.

leend

The timestamp to end enumerating.

ledir

In which direction to enumerate:

newer
List oldest first. Note: lestart has to be before leend.
older
List newest first (default). Note: lestart has to be later than leend.
値 (いずれか1つ): newer、older
既定値: older
leuser

Filter entries to those made by the given user.

letitle

Filter entries to those related to a page.

lenamespace

Filter entries to those in the given namespace.

値 (いずれか1つ): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
leprefix

Filter entries that start with this prefix.

letag

Only list event entries tagged with this tag.

lelimit

How many total event entries to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
lecontinue

When more results are available, use this to continue.

例:
List recent log events.
api.php?action=query&list=logevents

list=pagepropnames (ppn)

  • このモジュールは読み取りの権限を必要とします。

List all page property names in use on the wiki.

パラメーター:
ppncontinue

When more results are available, use this to continue.

ppnlimit

The maximum number of names to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
例:
Get first 10 property names.
api.php?action=query&list=pagepropnames

list=pageswithprop (pwp)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all pages using a given page property.

パラメーター:
pwppropname

Page prop for which to enumerate pages.

このパラメーターは必須です。
pwpprop

Which pieces of information to include:

ids
Adds the page ID.
title
Adds the title and namespace ID of the page.
value
Adds the value of the page prop.
値 (|で区切る): ids、title、value
既定値: ids|title
pwpcontinue

When more results are available, use this to continue.

pwplimit

The maximum number of pages to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
pwpdir

In which direction to sort.

値 (いずれか1つ): ascending、descending
既定値: ascending

list=prefixsearch (ps)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Perform a prefix search for page titles.

パラメーター:
pssearch

Search string.

このパラメーターは必須です。
psnamespace

Namespaces to search.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
既定値: 0
pslimit

Maximum number of results to return.

No more than 100 (200 for bots) allowed.
既定値: 10
psoffset

Number of results to skip.

既定値: 0
例:
Search for page titles beginning with meaning.
api.php?action=query&list=prefixsearch&pssearch=meaning

list=protectedtitles (pt)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

List all titles protected from creation.

パラメーター:
ptnamespace

Only list titles in these namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
ptlevel

Only list titles with these protection levels.

値 (|で区切る): autoconfirmed、sysop
ptlimit

How many total pages to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
ptdir

In which direction to enumerate:

newer
List oldest first. Note: ptstart has to be before ptend.
older
List newest first (default). Note: ptstart has to be later than ptend.
値 (いずれか1つ): newer、older
既定値: older
ptstart

Start listing at this protection timestamp.

ptend

Stop listing at this protection timestamp.

ptprop

Which properties to get:

timestamp
Adds the timestamp of when protection was added.
user
Adds the user that added the protection.
userid
Adds the user ID that added the protection.
comment
Adds the comment for the protection.
parsedcomment
Adds the parsed comment for the protection.
expiry
Adds the timestamp of when the protection will be lifted.
level
Adds the protection level.
値 (|で区切る): timestamp、user、userid、comment、parsedcomment、expiry、level
既定値: timestamp|level
ptcontinue

When more results are available, use this to continue.

例:
List protected titles.
api.php?action=query&list=protectedtitles
Find links to protected titles in the main namespace.
api.php?action=query&generator=protectedtitles&gptnamespace=0&prop=linkshere

list=querypage (qp)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Get a list provided by a QueryPage-based special page.

パラメーター:
qppage

The name of the special page. Note, this is case sensitive.

このパラメーターは必須です。
値 (いずれか1つ): Ancientpages、BrokenRedirects、Deadendpages、DoubleRedirects、ListDuplicatedFiles、Listredirects、Lonelypages、Longpages、MediaStatistics、Mostcategories、Mostimages、Mostinterwikis、Mostlinkedcategories、Mostlinkedtemplates、Mostlinked、Mostrevisions、Fewestrevisions、Shortpages、Uncategorizedcategories、Uncategorizedpages、Uncategorizedimages、Uncategorizedtemplates、Unusedcategories、Unusedimages、Wantedcategories、Wantedfiles、Wantedpages、Wantedtemplates、Unwatchedpages、Unusedtemplates、Withoutinterwiki
qpoffset

When more results are available, use this to continue.

既定値: 0
qplimit

Number of results to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10

list=random (rn)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Get a set of random pages.

Pages are listed in a fixed sequence, only the starting point is random. This means that if, for example, Main Page is the first random page in the list, List of fictional monkeys will always be second, List of people on stamps of Vanuatu third, etc.

If the number of pages in the namespace is lower than rnlimit, fewer pages will be returned. The same page will not be returned twice.

パラメーター:
rnnamespace

Return pages in these namespaces only.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
rnlimit

Limit how many random pages will be returned.

No more than 10 (20 for bots) allowed.
既定値: 1
rnredirect

Load a random redirect instead of a random page.

例:
Return two random pages from the main namespace.
api.php?action=query&list=random&rnnamespace=0&rnlimit=2
Return page info about two random pages from the main namespace.
api.php?action=query&generator=random&grnnamespace=0&grnlimit=2&prop=info

list=recentchanges (rc)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Enumerate recent changes.

パラメーター:
rcstart

The timestamp to start enumerating from.

rcend

The timestamp to end enumerating.

rcdir

In which direction to enumerate:

newer
List oldest first. Note: rcstart has to be before rcend.
older
List newest first (default). Note: rcstart has to be later than rcend.
値 (いずれか1つ): newer、older
既定値: older
rcnamespace

Filter changes to only these namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
rcuser

Only list changes by this user.

rcexcludeuser

Don't list changes by this user.

rctag

Only list changes tagged with this tag.

rcprop

Include additional pieces of information:

user
Adds the user responsible for the edit and tags if they are an IP.
userid
Adds the user ID responsible for the edit.
comment
Adds the comment for the edit.
parsedcomment
Adds the parsed comment for the edit.
flags
Adds flags for the edit.
timestamp
Adds timestamp of the edit.
title
Adds the page title of the edit.
ids
Adds the page ID, recent changes ID and the new and old revision ID.
sizes
Adds the new and old page length in bytes.
redirect
Tags edit if page is a redirect.
patrolled
Tags patrollable edits as being patrolled or unpatrolled.
loginfo
Adds log information (log ID, log type, etc) to log entries.
tags
Lists tags for the entry.
sha1
Adds the content checksum for entries associated with a revision.
値 (|で区切る): user、userid、comment、parsedcomment、flags、timestamp、title、ids、sizes、redirect、patrolled、loginfo、tags、sha1
既定値: title|timestamp|ids
rctoken
廃止予定です。

Use action=query&meta=tokens instead.

値 (|で区切る): patrol
rcshow

Show only items that meet these criteria. For example, to see only minor edits done by logged-in users, set rcshow=minor|!anon.

値 (|で区切る): minor、!minor、bot、!bot、anon、!anon、redirect、!redirect、patrolled、!patrolled、unpatrolled
rclimit

How many total changes to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
rctype

Which types of changes to show.

値 (|で区切る): edit、external、new、log
既定値: edit|new|log
rctoponly

Only list changes which are the latest revision.

rccontinue

When more results are available, use this to continue.

list=search (sr)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Perform a full text search.

パラメーター:
srsearch

Search for all page titles (or content) that have this value.

このパラメーターは必須です。
srnamespace

Search only within these namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
既定値: 0
srwhat

Which type of search to perform.

値 (いずれか1つ): title、text、nearmatch
srinfo

Which metadata to return.

値 (|で区切る): totalhits、suggestion
既定値: totalhits|suggestion
srprop

Which properties to return:

size
Adds the size of the page in bytes.
wordcount
Adds the word count of the page.
timestamp
Adds the timestamp of when the page was last edited.
snippet
Adds a parsed snippet of the page.
titlesnippet
Adds a parsed snippet of the page title.
redirectsnippet
Adds a parsed snippet of the redirect title.
redirecttitle
Adds the title of the matching redirect.
sectionsnippet
Adds a parsed snippet of the matching section title.
sectiontitle
Adds the title of the matching section.
score
Deprecated and ignored.
hasrelated
Deprecated and ignored.
値 (|で区切る): size、wordcount、timestamp、score、snippet、titlesnippet、redirecttitle、redirectsnippet、sectiontitle、sectionsnippet、hasrelated
既定値: size|wordcount|timestamp|snippet
sroffset

When more results are available, use this to continue.

既定値: 0
srlimit

How many total pages to return.

No more than 50 (500 for bots) allowed.
既定値: 10
srinterwiki

Include interwiki results in the search, if available.

list=tags (tg)

  • このモジュールは読み取りの権限を必要とします。

List change tags.

パラメーター:
tgcontinue

When more results are available, use this to continue.

tglimit

The maximum number of tags to list.

No more than 500 (5,000 for bots) allowed.
既定値: 10
tgprop

Which properties to get:

name
Adds name of tag.
displayname
Adds system message for the tag.
description
Adds description of the tag.
hitcount
Adds the number of revisions and log entries that have this tag.
defined
Indicate whether the tag is defined.
source
Gets the sources of the tag, which may include extension for extension-defined tags and manual for tags that may be applied manually by users.
active
Whether the tag is still being applied.
値 (|で区切る): name、displayname、description、hitcount、defined、source、active
既定値: name

list=usercontribs (uc)

  • このモジュールは読み取りの権限を必要とします。

Get all edits by a user.

パラメーター:
uclimit

The maximum number of contributions to return.

No more than 500 (5,000 for bots) allowed.
既定値: 10
ucstart

The start timestamp to return from.

ucend

The end timestamp to return to.

uccontinue

When more results are available, use this to continue.

ucuser

The users to retrieve contributions for.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
ucuserprefix

Retrieve contributions for all users whose names begin with this value. Overrides ucuser.

ucdir

In which direction to enumerate:

newer
List oldest first. Note: ucstart has to be before ucend.
older
List newest first (default). Note: ucstart has to be later than ucend.
値 (いずれか1つ): newer、older
既定値: older
ucnamespace

Only list contributions in these namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
ucprop

Include additional pieces of information:

ids
Adds the page ID and revision ID.
title
Adds the title and namespace ID of the page.
timestamp
Adds the timestamp of the edit.
comment
Adds the comment of the edit.
parsedcomment
Adds the parsed comment of the edit.
size
Adds the new size of the edit.
sizediff
Adds the size delta of the edit against its parent.
flags
Adds flags of the edit.
patrolled
Tags patrolled edits.
tags
Lists tags for the edit.
値 (|で区切る): ids、title、timestamp、comment、parsedcomment、size、sizediff、flags、patrolled、tags
既定値: ids|title|timestamp|comment|size|flags
ucshow

Show only items that meet these criteria, e.g. non minor edits only: ucshow=!minor.

If ucshow=patrolled or ucshow=!patrolled is set, revisions older than $wgRCMaxAge (7776000 seconds) won't be shown.

値 (|で区切る): minor、!minor、patrolled、!patrolled、top、!top、new、!new
uctag

Only list revisions tagged with this tag.

uctoponly
廃止予定です。

Only list changes which are the latest revision.

例:
Show contributions of user Example.
api.php?action=query&list=usercontribs&ucuser=Example
Show contributions from all IP addresses with prefix 192.0.2..
api.php?action=query&list=usercontribs&ucuserprefix=192.0.2.

list=users (us)

  • このモジュールは読み取りの権限を必要とします。

Get information about a list of users.

パラメーター:
usprop

Which pieces of information to include:

blockinfo
Tags if the user is blocked, by whom, and for what reason.
groups
Lists all the groups each user belongs to.
implicitgroups
Lists all the groups a user is automatically a member of.
rights
Lists all the rights each user has.
editcount
Adds the user's edit count.
registration
Adds the user's registration timestamp.
emailable
Tags if the user can and wants to receive email through Special:Emailuser.
gender
Tags the gender of the user. Returns "male", "female", or "unknown".
値 (|で区切る): blockinfo、groups、implicitgroups、rights、editcount、registration、emailable、gender
ususers

A list of users to obtain information for.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
ustoken
廃止予定です。

Use action=query&meta=tokens instead.

値 (|で区切る): userrights

list=watchlist (wl)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Get recent changes to pages in the current user's watchlist.

パラメーター:
wlallrev

Include multiple revisions of the same page within given timeframe.

wlstart

The timestamp to start enumerating from.

wlend

The timestamp to end enumerating.

wlnamespace

Filter changes to only the given namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
wluser

Only list changes by this user.

wlexcludeuser

Don't list changes by this user.

wldir

In which direction to enumerate:

newer
List oldest first. Note: wlstart has to be before wlend.
older
List newest first (default). Note: wlstart has to be later than wlend.
値 (いずれか1つ): newer、older
既定値: older
wllimit

How many total results to return per request.

No more than 500 (5,000 for bots) allowed.
既定値: 10
wlprop

Which additional items to get:

ids
Adds revision IDs and page IDs.
title
Adds title of the page.
flags
Adds flags for the edit.
user
Adds the user who made the edit.
userid
Adds user ID of whom made the edit.
comment
Adds comment of the edit.
parsedcomment
Adds parsed comment of the edit.
timestamp
Adds timestamp of the edit.
patrol
Tags edits that are patrolled.
sizes
Adds the old and new lengths of the page.
notificationtimestamp
Adds timestamp of when the user was last notified about the edit.
loginfo
Adds log information where appropriate.
値 (|で区切る): ids、title、flags、user、userid、comment、parsedcomment、timestamp、patrol、sizes、notificationtimestamp、loginfo
既定値: ids|title|flags
wlshow

Show only items that meet these criteria. For example, to see only minor edits done by logged-in users, set wlshow=minor|!anon.

値 (|で区切る): minor、!minor、bot、!bot、anon、!anon、patrolled、!patrolled、unread、!unread
wltype

Which types of changes to show:

edit
Regular page edits.
external
External changes.
new
Page creations.
log
Log entries.
値 (|で区切る): edit、external、new、log
既定値: edit|new|log
wlowner

Used along with wltoken to access a different user's watchlist.

wltoken

A security token (available in the user's preferences) to allow access to another user's watchlist.

wlcontinue

When more results are available, use this to continue.

例:
List the top revision for recently changed pages on the current user's watchlist.
api.php?action=query&list=watchlist
Fetch additional information about the top revision for recently changed pages on the current user's watchlist.
api.php?action=query&list=watchlist&wlprop=ids|title|timestamp|user|comment
Fetch information about all recent changes to pages on the current user's watchlist.
api.php?action=query&list=watchlist&wlallrev=&wlprop=ids|title|timestamp|user|comment
Fetch page info for recently changed pages on the current user's watchlist.
api.php?action=query&generator=watchlist&prop=info
Fetch revision info for recent changes to pages on the current user's watchlist.
api.php?action=query&generator=watchlist&gwlallrev=&prop=revisions&rvprop=timestamp|user
List the top revision for recently changed pages on the watchlist of user Example.
api.php?action=query&list=watchlist&wlowner=Example&wltoken=123ABC

list=watchlistraw (wr)

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。

Get all pages on the current user's watchlist.

パラメーター:
wrcontinue

When more results are available, use this to continue.

wrnamespace

Only list pages in the given namespaces.

値 (|で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
wrlimit

How many total results to return per request.

No more than 500 (5,000 for bots) allowed.
既定値: 10
wrprop

Which additional properties to get:

changed
Adds timestamp of when the user was last notified about the edit.
値 (|で区切る): changed
wrshow

Only list items that meet these criteria.

値 (|で区切る): changed、!changed
wrowner

Used along with wrtoken to access a different user's watchlist.

wrtoken

A security token (available in the user's preferences) to allow access to another user's watchlist.

wrdir

In which direction to enumerate:

newer
List oldest first. Note: wrstart has to be before wrend.
older
List newest first (default). Note: wrstart has to be later than wrend.
値 (いずれか1つ): ascending、descending
既定値: ascending
例:
List pages on the current user's watchlist.
api.php?action=query&list=watchlistraw
Fetch page info for pages on the current user's watchlist.
api.php?action=query&generator=watchlistraw&gwrshow=changed&prop=info

meta=allmessages (am)

  • このモジュールは読み取りの権限を必要とします。

Return messages from this site.

パラメーター:
ammessages

Which messages to output. * (default) means all messages.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
既定値: *
amprop

Which properties to get.

値 (|で区切る): default
amenableparser

Set to enable parser, will preprocess the wikitext of message (substitute magic words, handle templates, etc.).

amnocontent

If set, do not include the content of the messages in the output.

amincludelocal

Also include local messages, i.e. messages that don't exist in the software but do exist as a MediaWiki: page. This lists all MediaWiki: pages, so it will also list those that aren't really messages such as Common.js.

amargs

Arguments to be substituted into message.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
amfilter

Return only messages with names that contain this string.

amcustomised

Return only messages in this customisation state.

値 (いずれか1つ): all、modified、unmodified
既定値: all
amlang

Return messages in this language.

amfrom

Return messages starting at this message.

amto

Return messages ending at this message.

amtitle

Page name to use as context when parsing message (for amenableparser option).

amprefix

Return messages with this prefix.

meta=filerepoinfo (fri)

  • このモジュールは読み取りの権限を必要とします。

Return meta information about image repositories configured on the wiki.

パラメーター:
friprop

Which repository properties to get (there may be more available on some wikis):

apiurl
URL to the repository API - helpful for getting image info from the host.
name
The key of the repository - used in e.g. $wgForeignFileRepos and imageinfo return values.
displayname
The human-readable name of the repository wiki.
rooturl
Root URL for image paths.
local
Whether that repository is the local one or not.
値 (|で区切る): name、displayname、rootUrl、local、url、thumbUrl、initialCapital、scriptDirUrl、scriptExtension、favicon
既定値: name|displayname|rootUrl|local|url|thumbUrl|initialCapital|scriptDirUrl|scriptExtension|favicon

meta=siteinfo (si)

  • このモジュールは読み取りの権限を必要とします。

Return general information about the site.

パラメーター:
siprop

Which information to get:

general
Overall system information.
namespaces
List of registered namespaces and their canonical names.
namespacealiases
List of registered namespace aliases.
specialpagealiases
List of special page aliases.
magicwords
List of magic words and their aliases.
statistics
Returns site statistics.
interwikimap
Returns interwiki map (optionally filtered, optionally localised by using siinlanguagecode).
dbrepllag
Returns database server with the highest replication lag.
usergroups
Returns user groups and the associated permissions.
libraries
Returns libraries installed on the wiki.
extensions
Returns extensions installed on the wiki.
fileextensions
Returns list of file extensions allowed to be uploaded.
rightsinfo
Returns wiki rights (license) information if available.
restrictions
Returns information on available restriction (protection) types.
languages
Returns a list of languages MediaWiki supports (optionally localised by using siinlanguagecode).
skins
Returns a list of all enabled skins (optionally localised by using siinlanguagecode, otherwise in the content language).
extensiontags
Returns a list of parser extension tags.
functionhooks
Returns a list of parser function hooks.
showhooks
Returns a list of all subscribed hooks (contents of $wgHooks).
variables
Returns a list of variable IDs.
protocols
Returns a list of protocols that are allowed in external links.
defaultoptions
Returns the default values for user preferences.
値 (|で区切る): general、namespaces、namespacealiases、specialpagealiases、magicwords、interwikimap、dbrepllag、statistics、usergroups、libraries、extensions、fileextensions、rightsinfo、restrictions、languages、skins、extensiontags、functionhooks、showhooks、variables、protocols、defaultoptions
既定値: general
sifilteriw

Return only local or only nonlocal entries of the interwiki map.

値 (いずれか1つ): local、!local
sishowalldb

List all database servers, not just the one lagging the most.

sinumberingroup

Lists the number of users in user groups.

siinlanguagecode

Language code for localised language names (best effort) and skin names.

meta=tokens

  • このモジュールは読み取りの権限を必要とします。

Gets tokens for data-modifying actions.

パラメーター:
type

Types of token to request.

値 (|で区切る): csrf、patrol、rollback、userrights、watch
既定値: csrf
例:
Retrieve a csrf token (the default).
api.php?action=query&meta=tokens
Retrieve a watch token and a patrol token.
api.php?action=query&meta=tokens&type=watch|patrol

meta=userinfo (ui)

  • このモジュールは読み取りの権限を必要とします。

Get information about the current user.

パラメーター:
uiprop

Which pieces of information to include:

blockinfo
Tags if the current user is blocked, by whom, and for what reason.
hasmsg
Adds a tag message if the current user has pending messages.
groups
Lists all the groups the current user belongs to.
implicitgroups
Lists all the groups the current user is automatically a member of.
rights
Lists all the rights the current user has.
changeablegroups
Lists the groups the current user can add to and remove from.
options
Lists all preferences the current user has set.
preferencestoken
Deprecated. Get a token to change current user's preferences.
editcount
Adds the current user's edit count.
ratelimits
Lists all rate limits applying to the current user.
realname
Adds the user's real name.
email
Adds the user's email address and email authentication date.
acceptlang
Echoes the Accept-Language header sent by the client in a structured format.
registrationdate
Adds the user's registration date.
unreadcount
Adds the count of unread pages on the user's watchlist (maximum 999; returns 1000+ if more).
値 (|で区切る): blockinfo、hasmsg、groups、implicitgroups、rights、changeablegroups、options、preferencestoken、editcount、ratelimits、email、realname、acceptlang、registrationdate、unreadcount
例:
Get information about the current user.
api.php?action=query&meta=userinfo
Get additional information about the current user.
api.php?action=query&meta=userinfo&uiprop=blockinfo|groups|rights|hasmsg

action=revisiondelete

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Delete and undelete revisions.

パラメーター:
type

Type of revision deletion being performed.

このパラメーターは必須です。
値 (いずれか1つ): revision、archive、oldimage、filearchive、logging
target

Page title for the revision deletion, if required for the type.

ids

Identifiers for the revisions to be deleted.

このパラメーターは必須です。
複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
hide

What to hide for each revision.

値 (|で区切る): content、comment、user
show

What to unhide for each revision.

値 (|で区切る): content、comment、user
suppress

Whether to suppress data from administrators as well as others.

値 (いずれか1つ): yes、no、nochange
既定値: nochange
reason

Reason for the deletion or undeletion.

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=rollback

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Undo the last edit to the page.

If the last user who edited the page made multiple edits in a row, they will all be rolled back.

パラメーター:
title

Title of the page to roll back. Cannot be used together with pageid.

pageid

Page ID of the page to roll back. Cannot be used together with title.

user

Name of the user whose edits are to be rolled back.

このパラメーターは必須です。
summary

Custom edit summary. If empty, default summary will be used.

既定値: (空)
markbot

Mark the reverted edits and the revert as bot edits.

watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

値 (いずれか1つ): watch、unwatch、preferences、nochange
既定値: preferences
token

action=query&meta=tokens から取得した「rollback」トークン

For compatibility, the token used in the web UI is also accepted.

このパラメーターは必須です。
例:
Roll back the last edits to page Main Page by user Example.
api.php?action=rollback&title=Main%20Page&user=Example&token=123ABC
Roll back the last edits to page Main Page by IP user 192.0.2.5 with summary Reverting vandalism, and mark those edits and the revert as bot edits.
api.php?action=rollback&title=Main%20Page&user=192.0.2.5&token=123ABC&summary=Reverting%20vandalism&markbot=1

action=rsd

(main | rsd)

Export an RSD (Really Simple Discovery) schema.

例:
Export the RSD schema.
api.php?action=rsd

action=setnotificationtimestamp

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Update the notification timestamp for watched pages.

This affects the highlighting of changed pages in the watchlist and history, and the sending of email when the "Email me when a page on my watchlist is changed" preference is enabled.

パラメーター:
entirewatchlist

Work on all watched pages.

timestamp

Timestamp to which to set the notification timestamp.

torevid

Revision to set the notification timestamp to (one page only).

newerthanrevid

Revision to set the notification timestamp newer than (one page only).

continue

When more results are available, use this to continue.

titles

A list of titles to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
pageids

A list of page IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
revids

A list of revision IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
generator

Get the list of pages to work on by executing the specified query module.

Note: Generator parameter names must be prefixed with a "g", see examples.

値 (いずれか1つ): allcategoriesalldeletedrevisionsallfileusagesallimagesalllinksallpagesallredirectsalltransclusionsbacklinkscategoriescategorymembersdeletedrevisionsduplicatefilesembeddedinexturlusagefileusageimagesimageusageiwbacklinkslangbacklinkslinkslinksherepageswithpropprefixsearchprotectedtitlesquerypagerandomrecentchangesredirectsrevisionssearchtemplatestranscludedinwatchlistwatchlistraw
redirects

Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.

converttitles

Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan、iu、kk、ku、shi、sr、tg、uz、zh.

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。
例:
Reset the notification status for the entire watchlist.
api.php?action=setnotificationtimestamp&entirewatchlist=&token=123ABC
Reset the notification status for Main page.
api.php?action=setnotificationtimestamp&titles=Main_page&token=123ABC
Set the notification timestamp for Main page so all edits since 1 January 2012 are unviewed.
api.php?action=setnotificationtimestamp&titles=Main_page&timestamp=2012-01-01T00:00:00Z&token=123ABC
Reset the notification status for pages in the 利用者 namespace.
api.php?action=setnotificationtimestamp&generator=allpages&gapnamespace=2&token=123ABC

action=stashedit

  • このモジュールは内部的または不安定です。動作が予告なく変更される場合があります。
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。
パラメーター:
title
(説明なし)
このパラメーターは必須です。
section
(説明なし)
sectiontitle
(説明なし)
text
(説明なし)
このパラメーターは必須です。
contentmodel
(説明なし)
このパラメーターは必須です。
値 (いずれか1つ): wikitext、javascript、json、css、text
contentformat
(説明なし)
このパラメーターは必須です。
値 (いずれか1つ): text/x-wiki、text/javascript、application/json、text/css、text/plain
baserevid
(説明なし)
このパラメーターは必須です。
token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=tag

(main | tag)
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Add or remove change tags from individual revisions or log entries.

パラメーター:
rcid

One or more recent changes IDs from which to add or remove the tag.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
revid

One or more revision IDs from which to add or remove the tag.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
logid

One or more log entry IDs from which to add or remove the tag.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
add

Tags to add. Only manually defined tags can be added.

値 (|で区切る):
remove

Tags to remove. Only tags that are either manually defined or completely undefined can be removed.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
reason

Reason for the change.

既定値: (空)
token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。
例:
Add the vandalism tag from revision ID 123 without specifying a reason
api.php?action=tag&revid=123&add=vandalism&token=123ABC
Remove the spam tag from log entry ID 123 with the reason Wrongly applied
api.php?action=tag&logid=123&remove=spam&reason=Wrongly+applied&token=123ABC

action=tokens

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

Get tokens for data-modifying actions.

This module is deprecated in favor of action=query&meta=tokens.

パラメーター:
type

Types of token to request.

値 (|で区切る): block、delete、edit、email、import、move、options、patrol、protect、unblock、watch
既定値: edit
例:
Retrieve an edit token (the default).
api.php?action=tokens
Retrieve an email token and a move token.
api.php?action=tokens&type=email|move

action=unblock

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Unblock a user.

パラメーター:
id

ID of the block to unblock (obtained through list=blocks). Cannot be used together with user.

user

Username, IP address or IP range to unblock. Cannot be used together with id.

reason

Reason for unblock.

既定値: (空)
token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。
例:
Unblock block ID #105.
api.php?action=unblock&id=105
Unblock user Bob with reason Sorry Bob.
api.php?action=unblock&user=Bob&reason=Sorry%20Bob

action=undelete

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Restore revisions of a deleted page.

A list of deleted revisions (including timestamps) can be retrieved through list=deletedrevs, and a list of deleted file IDs can be retrieved through list=filearchive.

パラメーター:
title

Title of the page to restore.

このパラメーターは必須です。
reason

Reason for restoring.

既定値: (空)
timestamps

Timestamps of the revisions to restore. If both timestamps and fileids are empty, all will be restored.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
fileids

IDs of the file revisions to restore. If both timestamps and fileids are empty, all will be restored.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

値 (いずれか1つ): watch、unwatch、preferences、nochange
既定値: preferences
token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=upload

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Upload a file, or get the status of pending uploads.

Several methods are available:

  • Upload file contents directly, using the file parameter.
  • Upload the file in pieces, using the filesize, chunk, and offset parameters.* Have the MediaWiki server fetch a file from a URL, using the url parameter.
  • Complete an earlier upload that failed due to warnings, using the filekey parameter.

Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when sending the file.

パラメーター:
filename

Target filename.

comment

Upload comment. Also used as the initial page text for new files if text is not specified.

既定値: (空)
text

Initial page text for new files.

watch
廃止予定です。

Watch the page.

watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

値 (いずれか1つ): watch、preferences、nochange
既定値: preferences
ignorewarnings

Ignore any warnings.

file

File contents.

multipart/form-data 形式でファイルをアップロードしてください。
url

URL to fetch the file from.

filekey

Key that identifies a previous upload that was stashed temporarily.

sessionkey
廃止予定です。

Same as filekey, maintained for backward compatibility.

stash

If set, the server will stash the file temporarily instead of adding it to the repository.

filesize

Filesize of entire upload.

offset

Offset of chunk in bytes.

chunk

Chunk contents.

multipart/form-data 形式でファイルをアップロードしてください。
async

Make potentially large file operations asynchronous when possible.

asyncdownload

Make fetching a URL asynchronous.

leavemessage

If asyncdownload is used, leave a message on the user talk page if finished.

statuskey

Fetch the upload status for this file key (upload by URL).

checkstatus

Only fetch the upload status for the given file key.

token

action=query&meta=tokens から取得した「csrf」トークン

このパラメーターは必須です。

action=userrights

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Change a user's group membership.

パラメーター:
user

User name.

userid

User ID.

add

Add the user to these groups.

値 (|で区切る): bot、sysop、bureaucrat
remove

Remove the user from these groups.

値 (|で区切る): bot、sysop、bureaucrat
reason

Reason for the change.

既定値: (空)
token

action=query&meta=tokens から取得した「userrights」トークン

For compatibility, the token used in the web UI is also accepted.

このパラメーターは必須です。
例:
Add user FooBot to group bot, and remove from groups sysop and bureaucrat.
api.php?action=userrights&user=FooBot&add=bot&remove=sysop|bureaucrat&token=123ABC
Add the user with ID 123 to group bot, and remove from groups sysop and bureaucrat.
api.php?action=userrights&userid=123&add=bot&remove=sysop|bureaucrat&token=123ABC

action=watch

  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Add or remove pages from the current user's watchlist.

パラメーター:
title
廃止予定です。

The page to (un)watch. Use titles instead.

unwatch

If set the page will be unwatched rather than watched.

continue

When more results are available, use this to continue.

titles

A list of titles to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
pageids

A list of page IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
revids

A list of revision IDs to work on.

複数の値は | で区切ってください。 値の最大値は 50 (ボットの場合は 500) です。
generator

Get the list of pages to work on by executing the specified query module.

Note: Generator parameter names must be prefixed with a "g", see examples.

値 (いずれか1つ): allcategoriesalldeletedrevisionsallfileusagesallimagesalllinksallpagesallredirectsalltransclusionsbacklinkscategoriescategorymembersdeletedrevisionsduplicatefilesembeddedinexturlusagefileusageimagesimageusageiwbacklinkslangbacklinkslinkslinksherepageswithpropprefixsearchprotectedtitlesquerypagerandomrecentchangesredirectsrevisionssearchtemplatestranscludedinwatchlistwatchlistraw
redirects

Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.

converttitles

Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan、iu、kk、ku、shi、sr、tg、uz、zh.

token

action=query&meta=tokens から取得した「watch」トークン

このパラメーターは必須です。

format=dbg

(main | dbg)
  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを PHP の var_export() 形式で出力します。

例:
クエリの結果を DBG 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=dbg

format=dbgfm

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを PHP の var_export() 形式 (HTML に埋め込んだ形式) で出力します。

例:
クエリの結果を DBG 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=dbgfm

format=dump

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを PHP の var_dump() 形式で出力します。

例:
クエリの結果を DUMP 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=dump

format=dumpfm

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを PHP の var_dump() 形式 (HTML に埋め込んだ形式) で出力します。

例:
クエリの結果を DUMP 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=dumpfm

format=json

  • このモジュールは読み取りの権限を必要とします。

データを JSON 形式で出力します。

パラメーター:
callback

指定すると、指定した関数呼び出しで出力をラップします。安全のため、利用者固有のデータはすべて制限されます。

utf8

指定すると、大部分の非 ASCII 文字 (すべてではありません) を、16 進のエスケープ シーケンスに置換する代わりに UTF-8 として符号化します。

ascii

If specified, encodes all non-ASCII using hexadecimal escape sequences. Default when formatversion is 1.

formatversion

Output formatting:

1
Backwards-compatible format (XML-style booleans, * keys for content nodes, etc.).
2
Experimental modern format. Details may change!
latest
Use the latest format (currently 2), may change without warning.
値 (いずれか1つ): 1、2、latest
既定値: 1
例:
クエリの結果を JSON 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=json

format=jsonfm

  • このモジュールは読み取りの権限を必要とします。

データを JSON 形式 (HTML に埋め込んだ形式) で出力します。

パラメーター:
callback

指定すると、指定した関数呼び出しで出力をラップします。安全のため、利用者固有のデータはすべて制限されます。

utf8

指定すると、大部分の非 ASCII 文字 (すべてではありません) を、16 進のエスケープ シーケンスに置換する代わりに UTF-8 として符号化します。

ascii

If specified, encodes all non-ASCII using hexadecimal escape sequences. Default when formatversion is 1.

formatversion

Output formatting:

1
Backwards-compatible format (XML-style booleans, * keys for content nodes, etc.).
2
Experimental modern format. Details may change!
latest
Use the latest format (currently 2), may change without warning.
値 (いずれか1つ): 1、2、latest
既定値: 1
例:
クエリの結果を JSON 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=jsonfm

format=none

  • このモジュールは読み取りの権限を必要とします。

何も出力しません。

例:
クエリの結果を NONE 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=none

format=php

(main | php)
  • このモジュールは読み取りの権限を必要とします。

データを PHP のシリアル化した形式で出力します。

パラメーター:
formatversion

Output formatting:

1
Backwards-compatible format (XML-style booleans, * keys for content nodes, etc.).
2
Experimental modern format. Details may change!
latest
Use the latest format (currently 2), may change without warning.
値 (いずれか1つ): 1、2、latest
既定値: 1
例:
クエリの結果を PHP 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=php

format=phpfm

  • このモジュールは読み取りの権限を必要とします。

データを PHP のシリアル化した形式 (HTML に埋め込んだ形式) で出力します。

パラメーター:
formatversion

Output formatting:

1
Backwards-compatible format (XML-style booleans, * keys for content nodes, etc.).
2
Experimental modern format. Details may change!
latest
Use the latest format (currently 2), may change without warning.
値 (いずれか1つ): 1、2、latest
既定値: 1
例:
クエリの結果を PHP 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=phpfm

format=rawfm

  • このモジュールは読み取りの権限を必要とします。

データをデバッグ要素付きで JSON 形式 (HTML に埋め込んだ形式) で出力します。

例:
クエリの結果を RAW 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=rawfm

format=txt

(main | txt)
  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを PHP の print_r() 形式で出力します。

例:
クエリの結果を TXT 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=txt

format=txtfm

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを PHP の print_r() 形式 (HTML に埋め込んだ形式) で出力します。

例:
クエリの結果を TXT 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=txtfm

format=wddx

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを WDDX 形式で出力します。

例:
クエリの結果を WDDX 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=wddx

format=wddxfm

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを WDDX 形式 (HTML に埋め込んだ形式) で出力します。

例:
クエリの結果を WDDX 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=wddxfm

format=xml

(main | xml)
  • このモジュールは読み取りの権限を必要とします。

データを XML 形式で出力します。

パラメーター:
xslt

指定すると、スタイルシートとして <xslt> を追加します。MediaWiki 名前空間の、ページ名の末尾が ".xsl" のウィキページに対して使用すべきです。

includexmlnamespace

指定すると、XML 名前空間を追加します。

例:
クエリの結果を XML 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=xml

format=xmlfm

  • このモジュールは読み取りの権限を必要とします。

データを XML 形式 (HTML に埋め込んだ形式) で出力します。

パラメーター:
xslt

指定すると、スタイルシートとして <xslt> を追加します。MediaWiki 名前空間の、ページ名の末尾が ".xsl" のウィキページに対して使用すべきです。

includexmlnamespace

指定すると、XML 名前空間を追加します。

例:
クエリの結果を XML 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=xmlfm

format=yaml

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを YAML 形式で出力します。

パラメーター:
callback

指定すると、指定した関数呼び出しで出力をラップします。安全のため、利用者固有のデータはすべて制限されます。

utf8

指定すると、大部分の非 ASCII 文字 (すべてではありません) を、16 進のエスケープ シーケンスに置換する代わりに UTF-8 として符号化します。

ascii

If specified, encodes all non-ASCII using hexadecimal escape sequences. Default when formatversion is 1.

formatversion

Output formatting:

1
Backwards-compatible format (XML-style booleans, * keys for content nodes, etc.).
2
Experimental modern format. Details may change!
latest
Use the latest format (currently 2), may change without warning.
値 (いずれか1つ): 1、2、latest
既定値: 1
例:
クエリの結果を YAML 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=yaml

format=yamlfm

  • このモジュールは廃止予定です。
  • このモジュールは読み取りの権限を必要とします。

データを YAML 形式 (HTML に埋め込んだ形式) で出力します。

パラメーター:
callback

指定すると、指定した関数呼び出しで出力をラップします。安全のため、利用者固有のデータはすべて制限されます。

utf8

指定すると、大部分の非 ASCII 文字 (すべてではありません) を、16 進のエスケープ シーケンスに置換する代わりに UTF-8 として符号化します。

ascii

If specified, encodes all non-ASCII using hexadecimal escape sequences. Default when formatversion is 1.

formatversion

Output formatting:

1
Backwards-compatible format (XML-style booleans, * keys for content nodes, etc.).
2
Experimental modern format. Details may change!
latest
Use the latest format (currently 2), may change without warning.
値 (いずれか1つ): 1、2、latest
既定値: 1
例:
クエリの結果を YAML 形式に整形します
api.php?action=query&meta=siteinfo&siprop=namespaces&format=yamlfm

クレジット

API の開発者:

  • Roan Kattouw (2007年9月-2009年の主任開発者)
  • Victor Vasiliev
  • Bryan Tong Minh
  • Sam Reed
  • Yuri Astrakhan (作成者、2006年9月-2007年9月の主任開発者)
  • Brad Jorsch (2013年-現在の主任開発者)

コメント、提案、質問は mediawiki-api@lists.wikimedia.org にお送りください。 バグはこちらへご報告ください: https://phabricator.wikimedia.org/