Retrieves one or more items from the storage area.

  keys,                    // null, string, or array of strings or objects
  function(results){...}   // function

This API is also available as<storageType>.get() in a version that returns a promise.

<storageType> will be one of the writable storage types — storage.sync or storage.local.


A key (string) or keys (an array of strings or objects) to identify the item(s) to be retrieved from storage. If you pass an empty string or array here, an empty object will be retrieved. If you pass null here the entire storage contents will be retrieved.
A callback function that is run when the operation completes. If the operation is successful, the function is passed a results object containing every object in keys that was found in the storage area. If the operation fails, runtime.lastError is set.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes Yes 45.0 48.0 33


// callback for get()
function gotItem(item) {
  if (chrome.runtime.lastError) {
  } else {

// storage contains two items,
// "kittens" and "monsters"{
  kitten: {name:"Mog", eats:"mice"},
  monster:{name:"Kraken", eats:"people"}

// with no `keys` argument, retrieve everything;
// -> Object { kitten: Object, monster: Object }

// with an empty array, retrieve nothing[], gotItem);
// -> Object {  }

// with the name of an object, retrieve the match"kitten", gotItem);
// -> Object { kitten: Object }

// with an array of object names, retrieve all matches["kitten", "monster", "grapefruit"], gotItem);
// -> Object { kitten: Object, monster: Object }

Example add-ons


This API is based on Chromium's API. This documentation is derived from storage.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: Makyen, fiveNinePlusR, wbamberg, chrisdavidmills
 Last updated by: Makyen,