Browser CLI icon

Browser CLI

Control a remote browser by talking directly to a browser-cli serve endpoint

Storage → Get

AI-generated

Summary

Reads localStorage or sessionStorage for a specified browser tab, returning the value for a given key or all keys if none is specified.

Inputs

  • tabId — Target tab ID. Leave 0 to use the currently active tab.
  • key — Storage key to retrieve. Omit to dump all keys for the selected storage type.
  • storeType — Storage type to read from: 'local' for localStorage or 'session' for sessionStorage.

Output shape

A single record containing the value (if a key was provided) or an object mapping all keys to their values (if no key was provided).

Returns a single item per input item; if the key does not exist, the value is null.

Examples

Example 1: Retrieve a specific item from localStorage in the active tab.

Resource: Storage, Operation: Get, Tab ID: 0 (active), Store Type: local, Key: 'user_preferences'

Example 2: Retrieve all items from sessionStorage in a specific tab.

Resource: Storage, Operation: Get, Tab ID: 42, Store Type: session, Key: (empty)

Links

Discussion