MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
list=random (rn)
- Denna modul kräver läsrättigheter.
- Denna modul kan användas som en generator.
- Source: MediaWiki
- License: GPL-2.0-or-later
Hämta en uppsättning slumpsidor.
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
Return pages in these namespaces only.
- Värden (separerade med | eller alternativ): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 730, 731, 828, 829
- To specify all values, use *.
- rnfilterredir
How to filter for redirects.
- Ett av följande värden: all, nonredirects, redirects
- Standard: nonredirects
- rnminsize
Limit to pages with at least this many bytes.
- Typ: heltal
- rnmaxsize
Limit to pages with at most this many bytes.
- Typ: heltal
- rncontentmodel
Filter pages that have the specified content model.
- Ett av följande värden: GadgetDefinition, Scribunto, css, javascript, json, sanitized-css, text, unknown, wikitext
- rnredirect
- Föråldrad.
Use rnfilterredir=redirects instead.
- Type: boolean (details)
- rnlimit
Limit how many random pages will be returned.
- Type: integer or max
- Värdet måste ligga mellan 1 och 500.
- Standard: 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.
- Return two random pages from the main namespace.
- api.php?action=query&list=random&rnnamespace=0&rnlimit=2 [open in sandbox]
- Return page info about two random pages from the main namespace.
- api.php?action=query&generator=random&grnnamespace=0&grnlimit=2&prop=info [open in sandbox]
- 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 [open in sandbox]