Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Searching
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Parameters === {{anchor|Parameter searches}}<!-- Please leave anchors in place. Section redirects point to them. --> {{about|search parameters|template parameters|Help:Template#Parameters|section=yes}} {{shortcut|H:PARAM}} 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 are '''<code>{{var|namespace}}:</code>''', '''<code>intitle:</code>''', '''<code>insource:</code>''', '''<code>incategory:</code>''', and '''<code>prefix:</code>''' ({{var|namespace}} as used here isn't literal β use the name of the actual namespace desired). <code>prefix:</code> differs from the other parameters in that it can only be used at the end of a search string. A single <code>{{var|namespace}}:</code> filter can go first, and a single <code>prefix:</code> filter can go last. <!-- Note that the [[space character]]s are {{em|not}} very important except around <code>prefix:</code>. The query string of <code>incategory:</code> is a [[WP:Page name|page name]] (or "a category name"), and in a page name, the [[underscore]] <code>_</code> is equivalent to space, and so underscore will suffice instead of the double quotes around the page name with spaces in it. The <code>intitle:</code> query is not a page name, but it also treats space and underscore equally, treating them as AND. (It even treats multiple spaces, and even mixes of spaces and underscores that way.) All filters can have between them multiple spaces (or underscores) (or a mix) without affecting search results. Multiple spaces are treated as a single space everywhere except around <code>prefix:</code>. (Namely, within and around Boolean operated terms, even if inside double quotes; in between adjacent filters; in page names; in starting characters of the search box query; in between the colon and the prefix parameter names <code>incategory:</code>, <code>intitle:</code>, or <code>all:</code>, or after that colon). <code>prefix:</code> or a namespace name (or its alias) can have no space between its name and the following colon. And remember that <code>prefix:</code> is entirely literal after its colon, and so accepts no space character, except as a literal space.--> ==== <code><var>namespace</var>:</code> ==== {{anchor|namespace name:}} Only articles are searched by default because most users are only readers. Given only at the {{em|beginning}} of the query, a [[Wikipedia:Namespace|namespace]] 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 at [[Special:Search]]. Namespace [[WP:Namespace#Aliases|aliases]] like <code>WP:</code> or <code>wp:</code> instead of <code>Wikipedia:</code> are accepted. <code>User:</code> will normally go directly to a user page even if it doesn't exist. To search userspace, use [[Special:Search]] or click "{{int:searchsuggest-containing}}" below the search box. <code>all:</code> will search all namespaces. To search multiple namespaces but not all, use "{{int:advancedsearch-namespaces-search-in}}" at [[Special:Search]]. ==== all: ==== {{shortcut|H:ALL}} {{anchor|All|all}} Prefixing <code>all:</code> (in lower case) searches all namespaces, sorted by namespace, and with substring matches at the end.{{efn|1=The upper-cased <code>All:</code> was previously documented as distinct from <code>all:</code>, in doing such namespace sorting while the lower-case version did not. But {{as of|2024|lc=y|post=,}} <code>All:</code> is no longer functional, and tends to produce unexpected results (e.g. no matches, or those containing the word {{samp|all}}).}} ==== <code>intitle:</code> ==== {{anchor|intitle}} {{shortcut|H:INTIT|H:INTITLE}} [[Help:Page name|Page titles]] and redirects can be searched with <code>intitle:{{var|query}}</code>, where {{var|query}} is the search string. The search results highlight occurrences in both the title and page content. Multiple <code>intitle:</code> filters may be used to search for words in titles regardless of order, or in different titles (i.e., redirects) for the same article. [[Help:Searching/Regex|Regular expression]]s can be used with <code>intitle:/{{var|regexp}}/</code> or the case insensitive <code>intitle:/{{var|regexp}}/i</code>. {{crossref|pw=y|(See more in the [[#insource:|insource]] section.)}} {| class="wikitable" |- ! Query ! Description |- | {{kbd|{{search link|intitle:airport}}}} | All articles with the word {{samp|airport}} (or {{samp|Airport}} β this is case-insensitive) in their titles. |- | {{kbd|{{search link|parking intitle:airport}}}} | Articles with {{samp|parking}} in their text and {{samp|airport}} in their titles. |- |style=white-space: nowrap | {{kbd|{{search link|intitle:international intitle:airport}}}} | Articles containing both {{samp|international}} and {{samp|airport}} in their titles (including, e.g., {{samp|Airports Council International}}) |- | {{kbd|{{search link|intitle:"international airport"}}}} | Articles with the phrase {{samp|international airport}} in their titles. |- | {{kbd|{{search link|airport -intitle:airport}}}} | Articles with {{samp|airport}} in their text but not in their titles. |- | {{kbd|{{search link|intitle:/airport/i -intitle:airport}}}} | Articles with the string {{samp|airport}} (case-insensitive) but not the word {{samp|airport}} in their titles. |} ==== <code>insource:</code> ==== {{shortcut|H:INSOURCE}} {{anchor|insource}} This can find template arguments, URLs, links, html, etc. It has two forms, one is an indexed search, and the other is [[Help:Searching/Regex|regex-based]]. {{clear}} {|class="wikitable" |- ! Query ! Description |- | {{kbd|insource:{{var|word}}}}<br />{{kbd|insource:"{{var|word1 word2}}"}} | Like word searches and exact-phrase searches, non-alphanumeric characters are ignored, and proximity and fuzziness are options. |- | {{kbd|insource:/{{var|regexp}}/}}<br />{{kbd|insource:/{{var|regexp}}/i}} | These are [[Help:Searching/Regex|regular 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 extra <code>i</code> 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, {{kbd|X* intitle:/X/}} to restrict the search to initial position.) {{crossref|pw=y|For more details, see [[mw:Help:CirrusSearch#Regular expression searches]].}} |} ==== <code>incategory:</code> ==== {{anchor|incategory|Incategory}}<!-- Please leave anchors in place. Section redirects point to them. --> {{shortcut|H:INCAT|H:INCATEGORY}} Given as {{kbd|incategory:{{var|category}}}}, where [[Help:Category|{{var|category}}]] is the [[Help:Page name|page name]] of a category page, it lists pages assigned to the given category by methods including the addition of {{kbd|<nowiki>[[Category:</nowiki>{{var|page name}}<nowiki>]]</nowiki>}} to their wikitext. (Editors searching in namespaces other than mainspace will need to know [[WP:TCAT|the limitations]] these search results may contain.) If the category page name includes space characters; replace the spaces with underscores (e.g. {{kbd|incategory:Pages_of_interest}}), surround the page name with double quotes (e.g. {{kbd|incategory:"Pages of interest"}}) or both (but not on the [[Wikimedia Commons]] site). <code>incategory:</code> will also return pages in the adjacent subcategory {{crossref|pw=y|(see for example, {{nowrap|{{kbd|{{search link|category: incategory:History}}}}}})}}. Multiple <code>incategory:</code> filters may be applied. A more graphical alternative to a single filter is at [[Special:CategoryTree]]. Because categories are important structures for {{em|searching}} for related articles, any use of this prefix is particularly effective for searching. {{crossref|pw=y|(For more on using the categories themselves to find articles, see [[Wikipedia:FAQ/Categories]].)}} {| class="wikitable" |- ! Query ! Description |- | {{kbd|{{search link|Berlin incategory:German_chemists}}}} | Starting with the articles listed at [[:Category: German chemists]], only the ones that have the word {{samp|Berlin}} in their text. |- | {{kbd|{{search link|incategory:"Suspension bridges in the United States" incategory:"Bridges in New York City"}}}} | Articles that are [[WP:CI|common to both categories]] β the suspension bridges in New York City. This will return nothing since all NYC bridges are categorized in subcategories, and <code>incategory:</code> doesn't search in subcategories. {{crossref|pw=y|(For the probably desired result, see usage of <code>deepcategory:</code> in the next section.)}} |- | {{kbd|{{search link|incategory:"Suspension bridges in New York City" incategory:"Bridges in Brooklyn"}}}} | Suspension bridges of Brooklyn. |- | {{kbd|{{search link|"feral cat" -incategory:"Category:Cats in the United Kingdom"}}}} | Articles that contain the phrase {{samp|feral cat}}, but not listed in [[:Category:Cats in the United Kingdom]]. |} ==== <code>deepcategory:</code> ==== {{anchor|deepcategory}} {{shortcut|H:DEEPCAT}} Also <code>deepcat:</code>, 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. Examples: {| class="wikitable" ! Query ! Description |- | {{kbd|{{search link|deepcat:"Musicals by topic"}}}} | All musicals of any topic. (Finds articles that are in [[:Category:Musicals by topic]] or any of its subcategories.) |- | {{kbd|{{search link|Berlin deepcat:German_chemists}}}} | Starting with the articles listed at [[:Category: German chemists]], only the ones that have the word {{samp|Berlin}} in their text. |- | {{kbd|{{search link|deepcat:"Suspension bridges in the United States" deepcat:"Bridges in New York City"}}}} | Articles that are [[WP:CI|common to both categories]] β the suspension bridges in New York City. This will work since all NYC bridges are categorized in subcategories, and <code>incategory:</code> doesn't search in subcategories but <code>deepcat:</code> does. |- | {{kbd|{{search link|deepcat:"Suspension bridges in New York City" deepcat:"Bridges in Brooklyn"}}}} | Suspension bridges of Brooklyn. |- | {{kbd|{{search link|"feral cat" -deepcat:"Category:Cats in the United Kingdom"}}}} | Articles that contain the phrase {{samp|feral cat}}, but not listed in [[:Category:Cats in the United Kingdom]] or its subcategories. |} ==== <code>prefix:</code> ==== {{shortcut|H:PREFIX}} {{anchor|prefix}} <code>prefix:{{var|page name}}</code> patterns {{em|only the beginning characters}} of a [[WP:Page name|page 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 reason <code>prefix:</code> must only ever be given as the {{em|last part}} of a search box query, and next character after the colon cannot be a space. <code>prefix:</code> does not search for partial namespace names, but requires at least a full namespace name to start to find pages, but <code>prefix:</code> also recognizes an [[WP:Namespace#Aliases|alias]] 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 because <code>intitle:</code> cannot easily target a single page, even together with other filters. [[Special:PrefixIndex]] is a MediaWiki, graphical, version, using only <code>prefix:</code> to find pages. {| class="wikitable" |- ! Query ! Description |- | {{kbd|{{search link|Salvage wreck prefix:USS}}}} | Articles containing the words {{samp|salvage}} and {{samp|wreck}} whose title starts with the characters {{samp|USS}}. |- | {{kbd|{{search link|wave particle prefix:Talk:Speed of light}}}} | The [[Speed of light]] article's talk pages containing the terms {{samp|particle}} and {{samp|wave}}, including the current and the [[WP:Archive|archived]] talk [[WP:Subpage|subpages]]. |- | {{kbd|{{search link|wave particle prefix:Talk:Speed of light/}}}} | Same search, but only in the archived talk subpages. |- | {{kbd|{{search link|"portal namespace" readers prefix:Wikipedia talk:}}}} | Is equivalent to {{samp|Wikipedia talk:"portal namespace" readers}}. |- | {{kbd|{{search link|language prefix:Portal:Chi}}}} | Portal namespace page names that begin with {{samp|Portal:Chi}} and have the word {{samp|language}} in the page. |} ==== <code>linksto:</code> ==== {{shortcut|H:LINKSTO}} {{anchor|linksto}} <code>linksto:{{var|page name}}</code> searches in pages that link to the given page. Can be used negatively by prefixing a hyphen, which will return pages that {{em|do not}} link to the given page. Unlike with some other keywords, the page name is case-sensitive. {{clear}} {| class="wikitable" |- ! Query ! Description |- | {{kbd|{{search link|linksto:Airport}}}} | All articles containing internal link to [[Airport]]. |- | {{kbd|{{search link|parking linksto:Airport}}}} | Articles with {{samp|parking}} in their text linking to [[Airport]] |- | {{kbd|{{search link|-linksto:"Albert Einstein" "Albert Einstein"}}}} | Articles containing {{samp|Albert Einstein}} NOT linking to [[Albert Einstein]] |} ==== <code>subpageof:</code> ==== {{shortcut|H:SUBOF}} {{anchor|subpageof}} This limits searches to [[Wikipedia:Subpages|subpages]] 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 the [[#namespace name:|namespace parameter]] also, or select the namespace at [[Special:Search]]. Here are some examples: For <code>User:</code> searches, click "Search for pages containing" or use [[Special:Search]]. This is not needed for other namespaces. To look at all the subpages of a user, try this: {{kbd|User:subpageof:AzaToth}} That will display all the subpages of [[User:AzaToth]]. They can also be seen at [[Special:PrefixIndex/User:AzaToth/]] but [[Special:PrefixIndex]] cannot be combined with a search. To make sure Articles for deletion pages do not show up in the results of a Wikipedia namespace search, try this: {{kbd|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 any [[WP:Articles for deletion]] debates (there are hundreds of thousands). Notice the use of the hyphen (that makes it mean "not subpages of"). ==== <code>hastemplate:</code> ==== {{anchor|hastemplate}} {{shortcut|H:HASTEMP}} This finds pages that use the specified [[Wikipedia:template|template]]. 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 than <code>insource:</code>, 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 of <code>hastemplate:</code> usage: {{kbd|hastemplate:"Article for deletion/dated"}} This lets you find all the articles being considered for deletion. {{kbd|intitle:"Outline of " -hastemplate:"Outline footer"}} This lets you find [[Wikipedia:Outlines|Wikipedia outlines]] that lack the outline footer template. (Notice the use of the hyphen to indicate "NOT"). ==== <code>articletopic:</code> ==== {{anchor|articletopic}} This keyword allows filtering search results by topic. {{crossref|pw=y|(For possible topics see [[mw:Help:CirrusSearch/articletopic]].)}} E.g. {{kbd|articletopic:books}} will filter the search results to articles about books. {{kbd|articletopic:books{{!}}films}} will filter to articles about books or films. {{kbd|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, <code>articletopic:</code> 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 from [[mw:ORES#Topic routing|ORES]]. 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. ==== <code>inproject:</code> ==== {{anchor|inproject}} Allows filtering of search results to pages in given [[Wikipedia:WikiProject|WikiProjects]]. Examples: * {{kbd|inproject:Cricket}} filters to pages in [[Wikipedia:WikiProject Cricket|WikiProject Cricket]] * {{kbd|inproject:Cricket{{!}}Football}} filters to pages in either WikiProject Cricket or WikiProject Football. * {{kbd|inproject:Football inproject:Cricket}} filters to only pages which are in both WikiProjects * {{kbd|inproject:"Africa/Seychelles work group"}} filters to pages in the [[Wikipedia:WikiProject Africa/Seychelles work group|Seychelles work group]] of WikiProject Africa. A list of [https://en.wikipedia.org/w/api.php?action=query&list=projects&pjsubprojects=true all possible projects and subprojects] can be obtained via the API. ''Note this filter only works on wikis with [[mw:Extension:PageAssessments|Extension:PageAssessments]] installed (which includes English Wikipedia)''
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)