MediaWiki API ヘルプ

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

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

list=random (rn)

(main | query | random)
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。
  • ソース: MediaWiki
  • ライセンス: GPL-2.0-or-later

ランダムなページのセットを取得します。

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.

パラメーター:
その他一般パラメーターが利用可能です。
rnnamespace

この名前空間にあるページのみを返します。

値 (| または別の文字列で区切る): 0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
すべての値を指定するには、*を用いてください。
rnfilterredir

転送ページを絞り込む方法。

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

Limit to pages with at least this many bytes.

型: 整数
rnmaxsize

Limit to pages with at most this many bytes.

型: 整数
rncontentmodel

Filter pages that have the specified content model.

値 (次の値のいずれか1つ): css、javascript、json、text、unknown、wikitext
rnredirect
廃止予定です。

代わりに rnfilterredir=redirects を使用してください。

型: 真偽値 (詳細)
rnlimit

返す無作為なページの数を制限する。

型: 整数または max
値は1以上500以下です。
既定: 1
rncontinue

When more results are available, use this to continue. More detailed information on how to continue queries can be found on mediawiki.org.

例:
標準名前空間から2つのページを無作為に返す。
api.php?action=query&list=random&rnnamespace=0&rnlimit=2 [サンドボックスで開く]
標準名前空間から無作為に選ばれた2つのページのページ情報を返す。
api.php?action=query&generator=random&grnnamespace=0&grnlimit=2&prop=info [サンドボックスで開く]
Return page info about one random page from the main namespace that has at least 500 bytes of text.
api.php?action=query&list=random&rnnamespace=0&rnlimit=1&minsize=500 [サンドボックスで開く]