> ## 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.

# getMultipleCompressedAccounts

> Returns multiple compressed accounts with the given addresses or hashes.

## Request Parameters

<ParamField body="addresses" type="array">
  Array of Solana public keys for the compressed accounts to retrieve
</ParamField>

<ParamField body="hashes" type="array">
  Array of data hashes identifying the compressed Solana accounts to retrieve
</ParamField>


## OpenAPI

````yaml openapi/zk-compression/getMultipleCompressedAccounts.yaml POST /
openapi: 3.0.3
info:
  title: Solana State Compression Batch API
  description: >
    Advanced Solana indexer for compressed accounts using state compression
    technology to enable efficient and cost-effective data storage on the Solana
    blockchain.

    This API provides optimized batch retrieval of compressed NFTs and token
    accounts, enabling applications to scale efficiently

    while benefiting from Solana's breakthrough compression technology that
    reduces on-chain storage costs by up to 1000x.
  license:
    name: Apache-2.0
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: Mainnet RPC endpoint
  - url: https://devnet.helius-rpc.com
    description: Devnet RPC endpoint
security: []
paths:
  /:
    summary: getMultipleCompressedAccounts
    post:
      description: >
        Efficiently retrieve multiple compressed accounts from the Solana
        blockchain in a single request.

        This optimized batch endpoint allows developers to retrieve multiple
        state-compressed accounts by their addresses

        or hashes in one operation, reducing RPC calls and network overhead.
        Ideal for applications working with large

        collections of compressed NFTs, tokens, or other compressed Solana data
        structures that require

        high-performance and cost-effective data access.


        Key use cases:

        - Mass retrieval of compressed NFT collection data

        - Wallet applications displaying multiple compressed assets

        - Marketplaces loading batches of compressed NFT metadata

        - Analytics platforms processing multiple compressed tokens

        - Games retrieving multiple in-game assets efficiently
      operationId: getMultipleCompressedAccounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: The version of the JSON-RPC protocol.
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: An ID to identify the request.
                  default: '1'
                method:
                  type: string
                  description: The name of the method to invoke.
                  enum:
                    - getMultipleCompressedAccounts
                  default: getMultipleCompressedAccounts
                params:
                  type: object
                  description: >
                    Request parameters for batch retrieving multiple compressed
                    Solana accounts data,

                    supporting lookups by either addresses or cryptographic
                    hashes
                  default:
                    addresses: null
                    hashes:
                      - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM
                      - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh
                  properties:
                    addresses:
                      type: array
                      items:
                        $ref: '#/components/schemas/SerializablePubkey'
                      nullable: true
                      description: >-
                        Array of Solana public keys for the compressed accounts
                        to retrieve
                    hashes:
                      type: array
                      items:
                        $ref: '#/components/schemas/Hash'
                      nullable: true
                      description: >-
                        Array of data hashes identifying the compressed Solana
                        accounts to retrieve
                  additionalProperties: false
                  example:
                    addresses: null
                    hashes:
                      - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM
                      - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh
        required: true
      responses:
        '200':
          description: >-
            Successfully retrieved multiple compressed Solana accounts in a
            single batch operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/AccountList'
                additionalProperties: false
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Internal Server Error - An error occurred on the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Service Unavailable - The service is temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Gateway Timeout - The request timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Gateway timeout
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    SerializablePubkey:
      type: string
      description: >-
        A Solana public key represented as a base58 string, used to identify
        compressed accounts, merkle trees, and owners.
      default: 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo
      example: 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo
    Hash:
      type: string
      description: >-
        A 32-byte cryptographic hash represented as a base58 string, used to
        verify Solana compressed account data integrity.
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
          description: Current Solana blockchain slot at the time of the request
    AccountList:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Account'
            nullable: true
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: The JSON-RPC protocol version.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: The error code.
              example: -32602
            message:
              type: string
              description: The error message.
            data:
              type: object
              description: Additional data about the error.
        id:
          type: string
          description: Identifier matching the request.
          example: '1'
    Account:
      type: object
      required:
        - hash
        - owner
        - lamports
        - tree
        - leafIndex
        - seq
        - slotCreated
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
          description: The unique Solana address of the compressed account
        data:
          $ref: '#/components/schemas/AccountData'
          description: Compressed account data in an efficient storage format
        hash:
          $ref: '#/components/schemas/Hash'
          description: Cryptographic hash of the compressed account data for verification
        lamports:
          $ref: '#/components/schemas/UnsignedInteger'
          description: Balance in lamports associated with the compressed account
        leafIndex:
          $ref: '#/components/schemas/UnsignedInteger'
          description: >-
            Index position in the merkle tree where the compressed account is
            stored
        owner:
          $ref: '#/components/schemas/SerializablePubkey'
          description: Solana program that owns this compressed account
        seq:
          $ref: '#/components/schemas/UnsignedInteger'
          description: Sequence number for tracking updates to the compressed account
        slotCreated:
          $ref: '#/components/schemas/UnsignedInteger'
          description: Solana blockchain slot when the compressed account was created
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
          description: Address of the merkle tree containing this compressed account
      additionalProperties: false
    AccountData:
      type: object
      required:
        - discriminator
        - data
        - dataHash
      properties:
        data:
          $ref: '#/components/schemas/Base64String'
        dataHash:
          $ref: '#/components/schemas/Hash'
        discriminator:
          $ref: '#/components/schemas/UnsignedInteger'
      additionalProperties: false
    UnsignedInteger:
      type: integer
      default: 100
      example: 100
      description: >-
        Non-negative integer value used for various parameters in Solana
        compressed account structures
    Base64String:
      type: string
      description: A base64 encoded string containing compressed Solana account data.
      default: SGVsbG8sIFdvcmxkIQ==
      example: SGVsbG8sIFdvcmxkIQ==
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Your Helius API key. You can get one for free in the
        [dashboard](https://dashboard.helius.dev/api-keys).

````