get Program Accounts
Returns every account owned by a program, optionally narrowed by size and byte-content filters.
getProgramAccounts scans every account owned by a program and returns the ones matching the given filters, enumerating a protocol's state without knowing individual addresses ahead of time.
An unfiltered scan walks the program's entire account set (tens of millions of accounts for a program like SPL Token), so constant-k requires at least one filter on every call and meters it separately from the rest of the Accounts category.
In-memory account index or disk scan
Every answer carries an X-CK-Source HTTP header that names the path that answered. The in-memory account index holds the current accounts of the thirteen programs below; it is not related to historical lookups.
| Limit | index: in-memory account index | disk-scan: disk scan |
|---|---|---|
| Answers | The thirteen indexed programs | Every other program, and an indexed program while its index is behind the chain |
| Size limit | 1 GB of matched account data, then -32012 | 256 MB of matched account data, then -32012 |
| Filter | Not required | At least one selective filter (memcmp or dataSize) |
| Calls at once | No cap, only the rate limit | 2 per API key, 6 in total, then -32005 (concurrency limit reached) |
changedSinceSlot (V2) | Supported | Not supported (-32602); -32005 with data.numSlotsBehind while the index is behind |
getProgramAccountsV2 paging | Pages through any size | One scan, then pages served for 90 s |
| Typical time | 0.1 to 0.4 s | Seconds |
The per-key rate limit (Blade Runner plan 25/s, Nexus plan 75/s) applies to both paths.
Parameters
params is a JSON array, with values in this order: programId, config.
Address of the program whose owned accounts to scan, base-58 encoded.
Configuration. On constant-k this is effectively required, not optional: at least one entry in filters must narrow the scan.
Show propertiesProperties
Bank state to scan.
finalizedconfirmedprocessedHow to encode each account's data. The default base58 fails the whole request when any account's data is over 128 bytes; use base64 for larger accounts.
base58base64base64+zstdjsonParsedReturns only a byte range of each account's data. Not valid with jsonParsed.
Show propertiesProperties
Accounts must match every filter in this array (logical AND). Required on constant-k: a call with no filters, or with filters too loose to bound the scan, is rejected.
Show one ofOne of
Match accounts whose data is exactly this many bytes.
Show propertiesProperties
Required account data length, in bytes.
Match accounts whose data contains these bytes at the given offset.
Show propertiesProperties
Show propertiesProperties
Byte offset into the account's data to compare at.
Bytes to match, encoded per encoding below.
Encoding of the bytes field itself (independent of the account-data encoding in the outer config).
base58base64Minimum slot the node must have processed before answering.
When true, wraps the array result in the usual {context, value} envelope instead of returning it bare.
Result
By default, a bare array of matching accounts. With withContext: true, the same array wrapped in {context, value}.
Show one ofOne of
Show each itemEach item
Account address, base-58 encoded.
Show propertiesProperties
Same shape as getAccountInfo.
Show propertiesProperties
Show propertiesProperties
Notes
- Included in the Blade Runner plan at 25 requests per second and the Nexus plan at 75 per second. Free and Operator plan keys get HTTP
403withgetProgramAccounts requires higher tier. - A typical filter combines
dataSizewith one or morememcmpclauses; constant-k rejects an unfiltered scan outright rather than throttling it. - The example's byte offsets (
mintat 32,ownerat 64) match the classic SPL Token account struct; Token-2022 accounts share this base layout but can be longer with extensions, so a baredataSize: 165filter misses them. getProgramAccountsV2(paginated, up to 10,000 accounts per page, Blade Runner and Nexus plans) pages through a large account set instead of filtering a single call.- The in-memory account index holds these thirteen programs; the table above compares it with a disk scan. Address Lookup Table queries are covered on Address Lookup Tables.
| Program | Program ID |
|---|---|
| Address Lookup Table | AddressLookupTab1e1111111111111111111111111 |
| Raydium AMM V4 | 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 |
| Raydium CPMM | CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C |
| Raydium CLMM | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK |
| Raydium LaunchLab | LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj |
| Orca Whirlpool | whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc |
| Meteora DLMM | LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo |
| Meteora DAMM V2 | cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG |
| Meteora DAMM V1 | Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB |
| Meteora DBC | dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN |
| Pump.fun | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P |
| PumpSwap | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA |
| Serum V3 | 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin |