Skip to main content

getProgramAccounts RPC Method

Returns all accounts owned by the provided program address.

Updated on
Oct 29, 2026
Please note that, in addition to the plan-level rate limits, the getProgramAccounts method has a specific rate limit of 3 requests per second. This limit may change without notice to ensure system stability. For high-demand use cases, please reach out to discuss potential solutions.

Parameters

address
string

The address of the program encoded as a base-58 string

object
object

The configuration object with the following fields:

commitment
string

The level of commitment required for the query. The options include:

finalized
string

The node will query the most recent block the cluster has recognized as finalized

confirmed
string

The node will query the most recent block that has been voted on by the supermajority of the cluster

processed
string

The node will query its most recent block. Note that the block may not be complete

minContextSlot
integer

The minimum slot at which the request can be evaluated

withContext
boolean

Wraps the result in a RpcResponse JSON object

filters
array

Filter results using up to 4 filter objects. See Filtering

memcmp
object

Compares a slice of account data at the given offset to the provided bytes

offset
integer

Byte offset into account data to start comparing

bytes
string

Base-58 encoded bytes to match

dataSize
integer

Matches accounts whose data length equals this value in bytes

dataSlice
object

Request a slice of each account's data. Only available for base58, base64, or base64+zstd encodings.

  • When using base58, binary, or no encoding (defaults to base58), length must be ≤ 128 bytes. Requests exceeding 128 bytes with these encodings will be rejected with error code -32671. To return more than 128 bytes, use base64, base64+zstd, or jsonParsed encoding.
offset
integer

Byte offset from which to start reading account data

length
integer

Number of bytes to return

encoding
string

(Default: binary) Encoding format for the returned account data. Explicitly setting this field is recommended to avoid size or performance issues. Valid options include 'base58', 'base64', 'binary', 'base64+zstd', and 'jsonParsed' (valid for certain native programs).

Returns

result
array

Array of program accounts. When withContext is true, the RPC returns an RpcResponse object with context and value (this array) instead of the array at the top level.

pubkey
string

The account public key encoded as base-58 string

account
object

Account state for the matching program-owned account

data
string | array | object

Data associated with the account. Format depends on encoding parameter:

  • If the encoding parameter is left as the deprecated default of binary, this will be a string containing encoded binary data.
  • If base58, base64, or base64+zstd is specified, this will be an array, where the first element is the encoded data string and the second element is the encoding format.
  • If jsonParsed is specified, this will be JSON format {<program>: <state>}.
executable
boolean

A boolean indicating if the account contains a program (and is strictly read-only)

lamports
integer

The number of lamports assigned to this account as u64 (64-bit unsigned integer)

owner
string

The base-58 encoded address of the program this account has been assigned to

rentEpoch
integer

The epoch at which this account will next owe rent, as u64 (64-bit unsigned integer)

space
integer

The amount of storage space required to store the account data in bytes

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"result": [
4
{
5
"pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY",
6
"account": {
7
"data": "2R9jLfiAQ9bgdcw6h8s44439",
8
"executable": false,
9
"lamports": 15298080,
10
"owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
11
"rentEpoch": 28,
12
"space": 42
13
}
14
}
15
],
16
"id": 1
17
}
1
{
2
"jsonrpc": "2.0",
3
"result": [
4
{
5
"pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY",
6
"account": {
7
"data": "2R9jLfiAQ9bgdcw6h8s44439",
8
"executable": false,
9
"lamports": 15298080,
10
"owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
11
"rentEpoch": 28,
12
"space": 42
13
}
14
}
15
],
16
"id": 1
17
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free