Snaps (@code)
A snap scopes a search to a site (or a few sites) or to a lens, inline, without typing site: each time. To
trigger one, begin the query with @ followed by its code.
Using a snap
Put the snap first; everything after it is the query:
@docs middleware pipeline
@news election resultsA snap can point at:
- One site — the search is scoped with
site:to that domain. - Several sites — the search is scoped to all of them at once (an
ORofsite:filters). - A lens — the snap activates that lens for the search.
A snap @docs covering learn.microsoft.com and developer.mozilla.org turns:
@docs fetch apiinto a search for fetch api across those two sites alone — equivalent to:
fetch api (site:learn.microsoft.com OR site:developer.mozilla.org)Snaps vs. bangs vs. lenses
A snap is the quickest way to restrict a search to sites you have grouped; it is the command-line cousin of a lens. A bang routes, scopes, or applies a ranking rule. A lens is a richer, reusable bundle of ranking rules that can also be activated by a bang or set as your default. A snap that points to a lens is a short alias for switching that lens on.
Managing snaps
Create and remove snaps under
Settings → Search Control → Snaps. A snap needs a code (lowercase
letters, digits, and hyphens) and either a lens or a list of domains. The code is normalized
automatically, so @My-Docs and @my-docs are the same snap.