This API is experimental. It is only available to Chrome users on the dev channel.

chrome.search

Description: Use the chrome.search API to search via the default provider.
Availability: Since Chrome 87. Warning: this is the current Dev channel. Learn more.
Permissions: "search"

Summary

Methods
query chrome.search.query(object queryInfo, function callback)

Methods

query

chrome.search.query(object queryInfo, function callback)

Used to query the default search provider. In case of an error, runtime.lastError will be set.

Parameters
object queryInfo
string text

Not fully implemented. You must build Chromium from source to try this API. Learn more.

String to query with the default search provider.

enum of "CURRENT_TAB", "NEW_TAB", or "NEW_WINDOW" (optional) disposition

Location where search results should be displayed. CURRENT_TAB is the default.

CURRENT_TAB
Display results in the calling tab or the tab from the active browser.
NEW_TAB
Display search results in a new tab.
NEW_WINDOW
Display search results in a new window.
integer (optional) tabId

Location where search results should be displayed. tabId cannot be used with disposition.

function (optional) callback

If you specify the callback parameter, it should be a function that looks like this:

function() {...};