> For the complete documentation index, see [llms.txt](/llms.txt).

# `starknet_getStorageAt`

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

## Parameters[​](#parameters "Direct link to Parameters")

- `contract_address`: (string) [_Required_] The address of the contract to read from.
- `key`: (string) [_Required_] The key to the storage value for the specified contract.
- `block_id`: [_Required_] The block parameter object containing one of the following:  
  - `block_hash`: (string) Block hash.
  - `block_number`: (integer) Decimal block number.
  - One of the string tags `latest` or `pending`.

## Returns[​](#returns "Direct link to Returns")

The value at the specified address and key. Zero (0) is returned if no value is found.

## Example[​](#example "Direct link to Example")

Replace `<YOUR-API-KEY>` with an API key from your [Infura dashboard](https://app.infura.io/).

### Request[​](#request "Direct link to Request")

- curl

```
curl https://starknet-mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "starknet_getStorageAt",
    "params": {
      "contract_address": "0x04D88BeCbd1DC984ae04A96E77828E603c5244e68224903D92CA0a1Ff1C8e807",
      "key": "0x21",
      "block_id": {
        "block_hash": "0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"
      }
    },
    "id": 1
  }'

```

### Response[​](#response "Direct link to Response")

- JSON

```
{
  "jsonrpc": "2.0",
  "result": "0x0",
  "id": 1
}

```
