Wikipedia uses apowerful search engine, with asearch box on every page. The search box will navigate directly to a givenpage name upon an exact match. But, you canforce it to show you other pages that include yoursearch string by including a tilde character~ anywhere in the query. The maximum search string is 300 characters long.[a] However, search can instantly search all 63,542,945 pages on the wiki when the search is kept to a simple word or two.
Wikipedia's searches can be made domain-specific (i.e., search in desired namespaces). The search engine also supportsspecial characters andparameters to extend the power of searches and allow users to make theirsearch strings more specific.
Advanced features of the Wikipedia search engine include multi-word proximity-searches (in which the user indicates how close the words in a phrase might be), wildcard searches, "fuzzy"~ searches (handles typo-correction and questionable spelling), and several wiki-oriented operators and parameters for weighting and filtering. Search can also handleregular expressions, a sophisticated exact-string and string-pattern search tool that is not offered by most public search engines.
Search can also filter results by template names used,category membership, or pages linking to a specific page.
Screenshot of search box as in Vector 2022 default skin (as of 7 January 2025)Vector (2010) legacy skin, search box.Monobook places this search-box in the left toolbox.
The search box is an input box with the placeholder text "Search Wikipedia" in it. In Wikipedia's defaultVector 2022 skin, it is located in the header of the page at the top of the screen.
To use the search box, click in it, or jump to it by pressing⇧ Shift+Alt+F, and type in yoursearch string. Then, either click↵ Enter, or theSearch button.
If your search matches apage name exactly, search willnavigate to the page directly instead of showing search results. To getsearch results instead, prepend the first word of the search string (i.e., the page name) with a tilde ("~"). (Or choose "Search for pages containing" from the suggestions that drop down as you type.)
In the former default skinVector, the search box is located in the top right hand corner, and instead of a search button, there is an icon of a magnifying glass on the right-hand end of the search box. Pressing↵ Enter or clicking on the magnifying glass when the box is empty takes you directly to Wikipedia'ssearch page. Prior to that, inMonobook it was in the middle of the sidebar on the left of the screen.
JavaScript, and thus possiblyuser scripts, andskins have an effect on the search/navigate default behavior. Monobook's default is to navigate, and Vector's default is search; however, when JavaScript is on, the Vector skin will navigate. Monobook'sGo will navigate, and is the default, but Monobook has aSearch button.
Search string
Whatever you type into thesearch box is called the "search string". It may also be referred to as the "search query".
A basic search string is simply the topic you are interested in reading about. A direct match of a basic search string will navigate you directly to Wikipedia's article that has that title. A non-match, or any other type of search string will take you to Wikipedia's search results page, where the results of your search are displayed.
Terms in the search string are subject tostem matching, except for anything included between double quotation marks.
You can include in your search stringspecial characters andparameters that activate specific search capabilities. Using any of these will take you to Wikipedia's search results page with the results of your search displayed.
The maximum search string is 300 characters long.[a]
Search is case insensitive, that is, upper and lowercase is ignored.
Search "folds" character families, matching similar-looking letters across alphabets, to match foreign terms. So, you don't have to type indiacritical letters, and your terms will still match. For example, a search onCitroen will also matchCitroën, andAeroskobing matchesÆrøskøbing.
Characters that are not numbers or letters (punctuation marks, brackets and slashes, math and other symbols) are generally ignored. For example,Credit (finance) will return articles with the wordscredit andfinance, ignoring the parentheses, unless an article with exact titleCredit (finance) exists. Similarly, a search for the string|LT| (lettersLT between two pipe symbols) will only return articles withlt. In order to search for terms that contain non-alphanumeric characters, aregex search must be used instead (using the\escape character if required); for example,insource:/\|LT\|/ will successfully return all instances of|LT|.
The source text is what is searched, which is not always what is displayed on the screen. This distinction is relevant forpiped links, forinterlanguage links (to find links to Chinese articles, search forzh, not forZhongwen),special characters (ifê is coded asê it is found searching forecirc), etc.
The default search domain is the article space, but any namespace may be specified in a query.
At the search results page, any number ofnamespaces can be specified, andusers can keep those namespaces as their own default search domain. Partial namespace searches can be made by specifying the initial letters of a page name.
Spaces
The use of spaces is, in general, intuitive. Unnecessary spaces, and all non-alphanumeric characters except" are ignored, which makes for flexibility; it is simplest and best to avoid typing unnecessary spaces, although the tolerance for grey space simplifies copying and pasting search terms without the need for cleanup. For example,credit card is obviously reasonable; copying and pasting[[Credit(?!)card]] is equivalent and convenient;"credit card""payment card" is actually correct and minimal, but"credit card" "payment card" is an intuitive equivalent.
Any of the following characters will be treated as aspace character:!@#$%^&()_+-=~`{}[]|\:;'<>,.?/. The double quotation mark" is not one of these characters, because it has the special purpose of specifying an exact phrase search, and- and! can be used to exclude results if either occurs at the beginning of a word or phrase (see more below). We use the termgrey-space instead ofwhitespace here to include the space character itself and all these characters. Multiple [grey-]spaces are equivalent to a single space.
Grey-space is ignored between the words of exact-phrase searches, between adjacent items in the query, and in starting characters of the search box query. All filters can have grey-space between them without affecting search results. Most operators, such asintitle: andincategory:, ignore unnecessary spaces, or grey-space, after the colon.
Where spaces are significant: single search terms cannot have embedded spaces;work space,"work space", andworkspace are all different. The particular keywordsprefix andinsource must be followed immediately by a colon: and their arguments, without intervening [grey-]spaces.
Aphrase can be matched by enclosing it in double quotes,"like this". Double quotes can define a single search term that contains spaces. For example,"holly dolly" where the space is quoted as a character, differs much fromholly dolly where the space is interpreted as a logical AND.
Spelling relaxation is requested by suffixing a tilde~, likethis~ to match results likethus andthins. It covers any two character-changes for any character except the first: it returns addition, exchange, or subtraction. This search technique is sometimes called a "sounds-like" search. For example, searching forcharlie~ parker~ returnsCharlie Parker,Charles Palmer,Charley Parks, etc.
To force a search rather than navigate directly to a matching page, include a tilde character~ anywhere in the query. It always takes you to the search results page, never jumping to a single title. For example, the misspellingsimiliar isredirected to theSimilarity article (or, in this case, disambiguation page); but prefixing a tilde,~similiar, lists pages containing that misspelling.
Prefixed hyphen or exclamation point for exclusion
Pages matching a search term can be excluded by prefixing an exclamation point (!) or a hyphen (-) to the term. This is thelogical NOT. For example,credit card -"credit card" finds all articles withcredit andcardexcept those with the phrasecredit card.
The two wildcard characters are* and\?, and both can come in the middle or end of a word. The escaped question mark stands for one character and the star stands for any number of characters. Because many users ask questions when searching, question marks are ignored by default, and the escaped question mark (\?) must be used for a wildcard.
Non-alphabetic characters
For non-alphabetic characters, regex expressions are needed.(Seeinsource: below.)
The search engine supportslimited boolean logic in searches.Logical NOT (negation) can be indicated by a "-" (minus sign) or a "!" (exclamation point) character prefixed to a search term, or by theNOT keyword.
Parentheses(…) are ignored by the search engine and have no effect.
Search terms are implicitly joined bylogical AND (conjunction). For example"credit card" housecat searches for pages containing both "credit card" and "housecat". AnOR operator is supported, but will only give intuitive results (corresponding tological disjunction) ifall search terms are separated byOR (e.g.red OR green OR blue has the expected behaviour, butred OR green blue does not).OR also does not behave predictably with special keywords (likeintitle:) or namespaces.(Seemw:Help:CirrusSearch/Logical operators for a more detailed explanation.)
Parameters function as name filters, each followed by the search term it operates on. Their search term may be a word or a phrase. The main parameters arenamespace:,intitle:,insource:,incategory:, andprefix: (namespace as used here isn't literal – use the name of the actual namespace desired).
prefix: differs from the other parameters in that it can only be used at the end of a search string.
A singlenamespace: filter can go first, and a singleprefix: filter can go last.
namespace:
Only articles are searched by default because most users are only readers. Given only at thebeginning of the query, anamespace name followed by a colon limits search results to that namespace. It is a filter without a query string. The namespace can also be selected atSpecial:Search.
Namespacealiases likeWP: orwp: instead ofWikipedia: are accepted.
User: will normally go directly to a user page even if it doesn't exist. To search userspace, useSpecial:Search or click "Search for pages containing" below the search box.
all: will search all namespaces.
To search multiple namespaces but not all, use "Search in:" atSpecial:Search.
Page titles and redirects can be searched withintitle:query, wherequery is the search string. The search results highlight occurrences in both the title and page content. Multipleintitle: filters may be used to search for words in titles regardless of order, or in different titles (i.e., redirects) for the same article.Regular expressions can be used withintitle:/regexp/ or the case insensitiveintitle:/regexp/i.(See more in theinsource section.)
This can find template arguments, URLs, links, html, etc. It has two forms, one is an indexed search, and the other isregex-based.
Query
Description
insource:word insource:"word1 word2"
Like word searches and exact-phrase searches, non-alphanumeric characters are ignored, and proximity and fuzziness are options.
insource:/regexp/ insource:/regexp/i
These areregular expressions. They use a lot of processing power, so we can only allow a few at a time on the search cluster, but they are very powerful. The version with the extrai runs the expression case-insensitive, and is even less efficient. Regex searches are likely to time out unless you further limit the search in some way, such as by including another parameter or a search term outside of the insource component of the search string. (For example,X* intitle:/X/ to restrict the search to initial position.)For more details, seemw:Help:CirrusSearch#Regular expression searches.
Given asincategory:category, wherecategory is thepage name of a category page, it lists pages assigned to the given category by methods including the addition of[[Category:page name]] to their wikitext. (Editors searching in namespaces other than mainspace will need to knowthe limitations these search results may contain.) If the category page name includes space characters; replace the spaces with underscores (e.g.incategory:Pages_of_interest), surround the page name with double quotes (e.g.incategory:"Pages of interest") or both (but not on theWikimedia Commons site).incategory: will also return pages in the adjacent subcategory(see for example,category: incategory:History). Multipleincategory: filters may be applied. A more graphical alternative to a single filter is atSpecial:CategoryTree. Because categories are important structures forsearching for related articles, any use of this prefix is particularly effective for searching.(For more on using the categories themselves to find articles, seeWikipedia:FAQ/Categories.)
Articles that arecommon to both categories – the suspension bridges in New York City. This will return nothing since all NYC bridges are categorized in subcategories, andincategory: doesn't search in subcategories.(For the probably desired result, see usage ofdeepcategory: in the next section.)
Alsodeepcat:, this allows you to search in a category and all its subcategories. The depth of the tree is currently limited to 5 levels, and the overall number of categories is limited to 1000.
Articles that arecommon to both categories – the suspension bridges in New York City. This will work since all NYC bridges are categorized in subcategories, andincategory: doesn't search in subcategories butdeepcat: does.
prefix:page name patternsonly the beginning characters of apage name. Because the "beginning" characters can, if you need, go on to include the characters all the way to the end of the page name, prefix must include spaces, since page names often include spaces. For this reasonprefix: must only ever be given as thelast part of a search box query, and next character after the colon cannot be a space.prefix: does not search for partial namespace names, but requires at least a full namespace name to start to find pages, butprefix: also recognizes analias of a namespace, and it recognizes redirects (or shortcut). Prefix is the most widely used and powerful filter as it can mimic the namespace filter, and becauseintitle: cannot easily target a single page, even together with other filters.Special:PrefixIndex is a MediaWiki, graphical, version, using onlyprefix: to find pages.
linksto:page name searches in pages that link to the given page. Can be used negatively by prefixing a hyphen, which will return pages thatdo not link to the given page. Unlike with some other keywords, the page name is case-sensitive.
This limits searches tosubpages of the specified page. You can also negate the subpages from a search by preceding subpageof: with a hyphen. Note that articles on Wikipedia don't have subpages, but the pages of the other namespaces do. Therefore, use thenamespace parameter also, or select the namespace atSpecial:Search. Here are some examples:
ForUser: searches, click "Search for pages containing" or useSpecial:Search. This is not needed for other namespaces. To look at all the subpages of a user, try this:
To make sure Articles for deletion pages do not show up in the results of a Wikipedia namespace search, try this:
Wikipedia:"Hi there" -subpageof:"Articles for deletion"
That will show pages from the Wikipedia namespace with "Hi there" in them, and the list of results will not be cluttered with anyWP:Articles for deletion debates (there are hundreds of thousands). Notice the use of the hyphen (that makes it mean "not subpages of").
This finds pages that use the specifiedtemplate. Input the canonical page name to find all usage of the template, but use any of its redirect page names finds just that naming. Namespace aliases are accepted, capitalization is entirely ignored, and redirects are found, all in one name-search.
This is more thorough thaninsource:, in that it will find meta-templates (templates called by another template). Meta-templates don't show up in the local page's wikitext.
Example ofhastemplate: usage:
hastemplate:"Article for deletion/dated"
This lets you find all the articles being considered for deletion.
intitle:"Outline of " -hastemplate:"Outline footer"
This lets you findWikipedia outlines that lack the outline footer template. (Notice the use of the hyphen to indicate "NOT").
articletopic:
This keyword allows filtering search results by topic.(For possible topics seemw:Help:CirrusSearch/articletopic.) E.g.articletopic:books will filter the search results to articles about books.articletopic:books|films will filter to articles about books or films.articletopic:books articletopic:films will filter to articles which are about both books and films.
Only mainspace articles belong to topics. Unlike most other filters,articletopic: also does page weighting: articles which are a stronger match for a topic will be higher in the search results (while articles which aren't about that subject at all will be removed from the result set completely).
Topic models are derived via machine learning fromORES. Any given article receives a score on dozens of different topics, and therefore may appear under different keywords. For instance, the article on Albert Einstein may appear as a "physics" article and a "biography" article. Topic-related search data is updated weekly, so recently created articles might not show up in topic-based search queries.
inproject:
Allows filtering of search results to pages in givenWikiProjects. Examples:
Note this filter only works on wikis withExtension:PageAssessments installed (which includes English Wikipedia)
Search page
The search page.
The search page features a search box, with some links to search domains beneath it.(For information on what can by typed into the search box, seeSearch string syntax above.)
The main difference between this search box and the one that appears on article pages is that exact matches on this one will not navigate you directly to an article page. This search box will produce thesearch results page showing what all matches your search on Wikipedia.
To get to the search page, perform an empty search (press↵ Enter while in thesearch box before typing anything else in), or click on theSearch button. The linkSpecial:Search, which can be inserted onto user pages or project pages, for example, also leads to the search page.
While the entire contents of the search page is included in thesearch results page, it is a distinct page. User scripts might be designed to work on the search results page but not the search page, for example.
(For an explanation of the controls available on the search page, seeRefining results below.)
The search results page looks just like thesearch page, with the results for your search query presented below it.(For information on what can by typed into the search box, seeSearch string syntax above.)
The search results page is displayed when a search is done from the search page, when a search from the regularsearch box does not exactly match a page title, or when any parameters or special characters are included in asearch string.
Understanding search results
The search string entered will be displayed in the search box on the page, in case you wish to modify it.
Spelling corrections and query corrections are offered at the top of the results(seePreliminary reports, below).
Note that search results include content from templates displayed on the pages searched.
The order that search results are presented in is based on the page ranking software.
Results match word stems, along with their various tenses (past tense, plural tense, etc.), except for anything included between double quotation marks.SeeStem matching, below.
Throughout the results, matching terms are highlighted in bold. All matches in the title show for sure, while matches within the details may show, but not if they are far apart on the page.
Matches are included for section headings, members of matching categories, and destination pages of redirects. These will show off to the side of the page name, parenthetically.
A single result (one each) from selected sister projects appears on the right side of the page (the most likely relevant match for each). This feature may be permanently turned off inPreferences.
Files from Wikimedia Commons are included within the results when theFile: namespace has been selected. You can prepend search terms withlocal: to limit results to locally uploaded files.
Preliminary reports
Search results will often be accompanied by a preliminary report.
There is a page named "Page name" (a wikilink to an existing page)
Did you mean:spelling correction (either a wikilink or a search-link)
You may create the page "New title" (a redlink to a new page name)
TheDid you mean report corrects dictionary word spellings and gives a link that is either a wikilink that will navigate to an article or a search link that will perform a query. The distinction can be made by observing the presence of aYou may create the page report.Another report corrects "spellings" to coincide with any "word" found in a search index (any word on the wiki):
TheSearch page is designed for presenting and refining results in a re-search loop controlled by modifying the query or the search parameters, such as namespace.
Namespaces
By default only the Article namespace is searched, but these checkboxes can be used to add other types of Wikipedia pages such as talk pages or user pages.
Articles are in the mainnamespace, or "article space", butSpecial:Statistics will show that there are many times morepages on Wikipedia than there arearticles on Wikipedia. Othertypes of pages are in othernamespaces, and these can be selected using the checkboxes that appear when expanding the section labelledSearch in: under the search box.
"Default": Only search encyclopedia articles (also calledmainspace).
"Discussion": Searchtalk pages. Some discussions are in theWikipedia: namespace, which can be included by also selecting "General help" (which also adds help pages) or by selecting "Wikipedia" under "Add namespaces…".
"General Help": Search theHelp: namespace andWikipedia: namespace (also called project namespace). The latter contains various types of pages including many help pages.
Unfortunarely, there is no reliable way to exclude discussion pages from the results, but you can try adding to your query-insource:/\(UTC\)/ (which would also exclude help pages containing "(UTC)"); or try something more delicate likethis (which would also exclude help subpages of WikiProjects).
"All": Search every page on the entire wiki, for example also drafts and user pages.
Click "Add namespaces…" to selectnamespaces individually.
In order to fully interpret the search results page, check which search domains are checked off, but also remember to check for a namespace name at the beginning or aprefix: parameter at the end of the search box query. A namespace entered in a query always takes priority for determination of the search domain of a query, and will at any time override your default search domain, or any displayedprofile. Aprefix: parameter atthe end of a query in the search box, furthermore, will override any namespace there, or anyprofile underneath that. Equivalently, you could check theURL in your browser's address bar for profile and namespace parameter settings, because the search query was sent to the search engine by way of that URL.
Sorting
By default, results are ordered byrelevance. The "Sorting order" control in the "Advanced search" section allows you to select two other sort orders: most recently edited, and most recently created.
An advanced technique is to manually modify the URL to achieve other sort orders. For example, adding&sort=incoming_links_desc to the end of the URL will sort pages with the most incoming links to the top, and&sort=random will randomly order results. For a full list of available sort orders, seemw:Help:CirrusSearch#Explicit sort orders.
Thedefault search domain is article space, but any user can change this default, and have their owndefault search domain for all the queries they run. In any case a query always can specify a namespace to make the search domain explicit and override any default. At the search results page,Special:Search,Advanced dialog, a search can specify any number of namespaces, andlogged-in users can set theirdefault search domain there by clicking "Remember selection for future searches".[c]
several external search engines' views of Wikipedia. The search results page will then have a pull down list to the left of its search box, offering your choice as, say, a modification of a word or phrase search, or a page ranking refinement. Go toPreferences →GadgetsAppearance, and see "Add a selector to the Wikipedia search page allowing the use of external search engines."
a wider search box. Go toAppearance and find "Widen the search box in the Vector skin."
Preferences →Search → Completion. Spell-correct titles dropped-down from the search box as you type, or not. Or go toPreferences →Appearance and see "Disable the suggestions dropdown-lists of the search fields".
The search results page can open in a new tab. SeePreferences →GadgetsBrowsingThere are also custom user-scripts to make all search results always open in a new tab. (See the scripts available inSee also.)
To hide/opt-out the search results snippets from sister projects, go toPreferences →Gadgets →Appearance and see "Do not show search results for sister projects on the search results page".
Tips and tricks
Searching within a page
The internal search engine cannot locate occurrences of a string within the page you are viewing but browsers can usually do this withCtrl+F, or⌘ Command+F on a Mac.
Searching for a specific person's contributions
Due to the way the wikimedia database is indexed, there's no direct way to search for something likeinsource:foo author:person. But, you can come close in some situations. If you're looking for something on a talk (or, sometimes, project) page, people tend to leave a signature after each edit, and such pages are usually set up so old edits roll off onto archive pages. In this case, theproximity search operator can find instances of your search term near the user's name. Something likefoo person ~50 might find what you are looking for.
Search Wikipedia from any web page
To get Wikipedia search results while on anyweb page, you can temporarily set your web browser's search box to become a Wikipedia search search box, even though you're on another web site(seeHelp:Searching from a web browser). This trick removes the need to first navigate to Wikipedia from a web page, andthen do the search or navigation. It is a temporary change, and then you put it back to your preferred web-search engine.
You can just drag items on the page the name up to the web browser search boxwhile on any web site, even in the lower sections of a Wikipedia page, where no search box is immediately available.
You can reach all twelvesister projects the same way by using interwiki prefixes in the web browser's search box. For example, you can go straight to aWiktionary entry by using the prefixwikt: from your web-search box.
SQL searches / Quarry
The entire wikipedia database (with some redactions for privacy) is exposed for SQL queries at the experimentalQuarry service. Using this requires a high degree of technical skill; you must not only know SQL, but also be able to navigate the complex (and not always well documented) database schema. For those who are so equipped, it may provide another option for searches which would be impossible to do via the standard search interface.
Other search tools
Other search tools include:
Your own browser, to search the current page only. TryCtrl+F,F3, or⌘ Command+F.
External tools dedicated to Wikipedia Database searches include:
Article title grep: searches page titles usingregular expressions. This search is much slower than standard search. In particular this tool can search for exactstrings of characters, including punctuation and withcase sensitivity. For example the pattern\(& Co\. Ltd\. will find only titles containing(& Co. Ltd. exactly as shown. Regular expressions are precisely defined, and not intuitively obvious.
PetScan: about 20 search parameters, three for categories
WikiBlame: search for text in the revision history of a page
whichsub: finds transcluded templates of a given page which contain a given string.
If you cannot find what you are looking for
If you're looking for a place where wine comes from pronounced "Bordo", you can try searching for a more general article such as "Wine", "Wine regions" (returning "List of wine-producing regions") or other wine types such as "Burgundy" and see if it's mentioned there or follow links (in this case, to "Burgundy wine", which has several mentions of "Bordeaux", and links to "French wine" and "Bordeaux wine"). If you know it's in France, look at "France" or theCategory:Cities in France, from where you can easily find Bordeaux. You can try various things depending upon the particular case; for "Bordo" wine, it's quite likely that the first letters are "bord", so search an article you've landed on for these letters. If youuse Google to search Wikipedia, and click on "cache" at the bottom of any result in the search engine results page, you'll see the word(s) that you searched for highlighted in context.
(For an overview of how to find and navigate Wikipedia content, seeWikipedia:Contents. If you're looking for a straight definition of a word, try our sister projectWiktionary.)
If there is no appropriate page on Wikipedia, considercreating a page, sinceyou can edit Wikipedia right now. Or consider adding what you were looking for to theRequested articles page.
If you have a question, then seeWhere to ask questions, which is a list of departments where our volunteers answer questions, any question you can possibly imagine.
A common mistake is to type a natural-language question into the search box and expect an answer. While some Web search tools support this, the Wikipedia search is a text search only; questions, as such, can be asked at thereference desk and similar places. A search forhow do clocks work? will return articles with the wordshow,do,clocks, andwork, ignoring the question mark (in practice this can lead to articles answering simple questions).
Delay in updating the search index
Because people like to see their work in search results, the search engine attempts to update innear real-time. Edits made to pages via templates can take a little longer to propagate. If you see the index lagging more than a day or so,report it. For other technical issues with the search engine, please leave a message onthe talk page.
Under the hood
To power its search feature, Wikipedia usesCirrusSearch, a MediaWiki extension that usesElasticsearch to provide enhanced search features.
Search results will include the roots of words included in the search string, and their various tenses (plural, past-tense, etc.). If stem matching is not wanted, use double quotes around the word or phrase you want to match verbatim. Here are some examples:
^The upper-casedAll: was previously documented as distinct fromall:, in doing such namespace sorting while the lower-case version did not. But as of 2024,[update]All: is no longer functional, and tends to produce unexpected results (e.g. no matches, or those containing the wordall).
^Because the default search domain is a settable preference, any query you intend to share, publish, or save in a search link might need the search domain explicitly given in the search link in order to ensure consistent search results among all users, at any time.{{Search link}} defaults to article space but can specify multiple namespaces in its query.