keyword searching

A lot of people have been creating bookmarklets and toolbars and that's great, but they usually only work in IE only. So here's a technique for Mozilla users: Custom keyword searches. It's best to illustrate with an example, so if i want to search "guns n roses lyrics" on Google, I just type:

gg guns n roses lyrics

in the location bar. Simple. And it doesn't use any toolbar real estate that custom toolbars or bookmarklet links would. It's a great feature for power users and you linux dudes who love command line interfaces.

To create these custom keywords, from the bookmark manager, create a new bookmark and enter the name and location. See the list below for samples. Unfortunately, when you create a new bookmark, it doesn't let you enter a keyword. To associate the keyword, choose Edit | Properties and add it there. Here's a screenshot of what my Google bookmark properties looks like. This should give you an idea if you're confused or haven't explained it properly.

Keywords I've got setup as well as examples of use:

Name: Google
Keyword: gg
Example: gg guns n roses lyrics

Name: Google Groups
Keyword: gs
Example: gs mozilla performance

Keyword: az
Example: az lateralus

Name: Domain WHOIS
Keyword: whois
Example: whois

Name: IMDB
Keyword: imdb
Example: imdb ben kingsley

Name: SNPP
Keyword: snpp
Example: snpp i found a moon rock in my nose

(i quote a lot of Simpsons)

Keyword: dc
Example: dc vapid

Name: Roget's Thesaurus
Keyword: ts
Example: ts obsequious

Name: w3 Validator
Keyword: w3
Example: w3

So to create your own, you just have to lookup how the search/lookup works and replace your search term with %s in the bookmark. As you can tell, this is very customizable and you can create one for whatever site you use most. Hope this was helpful.

» posted by pinder on March 05, 2002 at 04:41 PM


Great post, thanks for the info, i alwayse love getting to noe all those hidden functions in mozilla, they make it better and better!

# posted by ahmed k

Funny...I wrote some bookmarklets but they only work in Mozilla for some reason...IE kept erroring on "getElementByTagName()". Oh well....:-)

# posted by blockcipher

There is no such thing as getElementByTagName(). However, there is getElementsByTagName() which creates an array from desired elements. :-P

# posted by sven

I know it's not mozilla related, but thought I'd mention that galeon ( 1.1.x has the ability to add these types of bookmarks automatically by just bookmarking a (special) link. Hit for info and smartbookmarks to download/install.

For those who don't know, galeon is a mozilla based browser for GNOME under Linux.

# posted by arcterex

another one I forgot to mention:

Keyword: php
Example: php xslt

# posted by pinder

Are you kidding me? The link for the popup screenshot works in IE but not the build of Mozilla I'm running!

# posted by Dave

the popup screenshot works fine for me. i only have onload popups disabled, not all. have you disabled all popups?

if your user prefs file (prefs.js) has the line:

user_pref("", "noAccess");

that means all popups are disabled. but if you have the line:

user_pref("dom.disable_open_during_load", true);

then no onload popups/popunders will open. although if you want to disable popups, it's recommended you go Edit|Preferences|Advanced|Scripts & Windows and uncheck "Open unrequested windows" instead of hacking the prefs.js file.

# posted by pinder

One problem I've had with bookmarklets is that they keep getting truncated if they're long (I think 255 characters is the longest allowed). My Movable Type bookmarklets are among those affected by this annoyance. Does the same thing happen with these keywords?

I'm running 0.9.8+ (Mac) right now, and it doesn't seem to have gotten any better.

In any case, this looks quite tasty, and I can't wait to try it out.

# posted by Joe

Google Image Search:

# posted by fluffy

how do I work do I work out the search string for a site? i.e. ?

# posted by Aidan Clark

Keyword: enc (or whatever you would like)

# posted by pinder (biggest German seller for used books).

# posted by Simon Spiegel (another seller of used books).

# posted by Simon Spiegel (you can easily change it to

# posted by Simon Spiegel

Internet Explorer also has this ability, granted it needs an undocumented, unsupported utility to do so.

It says it only works for ie5, but I migrated up to six, and everythings kosher. I even added a gg for google when I stumbled across this page, although I usually use the toolbar.

# posted by Clay Oehlke



Name: (can easily be changed to

# posted by Simon Spiegel

To search for rpms on

# posted by Phiberoptix

I noticed that you point out good resources to your users at that talk about checking whois results and domain names. I would appreciate if you would point out This domain name search engine is a great research tool. There are some cool new few features on the site that can't be found anywhere else. So I think it is worth your time to take a look at it and let your readers know about it.


# posted by Erik

Name: Altavista
Keyword: av
Example: av mame emulator

# posted by Alan Perry

Is there any way to use Keyword search to make a shortcut for a word or phrase that is not part of a URL? For instance, I'd like to have a keyword 'dl' for download so that I can type 'dl program_name' and get a search using my default search engine (Google) of 'download program_name'. I admit, I'm bone-lazy.

# posted by Ed Biow

Use something like this for w3 validator (to check a page you're on): "javascript:window.document.location=''+window.document.location;"

# posted by FlatLine

To Ed Biow, try this:

Save that as a bookmark, and bind it to 'dl', then you can just type 'dl open office' and it will query Google with the query 'download open office.' hth...

# posted by neil


# posted by Fazal Majid

For some sites, like MapQuest, you need multivariable queries like
For those, you can use grayrest's javascript function at

# posted by i_am_a_wanderer

I tried to figure out how to do an artist search on but no luck. Can anyone help me out with this one?

# posted by mr_cleen via google:
name: maps
keyword: mm
example: mm 20 Oxford St Cambridge MA

# posted by aplesch

to mr_cleen:

Here are the bookmarks:

name: allmusic artists
keyword: ar
example: ar stewart

name: allmusic albums
keyword: al
example: al beatles

name: allmusic songs
keyword: so
example: so roses

name: allmusic styles
keyword: st
example: st hip

name: allmusic labels
keyword: la
example: la hip

DOM inspector is very useful, lets bow to mozilla :)


# posted by aplesch

I use two keywords that are quite helpful over at the MozillaZine Forums. The first is a search for all posts since last visit (keyword: mz new). The second is a search for your posts, or mine as it were (keyword: mz ego).

# posted by Jonathan

have you seen this keywords optimization site:

# posted by jenny

I found a tool that creates mispellings for you!
This helps you target Google searchers who have typos!

# posted by Geraldo Lueni

I put all the keywords that I use on my wiki at

I'm trying to put as many references to Custom Keywords there to provide plenty of reference material for visitors.

Feel free to contribute!

# posted by Aaron

How about quick translations using Google? Here's Spanish to English:

Change langpair=XX to your desired source language:
fr French
es Spanish
it Italian
ge German

Reverse langpair=XX and hl=XX to change the direction.

# posted by straz

Oops - forgot to mention that for this to work, you need to modify the source site's url a bit:
a) leave off the http://
b) ignore the trailing /, if any

# posted by straz

Post a Comment

This discussion has been closed.