> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbitflare.com/llms.txt
> Use this file to discover all available pages before exploring further.

# searchAssets

> Search Solana NFTs, compressed NFTs and tokens by owner, creator, collection, interface, compression, royalties and more with DAS searchAssets on OrbitFlare.

## Overview

`searchAssets` combines filters in one query. Use it when no single `getAssetsBy*` method fits, for example "compressed NFTs in this collection owned by this wallet" or "fungible tokens this wallet holds".

By default every filter must match (`conditionType: "all"`). Set `conditionType: "any"` to match assets that satisfy at least one filter, and `negate: true` to invert the result.

## Parameters

### Filters

<ResponseField name="ownerAddress" type="string">
  Owner wallet (base-58).
</ResponseField>

<ResponseField name="creatorAddress" type="string">
  Creator address (base-58).
</ResponseField>

<ResponseField name="creatorVerified" type="boolean">
  With `creatorAddress`, match only verified creators.
</ResponseField>

<ResponseField name="authorityAddress" type="string">
  Authority address (base-58).
</ResponseField>

<ResponseField name="grouping" type="[string, string]">
  Group key and value, for example `["collection", "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"]`.
</ResponseField>

<ResponseField name="delegate" type="string">
  Delegate address (base-58).
</ResponseField>

<ResponseField name="interface" type="string">
  Asset interface, such as `V1_NFT`, `ProgrammableNFT`, `MplCoreAsset` or `FungibleToken`. See [Asset object](/das-api/asset-object) for the full list.
</ResponseField>

<ResponseField name="tokenType" type="string">
  `fungible`, `nonFungible`, `regularNFT`, `compressedNFT` or `all`.
</ResponseField>

<ResponseField name="ownerType" type="string">
  `single` (NFTs) or `token` (fungible tokens).
</ResponseField>

<ResponseField name="compressed" type="boolean">
  Match compressed or uncompressed assets.
</ResponseField>

<ResponseField name="compressible" type="boolean">
  Match assets that can be compressed.
</ResponseField>

<ResponseField name="frozen" type="boolean">
  Match frozen or unfrozen assets.
</ResponseField>

<ResponseField name="burnt" type="boolean">
  Match burned or live assets.
</ResponseField>

<ResponseField name="supply" type="number">
  Match an exact supply.
</ResponseField>

<ResponseField name="supplyMint" type="string">
  Match by supply mint (base-58).
</ResponseField>

<ResponseField name="royaltyTargetType" type="string">
  `creators`, `fanout` or `single`.
</ResponseField>

<ResponseField name="royaltyTarget" type="string">
  Royalty recipient address (base-58).
</ResponseField>

<ResponseField name="royaltyAmount" type="number">
  Royalty in basis points.
</ResponseField>

<ResponseField name="jsonUri" type="string">
  Exact metadata JSON URI.
</ResponseField>

<ResponseField name="name" type="string">
  Asset name. Requires `ownerAddress`.
</ResponseField>

### Logic

<ResponseField name="conditionType" type="string">
  `all` (default) or `any`.
</ResponseField>

<ResponseField name="negate" type="boolean">
  Return assets that do not match.
</ResponseField>

### Paging and output

<ResponseField name="page" type="number">
  Page number, starting at 1. See [Pagination](/das-api/pagination).
</ResponseField>

<ResponseField name="limit" type="number">
  Results per page. Maximum and default 1,000.
</ResponseField>

<ResponseField name="cursor" type="string">
  Cursor from a previous response.
</ResponseField>

<ResponseField name="before" type="string">
  Return assets with IDs before this one.
</ResponseField>

<ResponseField name="after" type="string">
  Return assets with IDs after this one.
</ResponseField>

<ResponseField name="sortBy" type="object">
  `{ "sortBy": "id" | "created" | "updated" | "recent_action" | "none", "sortDirection": "asc" | "desc" }`
</ResponseField>

<ResponseField name="options" type="object">
  [Display options](/das-api/display-options): `showNativeBalance` (with `ownerAddress`), `showUnverifiedCollections`, `showCollectionMetadata`, `showInscription`. Also accepted as `displayOptions`.
</ResponseField>

## Response

A list with `last_indexed_slot`, `total`, `limit`, `page` or `cursor`, `items` ([asset objects](/das-api/asset-object)) and, with `showNativeBalance`, `nativeBalance`.

## Code Examples

### Live NFTs in a collection

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "searchAssets",
  "params": {
    "grouping": ["collection", "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"],
    "burnt": false,
    "page": 1,
    "limit": 1
  }
}'
```

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
{
  "jsonrpc": "2.0",
  "result": {
    "last_indexed_slot": 457714710,
    "total": 1,
    "limit": 1,
    "page": 1,
    "items": [
      {
        "interface": "ProgrammableNFT",
        "id": "JEGruwYE13mhX2wi2MGrPmeLiVyZtbBptmVy9vG3pXRC",
        "content": {
          "metadata": { "name": "Mad Lads #6867", "symbol": "MAD" }
        },
        "burnt": false
      }
    ]
  },
  "id": 1
}
```

### Fungible tokens a wallet holds

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "searchAssets",
  "params": {
    "ownerAddress": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
    "tokenType": "fungible",
    "page": 1,
    "limit": 100,
    "options": { "showNativeBalance": true }
  }
}'
```

### Compressed NFTs a wallet holds in one collection

```typescript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
const RPC_URL = 'https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY';

const response = await fetch(RPC_URL, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'searchAssets',
    params: {
      ownerAddress: '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
      grouping: ['collection', 'DRiP3vrQ7LuvQtmwL74RcejviWmQ1HuuKFcJdUpYG6Di'],
      compressed: true,
      page: 1,
      limit: 1000,
    },
  }),
});
const { result } = await response.json();
console.log(`${result.items.length} compressed DRiP NFTs`);
```

## Common Errors

| Code | Message | Solution |
| - | - | - |
| -32602 | Owner address must be provided in order to search assets by name | Add `ownerAddress` when filtering by `name` |
| -32602 | Validation Error: Invalid pubkey ... | Check every address filter is valid base-58 |
| -32602 | unknown field | Check parameter names; filters are camelCase |
| -32602 | Pagination Sorting Error | Cursors and ranges need `sortBy: "id"`; use `page` with other sorts |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.