Справка MediaWiki API

Это автоматически сгенерированная страница документации MediaWiki API.

Документация и примеры: https://www.mediawiki.org/wiki/API


(main | allsites)
  • Этот модуль требует прав на чтение.
  • Источник: AllSites
  • Лицензия: GPL-2.0-or-later

Get Stats and information about sites hosted on the wiki farm. There are several ways to control the amount of data returned.

  1. Use lastModified to constrain the data by date.
  2. Use siteKey to constrain the data to a specific wiki.
  3. Use filter to control the data points returned. This can be combined with lastModified or siteKey.

Filter Syntax:

The filter syntax is a combination of array keys separated by commas and pipes to represent array structure. Ex: wikis|wiki_name,wiki_domain would return an array of wiki_name and wiki_domain under the wikis array.

See Example section for more information.


All Sites query to perform. This defaults to getSiteStats if no do param is provided. This is a place holder for API expansion.


Only return wikis modified after the date and time specified (unix timestamp).

Тип: целое число

Only return data for the specified site. This is the key provided for each wiki as md5_key in the data for each wiki.


Deprecated in favor of siteKey which does not modify the data structure.


Filter data points using a special syntax to represent array structure. Specify array keys separated by commas (,) and pipes (|) to indicate the array level.

Разделяйте значения с помощью | или альтернативного разделителя. Максимально разрешённое количество значений — 50 (500 для ботов).
Get all site stats and wikis currently in the the wiki farm System.
api.php?action=allsites&format=json&formatversion=2 [открыть в песочнице]
Get all site stats and wikis that have been modified after Tuesday, August 21, 2018 2:58:29 PM GMT-05:00 DST.
api.php?action=allsites&format=json&formatversion=2&lastModified=1534881509 [открыть в песочнице]
Get a specific site by its site key. This is returned as the md5_key in the initial data set.
api.php?action=allsites&format=json&formatversion=2&siteKey=814eff22aaa6e6bd72c91dfd23730bcf [открыть в песочнице]
Filter the data set to specific keys to reduce that amount of data returned. This can be combined with other parameters.
api.php?action=allsites&format=json&formatversion=2&filter=totals,wikis|ss_total_wikis,wiki_name,wiki_domain,wiki_category,wiki_tags [открыть в песочнице]