search

Use the search API to retrieve the installed search engines and execute searches.

To use this API you need to have the "search" permission.

When choosing between search.query() and search.search(), consider the following:

  • search.query() is available in most major browsers, making it ideal for use in cross-browser extensions. However, it can only issue searches against the browser's default search engine.
  • search.search() is available only in Firefox. However, it has the advantage of being able to issue a search against any search engine installed in the browser.

Functions

search.get()

Retrieve all search engines.

search.query()

Search using the browser's default search engine.

search.search()

Search using a specified search engine.

Example extensions

Browser compatibility

BCD tables only load in the browser