API:Search

Parameters

 * – What metadata to return.
 * Values (separate with '|'): totalhits, suggestion

Default: totalhits|suggestion
 * Type: one of totalhits, suggestion

No more than 50 (500 for bots) allowed.
 * – How many total pages to return.

Default: 10

Type: limit Maximum number of values 50 (500 for bots)
 * – The namespace(s) to enumerate (separate multiple values with '|').

Default: 0

Type: namespace Default: 0
 * – Use this value to continue paging (return by query).

Type: integer Default: $wgSearchType
 * – Class name of search backend to use

Type: string
 * – What properties to return:
 * size            - Adds the size of the page in bytes
 * wordcount       - Adds the word count of the page
 * timestamp       - Adds the timestamp of when the page was last edited
 * score           - Adds the score (if any) from the search engine
 * snippet         - Adds a parsed snippet of the page
 * titlesnippet    - Adds a parsed snippet of the page title
 * redirectsnippet - Adds a parsed snippet of the redirect
 * redirecttitle   - Adds a parsed snippet of the redirect title
 * sectionsnippet  - Adds a parsed snippet of the matching section
 * sectiontitle    - Adds a parsed snippet of the matching section title
 * hasrelated      - Indicates whether a related search is available
 * Values (separate with '|'): size, wordcount, timestamp</tt>, score</tt>, snippet</tt>, titlesnippet</tt>, redirecttitle</tt>, redirectsnippet</tt>, sectiontitle</tt>, sectionsnippet</tt>, hasrelated</tt>

Default: size|wordcount|timestamp|snippet

Type: one of size</tt>, wordcount</tt>, timestamp</tt>, score</tt>, snippet</tt>, titlesnippet</tt>, redirecttitle</tt>, <tt>redirectsnippet</tt>, <tt>sectiontitle</tt>, <tt>sectionsnippet</tt>, <tt>hasrelated</tt>
 * – Include redirect pages in the search. Removed in MW 1.23 and redirects are always included . Type: bool
 * – Search for all page titles (or content) that has this value . Type: string
 * – Search inside the text or titles :
 * title - Search in page titles (default) (if search engine doesn't support title searches, such as Lucene which is used by Wikipedia, then  falls back to  )
 * text - Search in page text
 * nearmatch - Search for the exact title

Error Codes

 * invalidtitle – Bad title "key".
 * invalidtitle – Bad title "title".
 * nosearch – The search parameter must be set.
 * This was param-search before 1.17
 * readapidenied – You need read permission to use this module.
 * search-text-disabled – text search is disabled.
 * search-title-disabled – title search is disabled.