Add-ons

search.get()

Retrieve all search engines.

You can use this function to get all the search engines installed in the browser. It returns a list of all the engines available to the user, which include the properties to identify a certain search engine.

You can use this function in combination with search.search()

This is an asynchronous function that returns a Promise.

Syntax

browser.search.get()

Return value

A Promise that will be fulfilled with an array of search engine objects.

name
string. The search engine name.
isDefault

boolean. Returns true if the search engine is the default one ("the selected one"). Only one search engine can be the default at the same time.

alias

string. Also called keyword, it contains a sequence of alphanumerical characters. The alias can be used in the address bar to search for terms using the engine which has that alias. 

favIconUrl

string. The icon of the search engine.

Browser compatibility

ChromeEdgeFirefoxFirefox for AndroidOpera
Basic support No No63 No No

Examples

Basic examples

Get all installed search engines:

function retrieved(results) {
  console.log(`There were: ${results.length} search engines retrieved.`);
  for (let searchEngine of results) {
    console.log(JSON.stringify(searchEngine));
  }
}

browser.search.get().then(retrieved);

Document Tags and Contributors

Contributors to this page: evilpie, kernp, smile4ever
Last updated by: evilpie,