MediaWiki API 說明

此頁為自動產生的 MediaWiki API 說明文件頁面。

說明文件與範例:https://www.mediawiki.org/wiki/API

list=prefixsearch <pre>(ps) </pre>

(main | query | prefixsearch)
  • 此模組需要讀取權限。
  • 此模块可作为发生器使用。
  • 来源:MediaWiki
  • 许可协议:GPL-2.0+

为页面标题执行前缀搜索。

Despite the similarity in names, this module is not intended to be equivalent to Special:PrefixIndex; for that, see action=query&list=allpages with the apprefix parameter. The purpose of this module is similar to action=opensearch: to take user input and provide the best-matching titles. Depending on the search engine backend, this might include typo correction, redirect avoidance, or other heuristics.

參數:
pssearch

搜索字符串。

此參數為必填。
psnamespace

搜索的名字空间。

多值 (以 | 分隔):0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15、102、103、108、109、274、275、2300、2301、2302、2303
預設值:0
pslimit

回傳的結果數量上限。

不允許超過 100 (機器人為 200)。
类型:整数或max
預設值:10
psoffset

跳过的结果数。

类型:整数
預設值:0
範例:
搜索以meaning开头的页面标题。
api.php?action=query&list=prefixsearch&pssearch=meaning [在沙盒中打开]