Kagi: Bangs and Snaps
Kagi search is very good, but some of its usefulness is not easily discoverable. The following are my notes on Kagi’s Bangs (and Snaps) after I dug in this morning for research.
While Kagi has a YouTube channel, it’s mostly reserved for flashy marketing clips. They have a few old how to videos which can still be helpful. The way to learn is their docs.
The main page is at https://help.kagi.com. From there, scroll down to User Guide on the left pane to read the documentation.
Bangs
First make sure Bangs are enabled within the Search options in Kagi:
- Go to https://kagi.com/settings?p=search
- Scroll down to Search Bangs
Use Bangs like this: !w search engine
. This will open Wikipedia on the “search engine” page result directly (same as if you went to wikipedia.com and searched for “search engine”)
But Bangs are more useful than just for opening Wikipedia articles directly.
The Kagi community built a search for bangs: https://kbe.smaertness.net/. Searching this engine for “maps” taught me that !gmaps
(as in !gmaps empire state building)
will open Google Maps directly, !maps
opens up Kagi Maps (I just learned this is actually a thing), etc.
Another interesting example is !news
, which also has a Kagi flavor (https://kagi.com/news) when you search for a topic. With news, upvoting and downvoting a site (personalizing search results) is very useful.
Custom Bangs
Creating custom Bangs is possible from the Advanced Settings menu under Search in the Setting page.
- Select the Add Bang and go to that page
- fill in the following:
- Search engine name: the name of your Bang
- URL: this is the URL with the search query. Usually ends with
q=%s
. - Bang Shortcut: the trigger to activate the bang, for example, !w
- Domain for Snaps: in short, the website the search should be limited to.
How to get the URL for a custom bang:
To get the correct URL for a custom bang follow these steps. In this example, I am using Google as the search I want to create a Bang for.
- Go to the search you want to use for the Bang (https://www.google.com)
- Search for a term (pizza)
- Copy the URL into a text editor (https://www.google.com/search?q=pizza)
- Remove the search term, and add %s after the query (https://www.google.com/search?q=%s)
Some sites' searches are not as straightforward, and the URL might be harder to find, but most follow this simple pattern.
About Snaps:
Snaps are related to Bangs. They are activated by @
and its trigger, similar to Bangs.
For example, a search for @w pizza
will run a search for pizza in Wikipedia. The difference between a Snap and a Bang will be apparent in this example: while a Bang will forward you into Wikipedia to view results for pizza, a Snap will use Kagi to run the search, pulling results only from Wikipedia into the search index.
This allows you to use Kagi’s search features on a website, for example, summarizing a specific page on the site with Kagi’s AI, or navigating using Kagi’s keyboard shortcuts.