API:REST API/Search

Search pages
Searches wiki page titles and contents for the provided search terms, and returns matching pages. This endpoint responds to the presence of a logged-in user and returns search results appropriate to that user's permissions.

This endpoint uses the search engine configured in the $wgSearchType configuration setting and returns results in the namespaces configured by $wgNamespacesToBeSearchedDefault.

Autocomplete page title
Searches wiki page titles, and returns matches between the beginning of a title and the provided search terms. You can use this endpoint for a typeahead search that automatically suggests relevant pages by title. This endpoint responds to the presence of a logged-in user and returns search results appropriate to that user's permissions.

This endpoint uses the search engine configured in the $wgSearchType configuration setting and returns results in the namespaces configured by $wgNamespacesToBeSearchedDefault.

Results may differ depending on the configured search backend. While the default backend only applies basic case folding and prefix matches, more advanced backends may apply more complex variations. In the case of CirrusSearch for instance, matches are based on the Elastic Search completion suggester.