Skip to main content
POST
/
9de47db917d4f69168e3fed02217d15b
getAccountInfo
curl --request POST \
  --url https://nd-326-444-187.p2pify.com/9de47db917d4f69168e3fed02217d15b \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getAccountInfo",
  "params": [
    "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
    {
      "encoding": "jsonParsed",
      "commitment": "finalized"
    }
  ]
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}
The Solana getAccountInfo method returns all the account data for a given public key. This method provides detailed information about the account, including the account’s current balance, owner, and executable state. It is useful for retrieving the state of an account at a specific commitment level.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  1. pubkey (string, required) — the base-58 encoded public key of the account to query.
  2. config (object, optional) — configuration object containing:
    • commitment (string) — the level of commitment desired:
      • processed — the node has processed the block and the block may be on a fork.
      • confirmed — the block is confirmed by the cluster as not being on a fork.
      • finalized — the block is finalized by the cluster.
    • encoding (string) — encoding for the account data. Values:
      • base64 — raw bytes as a base64 string (default).
      • base58 — raw bytes as a base58 string (slow for large data).
      • base64+zstd — zstd-compressed base64.
      • jsonParsed — returns parsed JSON for known account types (token accounts, nonce accounts, vote accounts, stake accounts, etc.). Falls back to base64 for unknown programs.
    • dataSlice (object) — request a slice of the account’s data. Contains offset (byte offset) and length (number of bytes). Only available for non-jsonParsed encodings.
    • minContextSlot (integer) — the minimum slot at which the request can be evaluated.

Response

  • context — an object containing slot and apiVersion.
  • value — the account information (null if the account does not exist):
    • lamports (u64) — the account’s current balance in lamports.
    • owner (string) — the base-58 encoded public key of the program that owns the account.
    • executable (boolean) — whether the account is marked as executable.
    • rentEpoch (u64) — the epoch at which this account will next owe rent.
    • data — the account’s data in the requested encoding:
      • Default: [data, encoding] tuple (e.g., ["base64data...", "base64"]).
      • With jsonParsed: a {program, parsed, space} object. The program field identifies the owning program (spl-token, spl-token-2022, nonce, stake, vote, etc.) and parsed contains the decoded account state.
    • space (u64) — the data size of the account in bytes.

Use case

A practical use case for getAccountInfo is to retrieve the current state of any Solana account — balances, token account data, program state, or nonce accounts. Using jsonParsed encoding is especially useful for token accounts, as it returns the mint, owner, balance, delegate, and state without manual deserialization.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:getAccountInfo
params
(string | object)[]

The public key of the account

Response

200 - application/json

Account information

jsonrpc
string
id
integer
result
object
Last modified on April 17, 2026