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

# getAssetBatch

> Fetch up to 1,000 Solana assets by ID in a single DAS request with getAssetBatch on OrbitFlare.

## Overview

`getAssetBatch` returns many assets in one request. Results come back in the same order as the IDs you send, with `null` for any ID that is not an indexed asset.

This method is also available as `getAssets`.

## Parameters

<ResponseField name="ids" type="string[]" required>
  Asset IDs (base-58). At most 1,000.
</ResponseField>

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

## Response

<ResponseField name="result" type="array">
  One entry per requested ID, in request order. Each entry is an [asset object](/das-api/asset-object) or `null`.
</ResponseField>

## Code Examples

### Request

```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": "getAssetBatch",
  "params": {
    "ids": [
      "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
      "JEKNNLZK6uQaQUEUz9GRoYZ7buHQ4rTN6k3qhX9NG8qU"
    ]
  }
}'
```

### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
{
  "jsonrpc": "2.0",
  "result": [
    {
      "interface": "ProgrammableNFT",
      "id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
      "content": {
        "json_uri": "https://madlads.s3.us-west-2.amazonaws.com/json/8420.json",
        "metadata": { "name": "Mad Lads #8420", "symbol": "MAD" }
      },
      "ownership": { "owner": "BUCoKqFVfxRTJJFH37r7StaxoA2pdu3rA5cPfXYTnMUw", "ownership_model": "single" }
    },
    {
      "interface": "V1_NFT",
      "id": "JEKNNLZK6uQaQUEUz9GRoYZ7buHQ4rTN6k3qhX9NG8qU",
      "content": {
        "json_uri": "https://arweave.net/ymSDHwAqb3hnNKBid03WBUqY1Svj5Hzr0fdAYGvZBKA",
        "metadata": { "name": "Aurora borealis", "symbol": "" }
      },
      "ownership": { "owner": "5MRNQW3NxNes1EDnxUhqyXwffseQBLpdu6QJF8G4MdN9", "ownership_model": "single" }
    }
  ],
  "id": 1
}
```

Asset objects are shortened here. See [getAsset](/das-api/methods/getAsset) for a full response.

### TypeScript

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

async function getAssetBatch(ids: string[]) {
  const results = [];

  // The API accepts at most 1,000 IDs per request.
  for (let i = 0; i < ids.length; i += 1000) {
    const response = await fetch(RPC_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getAssetBatch',
        params: { ids: ids.slice(i, i + 1000) },
      }),
    });
    const { result, error } = await response.json();
    if (error) throw new Error(error.message);
    results.push(...result);
  }

  return results;
}
```

## Common Errors

| Code | Message | Solution |
| - | - | - |
| -32602 | Batch Size Error. Batch size should not be greater than 1000. | Split the IDs into chunks of 1,000 |
| -32602 | Pubkey Validation Err: ... is invalid | Every ID must be valid base-58 |


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