MediaWiki API ヘルプ

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

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

list=random (rn)

(main | query | random)
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。
  • Source: MediaWiki
  • License: GPL-2.0+

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.

パラメーター:
rnnamespace

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

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

How to filter for redirects.

値 (次の値のいずれか1つ): all、redirects、nonredirects
既定値: nonredirects
rnredirect
廃止予定です。

Use rnfilterredir=redirects instead.

Type: boolean (details)
rnlimit

Limit how many random pages will be returned.

No more than 500 (5,000 for bots) allowed.
Type: integer or max
既定値: 1
rncontinue

When more results are available, use this to continue.

例:
標準名前空間から2つのページを無作為に返す。
api.php?action=query&list=random&rnnamespace=0&rnlimit=2
標準名前空間から無作為に選ばれた2つのページのページ情報を返す。
api.php?action=query&generator=random&grnnamespace=0&grnlimit=2&prop=info