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

# How to Get Solana Accounts: Complete RPC Guide

> Learn how to fetch Solana account data using Helius RPC methods. Get single accounts, multiple accounts, and batch retrieval with best practices.

Solana accounts store all raw data on the blockchain. This guide demonstrates how to efficiently retrieve account data using Helius APIs.

## Using RPC Methods

The most direct way to read account data is through Solana RPC methods:

```typescript theme={"system"}
// Replace YOUR_API_KEY with the API key from your Helius dashboard
const response = await fetch(`https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: "1",
    method: "getAccountInfo",
    params: ["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri", { encoding: "jsonParsed" }],
  }),
});
const data = await response.json();
console.log("Account data:", data.result.value);
```

<Card title="API Reference" horizontal icon="code" href="/docs/api-reference/rpc/http/getaccountinfo">
  getAccountInfo
</Card>

## Common Parameters

* `encoding`: Choose from `base58`, `base64`, or `jsonParsed` (recommended)
* `commitment`: Data consistency level (`processed`, `confirmed`, or `finalized`)
* `dataSlice`: Fetch only a specific portion of the account data

## Getting Multiple Accounts

For batch retrieval, use `getMultipleAccounts`:

```typescript theme={"system"}
const response = await fetch('https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: '1',
    method: 'getMultipleAccounts',
    params: [
      ['83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri', 'SysvarC1ock11111111111111111111111111111111', 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'],
      { encoding: 'jsonParsed' }
    ]
  })
});
const data = await response.json();
console.log("Multiple accounts data:", data.result.value);
```

<Card title="API Reference" horizontal icon="code" href="/docs/api-reference/rpc/http/getmultipleaccounts">
  getMultipleAccounts
</Card>

## Best Practices

* Use account subscriptions via WebSockets for real-time updates
* For large-scale data needs, consider using the Helius DAS API or LaserStream
* Cache account data when appropriate to reduce API calls


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.