chrome.search

Description

Use the chrome.search API to search via the default provider.

Permissions

search

Availability

Chrome 87+

Types

Disposition

Enum

"CURRENT_TAB"
Specifies that the search results display in the calling tab or the tab from the active browser.

"NEW_TAB"
Specifies that the search results display in a new tab.

"NEW_WINDOW"
Specifies that the search results display in a new window.

QueryInfo

Properties

  • disposition

    Disposition optional

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

  • tabId

    number optional

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

  • text

    string

    String to query with the default search provider.

Methods

query()

chrome.search.query(
queryInfo: QueryInfo ,
)
: Promise<void>

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

Parameters

Returns

  • Promise<void>

    Chrome 96+

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年08月11日 UTC.