> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# starknet_getStorageAt

> Returns the value of the storage at the specified address and key.

### Parameters

<ParamField query="chainId" type="string" default="starknet-sepolia" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="starknet_getStorageAt" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={{"contract_address":"0x04D88BeCbd1DC984ae04A96E77828E603c5244e68224903D92CA0a1Ff1C8e807","key":"0x21","block_id":{"block_hash":"0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"}}} placeholder="{&#x22;contract_address&#x22;:&#x22;0x04D88BeCbd1DC984ae04A96E77828E603c5244e68224903D92CA0a1Ff1C8e807&#x22;,&#x22;key&#x22;:&#x22;0x21&#x22;,&#x22;block_id&#x22;:{&#x22;block_hash&#x22;:&#x22;0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4&#x22;}}">
  Parameters for starknet\_getStorageAt: \[contract\_address, key, block\_id]

  Parameters for <code>starknet\_getStorageAt</code>:

  <ul>
    <li><code>params.contract\_address</code>: Address of the contract to read from.</li>
    <li><code>params.key</code>: Key to the storage value for the specified contract.</li>
    <li><code>params.block\_id</code>: BlockID object containing hash and number.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="string">
  Value of the storage at the specified contract address and key. Returns 0 if no value found. Example: <code>"0x0"</code>.
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=starknet-sepolia \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "starknet_getStorageAt",
      "params": {
        "contract_address": "0x04D88BeCbd1DC984ae04A96E77828E603c5244e68224903D92CA0a1Ff1C8e807",
        "key": "0x21",
        "block_id": {
          "block_hash": "0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"
        }
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0"
  }
  ```
</ResponseExample>
