Today we’ll look at the format of the search.ini, as much as I understand it, and look at how you can change/edit/add your own entries. I hope that you will understand how to tinker with the file yourself, and then I’ll introduce you to some of the tools for making this process easier.

The most important thing to know when working with search.ini is this: Make Backups. Don’t leave your only copy in Opera’s control, as it will overwrite your copy when they update it, which they do from time to time. However, if that happens, Opera will save your old search.ini in a \Uninst\Backup. Still, why take the chance? (Ok, I know that you probably won’t listen to reason, so here’s a copy of the default search.ini in case you lost yours.)

So the first thing to look at is what Opera gives you by default. You can check what Opera has to offer by going to the Advanced Preferences (If you are using MSWindows: ctrl + F12 or Tools → Preferences. On Mac OS X: cmd + F12 or cmd + , or the Opera menu → Preferences). Click on “Advanced” and then “Search”.

The default searches in Opera 8.01 are:

Search Engine Keyword
Google g
Opera Web s
Amazon.com z
Price Comparison c
Ebay.com e
Download.com w
Google groups r
Google News n
Find in page f
Opera support o

What do those letters mean? Well, they are the search shortcuts. You can use them in the addressbar or in the F2 prompt. For example if you want to search Google for “Opera Lover” you would use “g Opera Lover”.

Easy enough, right? But what if you want more choices? Of course Opera will let you do that. Unfortunately you have to edit the file directly. There really ought to be an easier way (OmniWeb does this really well). The good news is that it isn’t all that hard. The bad news is that you have to make sure that Opera is not running.

Well let’s take a look at one entry, the one from Google:

[Search Engine 1]
Name=&Google
URL=http://www.google.com/search?q=%s&sourceid=opera&num=%i&ie=utf-8&oe=utf-8
Query=
Key=g
Is post=0
Has endseparator=0
Encoding=utf-8
Search Type=0
Verbtext=17063
Position=-1
Nameid=0

There are threethings to notice here. First is the %s in the URL line. That %s will be converted to whatever you enter after the keyword. The second is Key=g. The third is the & which indicates what letter is used for the quick search (F2 + LETTER)

The pre-assigned keyboard shortcuts are all single keys, but they don’t have to be. This comes in handy if you want to use a longer keyword like “mw KEYWORD” to search m-w instead of the default dictionary or “af” for AcronymFinder, or “imdb” for the ultra-cool IMDB.

So let’s look at how to add your own. First, go to a website that has a search engine you want to use. I’m going to use IMDB as an example because it’s the site that I go to when we’re watching a movie and I say to my wife “What else was that actress in?” and she looks up and says “She was the doctor in that other show” and I say “No she wasn’t” and she says “You still doubt my powers? How long have we been married?” and I hardly hear her because I’m already pulling up IMDB and finding out that she’s absolutely right. Again.

Head over to IMDB. Notice the search engine on the top left and choose from the dropdown (I choose “all” because I like to cast a wide net) and then I plug in “Batman Begins” (because that’s the last movie I saw) and execute the search and see that it takes me to http://www.imdb.com/find?q=batman%20begins;s=all. We’ve already learned that we replace the search term (“batman%20begins”) with %s. Then we decide that we want to use “imdb” as the search keywords… and then we plug it into search.ini (while Opera is not running). I generally look for one of the entries that I am not going to use and change everything after the [Search Engine X] line:

[Search Engine 6]
Name=IMDB
URL=http://www.imdb.com/find?q=%s;s=all
Query=
Key=imdb
Encoding=utf-8
Is post=0
Has endseparator=0
Search Type=0
VerbText=17063
Nameid=0
Position=-1

Now rather than Key=imdb you could have used Key=i but that would conflict with my search for Google Image Search (which would be http://images.google.com/images?biw=&q=%s&hl=en&btnG=Search+Images by the way). Choose your own adventure.

That’s all there is to it.

OK, so there are a whole bunch of lines in there that I haven’t talked about. Why not? Because you really don’t need to know them for most uses.

Google: I’m Feeling Lucky

This one is a little tricky since you can’t see the resultant URL. Some searching around revealed this:

[Search Engine 8]
Name=Google - I’m Feeling Lucky
URL=http://www.google.com/search?hl=en&ie=iso-8859-1&q=%s&sourceid=opera&btnI=I%27m+Feeling+Lucky
Query=
Key=l
Encoding=iso-8859-1
Is post=0
Has endseparator=0
Search Type=0
VerbText=17063

What searches do you use? Good reference sites that you’d recommend to others? Leave a comment, make the world a better place.

See Also: