---
title: Searching accounts
slug: searching-accounts
docTags: 
createdAt: 2024-09-27T14:43:27.067Z
---

These filters work in `raw_account_states` and `raw_transactions` tables

## By address

- `address__friendly` field for any type of address
- `address` and `workchain` fields for raw form of address

Example:

:::GraphiQL
```json
{
  "endpoint": "https://dton.io/graphql/",
  "query": "{\n  raw_account_states(\n    address__friendly: \"EQAAFSPzZXu3pKo-VfQZRYcUjygur1-VLI9-wY9uwaobbUht\"\n  ) {\n    account_storage_balance_grams\n  }\n  raw_transactions(\n    address: \"001523F3657BB7A4AA3E55F4194587148F282EAF5F952C8F7EC18F6EC1AA1B6D\"\n    workchain: 0\n  ) {\n    account_storage_balance_grams\n  }\n}"
}
```
:::

## By code or data hash

We don't recommend searching for accounts by code hash, better use filter by get methods

:::GraphiQL
```json
{
  "endpoint": "https://dton.io/graphql/",
  "query": "{\n  raw_account_states(\n    account_state_state_init_code_hash: \"B61041A58A7980B946E8FB9E198E3C904D24799FFA36574EA4251C41A566F581\"\n  ) {\n    address\n    workchain\n  }\n}"
}
```
:::

## By get methods

`method_name` in Func is compiling to crc16 integer, you can filter transactions or accounts states by get any get method:

:::GraphiQL
```json
{
  "endpoint": "https://dton.io/graphql/",
  "query": "{\n  raw_account_states(account_state_state_init_code_method_name: \"get_wallet\"){\n    address\n    workchain\n  }\n}"
}
```
:::

Some of the methods predefined and contain special columns to query them. Example of query all NFTs in low-level manner:

```graphql
{
  raw_account_states(account_state_state_init_code_has_get_nft_data: 1) {
    address
    workchain
  }
}
```

Table of all predefined get methods:

| **Get method name**           | **crc16** |
| ----------------------------- | --------- |
| dnsresolve                    | 123660    |
| get\_jetton\_data             | 106029    |
| get\_wallet\_address          | 103289    |
| get\_collection\_data         | 102491    |
| get\_nft\_address\_by\_index  | 92067     |
| get\_nft\_data                | 102351    |
| royalty\_params               | 85719     |
| hello\_world                  | 113531    |
| get\_owner                    | 80293     |
| seqno                         | 85143     |
| get\_public\_key              | 78748     |
| get\_version                  | 82320     |
| get\_marketplace\_address     | 91689     |
| get\_sale\_data               | 72748     |
| get\_plugin\_list             | 107653    |
| is\_plugin\_installed         | 76407     |
| get\_subwallet\_id            | 81467     |
| get\_editor                   | 90228     |
| get\_is\_closed               | 110449    |
| get\_reveal\_mode             | 116695    |
| get\_reveal\_data             | 93270     |
| get\_wallet\_data             | 97026     |
| get\_telemint\_token\_name    | 69506     |
| get\_telemint\_auction\_state | 122498    |

