# getAccountInfo

Returns all information associated with the account of provided Pubkey

#### Parameters required for this RPC call

* The **account address** for which we are fetching the account info. This is usually provided as a string.
* **configuration object**: This contains the following methods.
  * **commitment**: The commitment describes how finalized a block is at that point in time.
  * **encoding**: The encoding format of the account data. The options can be base58, base64, base64+zstd, jsonParsed.
  * **dataSlice**: Requests a part of the account data instead of the full account data. This also has two parameters: `length: <usize>` - number of bytes to return & `offset: <usize>` - byte offset from which to start reading.
  * **minContextSlot**: The minimum slot that the request can be evaluated at.

{% tabs %}
{% tab title="cURL" %}

```bash
curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
  POST -H "Content-Type: application/json" -d ' 
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getAccountInfo",
    "params": [
      "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
      {
        "commitment": "finalized",
        "encoding": "base58"
      }
    ]
  }
'
```

{% endtab %}

{% tab title="Web3.js" %}

<pre class="language-javascript"><code class="lang-javascript">import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";

const connection = new Connection("https://rpc.shyft.to?api_key=YOUR-API-KEY", "confirmed");
<strong>const publicKey = new PublicKey("vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg");
</strong>const accountInfo = await connection.getAccountInfo(publicKey);

console.log("Account Info:", JSON.stringify(accountInfo, null, 2));
</code></pre>

{% endtab %}

{% tab title="Response" %}

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "apiVersion": "2.0.15", "slot": 341197053 },
    "value": {
      "data": [
                "F7f4N2DYrWAGMT4xa88DAkaR//wGAAAAFpkr5dnQAgCrJdwAAAAAAACAxqR+jQMAADEF7GVOCJySHmIL70rFDnnTHGrG55zYDskitMKp3eTJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                "base64"
            ], // can be in the formats specified above
      "executable": false,
      "lamports": 88849814690250,
      "owner": "11111111111111111111111111111111",
      "rentEpoch": 18446744073709551615,
      "space": 0
    }
  },
  "id": 1
}
```

{% endtab %}
{% endtabs %}
