Skip to content

Instantly share code, notes, and snippets.

@verhovsky
Last active February 8, 2024 20:17
Show Gist options
  • Save verhovsky/f78c1d09be2dbea1a4844013283407b1 to your computer and use it in GitHub Desktop.
Save verhovsky/f78c1d09be2dbea1a4844013283407b1 to your computer and use it in GitHub Desktop.
Useful short prefix search engines for Chrome. Like adding DuckDuckGo bangs to google.

How to add DuckDuckGo bangs to Google (if you're using Chrome)

Chrome has a feature for defining your own search engines for the omni bar. It's intended for adding search boxes present on other websites, but it accepts arbitrary urls, including modified google search URLs. The URL for a google search query is just google.com/search?q=your+query+with+spaces+replaced+with+plus+signs, which means if you bind a "search engine" like google.com/search?q=wikipedia+%s to "w" you will automatically have the word "wikipedia" added to your search query if you search "w something". You won't even have to type the "!". Here's an example

Go to SettingsManage Search EnginesOther search enginesADD and then

Search engine: wikipedia

Keyword: w

URL with %s in place of query: https://google.com/search?&q=site%3Awikipedia.org+%s

Now if you search "w russels paradox" it will open https://google.com/search?&q=site%3Awikipedia.org+russels+paradox which is search results only from wikipedia.

The big drawback is that you can't use google search's autocompletion when you use a prefix. You still get it when searching without a prefix though.

I've included a list of all the search engine prefixes I've defined, roughly sorted by how often I use them, with related searches grouped.

I don't think you can do this in Firefox.

w {google:baseURL}search?q=site:wikipedia.org+-site:quote.wikipedia.org+%s&btnI=I%27m+Feeling+Lucky
this is a more advanced version of the wikipedia search I actually use
{google:baseURL} is the locale specific google domain (ei google.ca if you're in Canada)
site:wikipedia.org appends "site:wikipedia.org" to your query, which means you'll only get results from the wikipedia.org domain (and all its subdomains)
-site:quote.wikipedia.org excludes results from wikiquote
%s is replaced by query you'll be tying in to the omni bar after the "ww " prefix
&btnI=I%27m+Feeling+Lucky compeletely bypasses the google results page and opens the first result
n {google:baseURL}search?q=site%3Anews.ycombinator.com+%s
google results only from ycombinator news
y https://www.youtube.com/results?search_query=%s
wo https://www.wolframalpha.com/input/?i=%s
m {google:baseURL}search?q=site%3Adeveloper.mozilla.org/en-US/docs/Web/+%s
web development documentation
r {google:baseURL}search?q=site%3Areddit.com+%s
google results only from reddit
s https://stackoverflow.com/search?q=%s
se https://stackexchange.com/search?q=%s
all stack exchange sites
t https://thepiratebay.org/search/%s/0/99/0
tt https://www.skytorrents.in/search/all/ed/1/?l=en-us&q=%s
a backup torrent search engine
m {google:baseURL}maps/search/%s
google maps
c https://caniuse.com/#search=%s
l http://93.174.95.27/search.php?req=%s
libgen (download books and scientific papers)
use IP because the domain sometimes goes down
b https://builtwith.com/?q=%s
see a websites stack
check the current website by prepending "b " to the url
Cmd-l, ctrl-a, b, space, enter
tr http://translate.google.com/?source=osdd#auto|auto|%s
google translate
archive https://web.archive.org/web/*/%s
web archive, unfortunately doesn't work for the current website like builtwith
u https://www.urbandictionary.com/define.php?term=%s
look up slang
ii {google:baseURL}search?tbm=isch&q=%s
google image search
v {google:baseURL}search?q=site%3Avimeo.com+%s
lw {google:baseURL}search?q=site%3Alesswrong.com+%s
w https://en.wikipedia.org/wiki/Special:Search?search=%s
ww {google:baseURL}search?q=site:wikipedia.org+-site:quote.wikipedia.org+%s&btnI=I%27m+Feeling+Lucky
n {google:baseURL}search?q=site%3Anews.ycombinator.com+%s
y https://www.youtube.com/results?search_query=%s
wo https://www.wolframalpha.com/input/?i=%s
m {google:baseURL}search?q=site%3Adeveloper.mozilla.org/en-US/docs/Web/+%s
r {google:baseURL}search?q=site%3Areddit.com+%s
s https://stackoverflow.com/search?q=%s
se https://stackexchange.com/search?q=%s
t https://thepiratebay.org/search/%s/0/99/0
tt https://www.skytorrents.in/search/all/ed/1/?l=en-us&q=%s
m {google:baseURL}maps/search/%s
c https://caniuse.com/#search=%s
l http://93.174.95.27/search.php?req=%s
b https://builtwith.com/?q=%s
tr http://translate.google.com/?source=osdd#auto|auto|%s
archive https://web.archive.org/web/*/%s
u https://www.urbandictionary.com/define.php?term=%s
ii {google:baseURL}search?tbm=isch&q=%s
v {google:baseURL}search?q=site%3Avimeo.com+%s
lw {google:baseURL}search?q=site%3Alesswrong.com+%s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment