---
title: "Set a localStorage item"
method: POST
path: "/v1/browser/storage/local"
tags: ["Browser"]
---

# Set a localStorage item

`POST /v1/browser/storage/local`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/browser/storage/local`
- Auth: HTTP bearer

Sets a key-value pair in the page's localStorage via CDP Runtime.evaluate.

## Request body

- object
  - `key` string, required
  - `value` string, required

## Response `200`

Item set

- object
  - `success` true, required

## Other responses

- `400`: Invalid request
- `502`: CDP error
- `503`: Browser service not initialized

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
