JavaScript APIs

Chrome provides apps with many special-purpose APIs like chrome.runtime and chrome.alarms.

Stable APIs

NameDescriptionSince
accessibilityFeatures Use the chrome.accessibilityFeatures API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request accessibilityFeatures.read permission. For modifying feature state, the extension needs accessibilityFeatures.modify permission. Note that accessibilityFeatures.modify does not imply accessibilityFeatures.read permission. 37
alarms Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future. 22
app.runtime Use the chrome.app.runtime API to manage the app lifecycle. The app runtime manages app installation, controls the event page, and can shut down the app at anytime. 23
app.window Use the chrome.app.window API to create windows. Windows have an optional frame with title bar and size controls. They are not associated with any Chrome browser windows. See the Window State Sample for a demonstration of these options. 23
bluetooth Use the chrome.bluetooth API to connect to a Bluetooth device. All functions report failures via chrome.runtime.lastError. 37
bluetoothLowEnergy The chrome.bluetoothLowEnergy API is used to communicate with Bluetooth Smart (Low Energy) devices using the Generic Attribute Profile (GATT). 37
bluetoothSocket Use the chrome.bluetoothSocket API to send and receive data to Bluetooth devices using RFCOMM and L2CAP connections. 37
commands Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension. 35
contextMenus Use the chrome.contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages. 6
events The chrome.events namespace contains common types used by APIs dispatching events to notify you when something interesting happens. 21
extensionTypes The chrome.extensionTypes API contains type declarations for Chrome extensions. 39
fileSystem Use the chrome.fileSystem API to create, read, navigate, and write to the user's local file system. With this API, Chrome Apps can read and write to a user-selected location. For example, a text editor app can use the API to read and write local documents. All failures are notified via chrome.runtime.lastError. 23
fileSystemProvider Use the chrome.fileSystemProvider API to create file systems, that can be accessible from the file manager on Chrome OS. 40
gcm Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service. 35
hid Use the chrome.hid API to interact with connected HID devices. This API provides access to HID operations from within the context of an app. Using this API, apps can function as drivers for hardware devices. Errors generated by this API are reported by setting runtime.lastError and executing the function's regular callback. The callback's regular parameters will be undefined in this case. 38
i18n Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension. 5
identity Use the chrome.identity API to get OAuth2 access tokens. 29
idle Use the chrome.idle API to detect when the machine's idle state changes. 6
mediaGalleries Use the chrome.mediaGalleries API to access media files (audio, images, video) from the user's local disks (with the user's consent). 23
notifications Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray. 28
permissions Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary. 16
power Use the chrome.power API to override the system's power management features. 27
runtime Use the chrome.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs. 22
serial Use the chrome.serial API to read from and write to a device connected to a serial port. 23
socket Use the chrome.socket API to send and receive data over the network using TCP and UDP connections. Note: Starting with Chrome 33, this API is deprecated in favor of the sockets.udp, sockets.tcp and sockets.tcpServer APIs. 24
sockets.tcp Use the chrome.sockets.tcp API to send and receive data over the network using TCP connections. This API supersedes the TCP functionality previously found in the chrome.socket API. 33
sockets.tcpServer Use the chrome.sockets.tcpServer API to create server applications using TCP connections. This API supersedes the TCP functionality previously found in the chrome.socket API. 33
sockets.udp Use the chrome.sockets.udp API to send and receive data over the network using UDP connections. This API supersedes the UDP functionality previously found in the "socket" API. 33
storage Use the chrome.storage API to store, retrieve, and track changes to user data. 20
syncFileSystem Use the chrome.syncFileSystem API to save and synchronize data on Google Drive. This API is NOT for accessing arbitrary user docs stored in Google Drive. It provides app-specific syncable storage for offline and caching usage so that the same data can be available across different clients. Read Manage Data for more on using this API. 27
system.cpu Use the system.cpu API to query CPU metadata. 32
system.display Use the system.display API to query display metadata. 30
system.memory The chrome.system.memory API. 32
system.network Use the chrome.system.network API. 33
system.storage Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached. 30
tts Use the chrome.tts API to play synthesized text-to-speech (TTS). See also the related ttsEngine API, which allows an extension to implement a speech engine. 14
types The chrome.types API contains type declarations for Chrome. 13
usb Use the chrome.usb API to interact with connected USB devices. This API provides access to USB operations from within the context of an app. Using this API, apps can function as drivers for hardware devices. Errors generated by this API are reported by setting runtime.lastError and executing the function's regular callback. The callback's regular parameters will be undefined in this case. 26

Beta APIs

These APIs are only available in the Chrome Beta and Dev channels:

NameDescription
browser Use the chrome.browser API to interact with the Chrome browser associated with the current application and Chrome profile.

Dev APIs

These APIs are only available in the Chrome Dev channel:

NameDescription
audio The chrome.audio API is provided to allow users to get information about and control the audio devices attached to the system. This API is currently only implemented for ChromeOS.
copresence Use the chrome.copresence API to communicate with other nearby devices using Google's copresence service.
documentScan Use the chrome.documentScan API to discover and retrieve images from attached paper document scanners.
location Use the chrome.location API to retrieve the geographic location of the host machine. This API is a version of the HTML Geolocation API that is compatible with event pages.
printerProvider

The chrome.printerProvider API exposes events used by print manager to query printers controlled by extensions, to query their capabilities and to submit print jobs to these printers.

Available only on dev channel since Chrome 42.

vpnProvider Use the chrome.vpnProvider API to implement a VPN client.
wallpaper Use the chrome.wallpaper API to change the ChromeOS wallpaper.

Experimental APIs

Chrome also has experimental APIs, some of which will become supported APIs in future releases of Chrome.

API conventions

Unless the doc says otherwise, methods in the chrome.* APIs are asynchronous: they return immediately, without waiting for the operation to finish. If you need to know the outcome of an operation, then you pass a callback function into the method. For more information, watch this video: