How to add a custom search engine to Firefox?

87

40

Is there a way I can add a custom search URL to the Firefox search bar? e.g. I'd like to provide a URL such as http://blahblah.com?search=%s, where Firefox replaces the %s with the content of the search box.

Both IE and Opera can do this, but I can't figure out how to set it up in Firefox.

Andrew Grant

Posted 2009-07-17T18:00:28.233

Reputation: 1 274

adding a bookmark pointing to its query (with a shortcut on it) was the easiest (eg: bookmark https://www.youtube.com/results?search_query= )

– JinSnow – 2015-12-07T07:41:19.580

See also: https://stackoverflow.com/q/9963256/712526

– jpaugh – 2018-01-30T15:49:21.743

Answers

75

Add keywords to the address bar:

For example, you can set up your browser to search for bread at stackoverflow.com by simply typing so bread into the omnibar.

Do this by right-clicking on the search bar on the website you commonly search. You can do this for the Search field on any website.

Right click on the search bar

Specifically:

  1. Go to the site you want to use to search
  2. Right-Click on the search box you fill out on their page (not Firefox's)
  3. Select "Add a keyword"
  4. Enter the keyword to use when you want to search in that site (eg: "so")

Javier

Posted 2009-07-17T18:00:28.233

Reputation: 3 053

It is not possible to create search keywords on all websites (at least through the context menu), for instance www.gog.com. – user598527 – 2017-11-09T10:49:07.983

A downside to this method is that it is not possible to enter an empty keyword, therefore keyword search can't replace a search engine. – user598527 – 2017-11-09T10:50:22.507

I wish chrome had this. – Jed Daniels – 2010-09-13T20:53:36.577

4Is there more updated info on this maybe? Just downloaded latest Firefox on macOS and this doesn't work. :-( – user24601 – 2018-03-16T13:39:29.070

1This is not working now – Giulio Caccin – 2018-03-31T19:27:23.563

This still works, at least on some machines (Firefox 68, Windows 10) – Qw3ry – 2019-08-27T06:49:06.943

Working on Firefox 70 on MacOS. Remember to perform the search in the URL bar and not the search bar. – TenLeftFingers – 2019-11-17T01:11:01.483

Of course, this only works if there is a search-box available to click on, and worse, it doesn't let you customize the actual query. I can't believe Firefox still doesn't let you natively add customize search engines which Chrome has let you do since it first came out. :-| – Synetech – 2020-03-01T01:10:43.630

4@Jed Daniels Chrome does have it in the form of custom search engines - Options -> Manage Search Engines – Dan H – 2011-07-03T07:12:41.680

@DanH, yes, but the chrome functionality is frustratingly lacking compared to the firefox ability. For example, it only works with search engines that have the search terms in the URL, and you have no control over which searches get added. – Jed Daniels – 2011-07-03T23:01:58.387

@Jed Daniels You can add searches manually, but I agree, in Chrome they aren't nearly as user friendly or featureful as in Firefox. Chrome's weak support was one of the reasons I created an alternative to built-in custom search engines - it's at http://shortmarks.com if you want to check it out.

– Dan H – 2011-07-04T04:04:26.903

1+1 Wow, to my mind that makes the regular search bar obsolete. – Kazark – 2012-01-11T20:23:10.650

6I had no idea that existed... just added 'su' for this site! works great, good tip! – codeLes – 2009-07-17T19:40:03.140

89

I'd like to provide a URL such as "http://blahblah.com?search=%s" where Firefox replaces the %s with the content of the search box.

You can do this with Firefox! Add a bookmark with that URL, where %s is the search query, then simply set a keyword for the bookmark. You can then search using <key> <search term> in the address bar. For example, the bookmark http://www.google.com/search?q=%s with keyword g means you can type g stack overflow in the address bar to search Google for "stack overflow".

Alternatively, go to the site you want to search, right click in the search box and click "Add a keyword for this search".

DisgruntledGoat

Posted 2009-07-17T18:00:28.233

Reputation: 4 068

I momentarily thought this doesn't work anymore, but then I noticed I had put the keyword in the "Tags" field. It's working now! – Ed Brannin – 2015-06-26T14:25:01.947

1And what if I don't want a bookmark? What if I only want a search engine without bookmarking it? – Synetech – 2017-07-13T18:55:49.550

@Synetech why would you be opposed to bookmarks? – DisgruntledGoat – 2017-07-15T00:28:39.097

2Best answer IMO, as it depends only on URLs, not website-specific search boxes. – ThomasH – 2018-03-02T10:25:38.960

3

Apparently putting the %s in the domain part of the URL is now deprecated/broken in FF67 and up. See https://bugzilla.mozilla.org/show_bug.cgi?id=1553377

– kmarsh – 2019-07-09T14:50:55.563

2Although it's very counter-intuitive, it works (v69.0) – Seu Madruga – 2019-09-30T04:56:39.133

@Synetech Put it anywhere that is not "bookmarks toolbar" or a subfolder of that. I have never seen those bookmarks showing up anywhere except in menu→library→bookmarks→show all bookmarks, which is hidden enough in my opinion. I honestly have no idea what the difference between "bookmarks menu" and "other bookmarks" is. – Fabian Röling – 2020-02-29T00:31:14.817

@FabianRöling, the bookmark still exists. That might work "well enough", but (1) it's just sweeping it under the rug, and (2) shouldn't be necessary since there is a system that doesn't involve bookmarks. (I usually use the Add custom search engine add-on, but do have some bookmarks as well which I keep in a dedicated Search Engines folder. :-|) – Synetech – 2020-03-01T01:14:44.900

2This is simply awesome! One more reason to love firefox. – qed – 2013-10-20T16:49:38.693

13

The Add custom search engine extension lets you create a new search engine and customize it.

spaetzel

Posted 2009-07-17T18:00:28.233

Reputation: 371

Nice. Needed to use this to search using Duckduckgo's POST mode. – user1338062 – 2017-01-02T05:13:30.067

1You have to install an add-on to be able to add a custom search engine. It's little things like this that make it so hard to leave Chrome. :-( – Synetech – 2017-07-13T18:57:59.570

2

doesn't exist anymore. found another one: https://addons.mozilla.org/en-US/firefox/addon/add-custom-search-engine/

– skywinder – 2019-08-22T15:58:36.510

1

See this other answer for an extension that is active: https://superuser.com/questions/7327/how-to-add-a-custom-search-engine-to-firefox/1474187#1474187

– wisbucky – 2019-09-24T20:53:45.593

I use this for my custom Google Search Engine. – Leigh Riffel – 2009-07-17T19:18:38.030

10

Your best bet is to go to the Mycroft Project and search for an already made search engine plugin.

If you can't find one you can create your own on the submissions page. Full instructions are available.

Dalvenjia

Posted 2009-07-17T18:00:28.233

Reputation: 101

Wow this saved the day for me! This answer should be much higher upvoted. If you want to modify one of your default search engines, you may need to change the plugin name slightly – Pluto – 2018-03-16T22:12:09.563

I was able to add duckduckgo POST to my firefox using the Mycroft search engine. – user674669 – 2018-07-14T06:08:03.017

4

Ready2Search is also an available free service that helps you do this for any site. It makes search plug-in for Internet Explorer, Firefox, Chrome, and Google Toolbar with great customization options (icons, query parameters, etc.).

Screenshot of Ready2Search

warmth

Posted 2009-07-17T18:00:28.233

Reputation: 916

2

The actual, no-bookmark solution for this task:

  1. Open a web page that has a search on it (e.g. MDN: developer.mozilla.org).
  2. In the address bar, find the icon with the three dots (for me, it’s on the right end of the address bar) and click it.

    Screenshot of Firefox’s addressbar showing an icon with three dots.

  3. Click “Add Search Engine”. This adds the web page’s search to the search engines in your preferences.

If you want to set a keyword (e.g. mdn) for this search, follow these steps:

  1. Open the search preferences (or type the following URI in your address bar: about:preferences#search)
  2. In the table under the column for “Keyword”, double-click in order to set your own keyword.

kleinfreund

Posted 2009-07-17T18:00:28.233

Reputation: 295

1It's sad that FF allows to do that only for web sites which explicitly provide this feature. – Monsignor – 2019-10-07T12:16:03.783

2

Alternative way for custom search

For an example Google Translate string: https://translate.google.com/m/translate#auto/en/%s so top answer here doesn't work. So I found a workaround with the plugin: add-custom-search-engine

And here we go:

enter image description here

Goes to :

enter image description here

skywinder

Posted 2009-07-17T18:00:28.233

Reputation: 193

2This extension works perfectly to add a custom search engine. It should be a core part of Firefox, not an extension! – wisbucky – 2019-09-24T20:49:21.237

Thanks for this. This works great and is one of the more user-friendly solutions. I'd rather not use the bookmarks solution as I mirror my Firefox bookmarks from another browser. This solution ensures that my custom search engines don't get messed up when I do a mirror or syncing of bookmarks. – galacticninja – 2020-01-15T03:12:11.093

1

Here is a nice tutorial for Firefox's QuickSearch feature:

Quick search in a nutshell, allows you to turn a typical routined web search process into a command line shortcut. For example, instead of going to wikipedia.com to enter the search terms there, you can use “w mySearchTerm” from Firefox’s address bar.

There are only a few steps you'll have to take:

  1. Right click on the search input field on the web page which provides the search form
  2. Choose "Add a keyword for this search."
  3. Give the custom search a name, you'll later use for searching (example: "mysrch" or a single letter)
  4. Search by inserting "mysrch yourSearchTerm." in Firefox's address bar.

splattne

Posted 2009-07-17T18:00:28.233

Reputation: 14 208

That method creates a bookmark. What if I don't want a bookmark? – Synetech – 2017-07-13T19:01:34.720

1

It's as simple as right clicking in a search field.

The other advantage is that this process creates a bookmark for you. If you use something like XMarks to synchronize your bookmarks, you can access the same search functionality across all synchronised computers.

brack

Posted 2009-07-17T18:00:28.233

Reputation: 264

Unfortunately it doesn't seem to play nicely with the builtin Firefox Sync. – sourcejedi – 2013-04-07T11:49:47.000

1

You can also make complex searches with multiple parameters, and here’s how.

For instance, imagine you have a two field search like this fictitious example:

http:// mymusic.com/search?artist=david+bowie&album=ziggy+stardust

You can make a new search like:

javascript:q="%s";if(q.indexOf(",")>0){q=q.split(",");location.href="http://mymusic.com/search?artist="+q[0]+"&album="+q[1]}

Then you can directly search for: mm david bowie,ziggy startdust

I choose “,” as the separator, but it’s just an example. It’s perfectible, but you get the idea, and anything is possible.

※ Notice that you have to use a tab that has already loaded any page as blank new tabs don’t have a JavaScript engine ready, and there is the same limitation in Opera 12. That is only possible in Chromium and also in blank new tabs.

jesus2099

Posted 2009-07-17T18:00:28.233

Reputation: 11

0

A bit late to the party, but for those finding this thread now you can click the search icon in the search bar when on the site you want if it has a green + icon on it.

user723857

Posted 2009-07-17T18:00:28.233

Reputation:

What if it does not show the green + like on a site (e.g., eBay)? – Synetech – 2017-07-13T18:59:52.633

0

Instead of creating it manually you can use a service like Searchplugins.net which provides an online form to generate your custom search plugin.

  1. Search for the word "TEST" in the search engine of your choice and copy/paste the resulting url to the form. eg.

    http://blahblah.com?search=TEST

  2. Fill out remaining info / click "create plugin"

  3. Click "Install" which appears above the form. The plugin will be added to your search bar.

Tapper

Posted 2009-07-17T18:00:28.233

Reputation: 111

-2

I believe he's referring to keyword.URL in Firefox's about:config page.

In Firefox's address bar type about:config, then search for keyword.URL and replace its contents with "https://blahblah.com/search?q=", for example.

Sam P

Posted 2009-07-17T18:00:28.233

Reputation: 1