> For the complete documentation index, see [llms.txt](https://docs.cspr.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cspr.cloud/1.1.x/rest-api/account/get-accounts.md).

# Get accounts

Get the paginated list of accounts

```
GET /accounts
```

## Query params

| Query param    | Description                            |
| -------------- | -------------------------------------- |
| `account_hash` | Comma-separated list of account hashes |

## Sorting

| Property        | Description                                                               |
| --------------- | ------------------------------------------------------------------------- |
| `balance`       | Sort accounts by the main purse balance                                   |
| `total_balance` | Sort accounts by the total account balance, including the delegated funds |

Default sorting is `total_balance DESC`

## Optional properties

| Property               | Type     | Description                                                                                             |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------- |
| `auction_status`       | `string` | Account auction status: `inactive_bidder`, `active_bidder`, `active_validator`, `pending_validator`     |
| `delegated_balance`    | `uint64` | Total funds delegated across all validators                                                             |
| `staked_balance`       | `uint64` | Total funds staked as validator                                                                         |
| `undelegating_balance` | `uint64` | Total undelegated funds that will be returned to the account main purse after the 7 era lockdown period |

## Response

[`PaginatedResponse`](/1.1.x/documentation/overview/pagination.md)[`<Account>`](/1.1.x/rest-api/account.md)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/accounts' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "data": [
    {
      "account_hash": "b383c7cc23d18bc1b42406a1b2d29fc8dba86425197b6f553d7fd61375b5e446",
      "balance": 9521556398257160000,
      "main_purse_uref": "uref-b06a1ab0cfb52b5d4f9a08b68a5dbe78e999de0b0484c03e64f5c03897cf637b-007",
      "public_key": "018afa98ca4be12d613617f7339a2d576950a2f9a92102ca4d6508ee31b54d2c02"
    },
    {
      "account_hash": "5e718fa0918ae95e58b9a320f412b935af6544b04b6b89fb2ca9982cab0dd261",
      "balance": 2390125170301261,
      "main_purse_uref": "uref-f99169b612ce584e69dd69e3437fea137b61aff8dcadf71fc83c3b85ab30aa64-007",
      "public_key": "02022732f61c794d7974d9473554b46b32e8d47903ada3ca3604ce313d66343e0d2f"
    },
    ...
    {
      "account_hash": "7894d8458c82388f6d276c07c1c52033ac37b175fa722b9cc40e7a0157ce17fc",
      "balance": 252400825961483,
      "main_purse_uref": "uref-c4afe0fb020ebcdc940289d759499ff5fb87e999567e4d61d836d70bfad20a55-007",
      "public_key": "0145fb72c75e1b459839555d70356a5e6172e706efa204d86c86050e2f7878960f"
    }
  ],
  "item_count": 63177,
  "page_count": 6318
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cspr.cloud/1.1.x/rest-api/account/get-accounts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
