# getAssetBatch_v2

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns detailed information for up to 1,000 Solana NFTs, compressed NFTs, or tokens in a single efficient batch request. Results are returned in the same order as the input `ids` array.


Reference: https://www.alchemy.com/docs/reference/alchemy-das-apis-for-solana-v2/solana-das-api-v2-endpoints/get-asset-batch-v-2

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ids | string[] | Yes | An array of asset IDs (typically mint addresses) to retrieve. Up to 1,000 per request. |
| options | object | No | Display and formatting options for the batch response. |

## Result

**Asset batch** (object[]): Returns an ordered array of asset entries, one per requested ID.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getAssetBatch_v2",
  "params": [
    [
      "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
      "8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "last_indexed_slot": 365750752,
      "interface": "ProgrammableNFT",
      "id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
      "content": {
        "$schema": "https://schema.metaplex.com/nft1.0.json",
        "json_uri": "https://madlads.s3.us-west-2.amazonaws.com/json/8420.json",
        "metadata": {
          "name": "Mad Lads #8420",
          "symbol": "MAD"
        }
      },
      "authorities": [
        {
          "address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
          "scopes": [
            "full"
          ]
        }
      ],
      "grouping": [
        {
          "group_key": "collection",
          "group_value": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"
        }
      ],
      "ownership": {
        "frozen": true,
        "delegated": false,
        "delegate": null,
        "ownership_model": "single",
        "owner": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue"
      },
      "burnt": false
    },
    {
      "last_indexed_slot": 365750752,
      "interface": "V1_NFT",
      "id": "8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo",
      "content": {
        "$schema": "https://schema.metaplex.com/nft1.0.json",
        "metadata": {
          "name": "Second asset",
          "symbol": "NFT"
        }
      },
      "ownership": {
        "frozen": false,
        "delegated": false,
        "delegate": null,
        "ownership_model": "single",
        "owner": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY"
      },
      "burnt": false
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAssetBatch_v2",
  "params": [
    [
      "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
      "8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo"
    ],
    {
      "showUnverifiedCollections": false,
      "showCollectionMetadata": false,
      "showFungible": false
    }
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getAssetBatch_v2',
    params: [
      [
        'F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk',
        '8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo'
      ],
      {
        showUnverifiedCollections: false,
        showCollectionMetadata: false,
        showFungible: false
      }
    ]
  })
};

fetch('https://solana-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://solana-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getAssetBatch_v2",
    "params": [
        ["F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk", "8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo"],
        {
            "showUnverifiedCollections": False,
            "showCollectionMetadata": False,
            "showFungible": False
        }
    ]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://solana-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"getAssetBatch_v2\",\n  \"params\": [\n    [\n      \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\",\n      \"8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo\"\n    ],\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showFungible\": false\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://solana-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"getAssetBatch_v2\",\n  \"params\": [\n    [\n      \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\",\n      \"8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo\"\n    ],\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showFungible\": false\n    }\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://solana-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"getAssetBatch_v2\",\n  \"params\": [\n    [\n      \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\",\n      \"8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo\"\n    ],\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showFungible\": false\n    }\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: getAssetBatch_v2
description: |
  Returns detailed information for up to 1,000 Solana NFTs, compressed NFTs, or tokens in a single efficient batch request. Results are returned in the same order as the input `ids` array.
x-compute-units: 480
x-rate-limit-cus: 200
paramStructure: by-name
params:
  - name: ids
    required: true
    description: An array of asset IDs (typically mint addresses) to retrieve. Up to 1,000 per request.
    schema:
      type: array
      items:
        title: Asset ID
        type: string
        description: The ID of the asset, typically a base-58 encoded string (mint address).
  - name: options
    required: false
    description: Display and formatting options for the batch response.
    schema:
      title: getAsset options
      type: object
      description: Optional display and formatting flags accepted by the Alchemy DAS proxy on `getAsset` and `getAssetBatch`.
      properties:
        showUnverifiedCollections:
          type: boolean
          description: Displays grouping information for unverified collections instead of skipping them.
          default: false
        showCollectionMetadata:
          type: boolean
          description: Displays metadata for the collection.
          default: false
        showFungible:
          type: boolean
          description: Displays fungible tokens held by the owner.
          default: false
examples:
  - name: getAssetBatch_v2 example
    params:
      - name: ids
        value:
          - F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk
          - 8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo
    result:
      name: Asset batch
      value:
        - last_indexed_slot: 365750752
          interface: ProgrammableNFT
          id: F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk
          content:
            $schema: https://schema.metaplex.com/nft1.0.json
            json_uri: https://madlads.s3.us-west-2.amazonaws.com/json/8420.json
            metadata:
              name: 'Mad Lads #8420'
              symbol: MAD
          authorities:
            - address: 2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW
              scopes:
                - full
          grouping:
            - group_key: collection
              group_value: J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w
          ownership:
            frozen: true
            delegated: false
            delegate: null
            ownership_model: single
            owner: 4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue
          burnt: false
        - last_indexed_slot: 365750752
          interface: V1_NFT
          id: 8vw7tdLGE3FBjaetsJrZAbbyssUrXai1aBJbUnj5S5uo
          content:
            $schema: https://schema.metaplex.com/nft1.0.json
            metadata:
              name: Second asset
              symbol: NFT
          ownership:
            frozen: false
            delegated: false
            delegate: null
            ownership_model: single
            owner: 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
          burnt: false
result:
  name: Asset batch
  description: Returns an ordered array of asset entries, one per requested ID.
  schema:
    title: Asset batch
    type: array
    description: An array of assets returned by `getAssetBatch` (one per requested ID, in the same order).
    items:
      title: Asset
      type: object
      description: A DAS v2 digital asset entry.
      properties:
        last_indexed_slot:
          type: integer
          description: All on-chain data up to and including this slot is guaranteed to have been indexed.
        interface:
          title: Asset interface
          type: string
          description: |
            The interface type of the Solana digital asset, indicating its token standard and implementation. v2 adds MPL Core interfaces (`MplCoreAsset`, `MplCoreCollection`, `MplCoreGroup`) and `MplBubblegumV2` for the newer Bubblegum V2 compressed-NFT program.
          enum:
            - V1_NFT
            - V1_PRINT
            - LEGACY_NFT
            - V2_NFT
            - FungibleAsset
            - FungibleToken
            - Custom
            - Identity
            - Executable
            - ProgrammableNFT
            - MplCoreAsset
            - MplBubblegumV2
            - MplCoreCollection
            - MplCoreGroup
        is_agent:
          type: boolean
          description: |
            Whether this asset has an Agent Identity. Only true for MPL Core assets that use the AgentIdentity external plugin adapter. Defaults to false and is omitted from the response when false.
        agent_token:
          type: string
          description: Base58-encoded mint address of the agent token from the Agent Registry program. Omitted when the asset has no corresponding registry entry.
        asset_signer:
          type: string
          description: Base58-encoded PDA used for signing on behalf of the asset. Omitted when not applicable.
        id:
          type: string
          description: The unique identifier of the asset.
        content:
          title: Asset content
          type: object
          description: Content and off-chain metadata for the asset.
          properties:
            $schema:
              type: string
              description: The schema URL for the asset metadata.
            json_uri:
              type: string
              description: URI pointing to the JSON metadata, typically hosted on Arweave or other decentralized storage.
            files:
              type: array
              description: Files associated with the asset (images, videos, etc.).
              items:
                type: object
                properties:
                  uri:
                    type: string
                  cdn_uri:
                    type: string
                  mime:
                    type: string
            metadata:
              type: object
              description: Complete metadata for the asset.
              properties:
                name:
                  type: string
                symbol:
                  type: string
                description:
                  type: string
                token_standard:
                  type: string
                attributes:
                  type: array
                  items:
                    type: object
                    properties:
                      trait_type:
                        type: string
                      value:
                        type: string
            links:
              type: object
              description: External links related to the asset.
        authorities:
          type: array
          items:
            title: Asset authority
            type: object
            description: An update-authority entry for the asset.
            properties:
              address:
                type: string
                description: The authority's address.
              scopes:
                type: array
                description: The scopes of authority.
                items:
                  type: string
        compression:
          title: Asset compression
          type: object
          description: State-compression details for the asset.
          properties:
            eligible:
              type: boolean
              description: Whether the asset is eligible for compression.
            compressed:
              type: boolean
              description: Whether the asset is currently compressed using Solana's state compression.
            data_hash:
              type: string
              description: Hash of the asset data.
            creator_hash:
              type: string
              description: Hash of the creator data.
            asset_hash:
              type: string
              description: Hash of the entire asset.
            tree:
              type: string
              description: Merkle tree address.
            seq:
              type: integer
              description: Sequence number.
            leaf_id:
              type: integer
              description: Leaf identifier in the merkle tree.
        grouping:
          type: array
          items:
            title: Asset grouping
            type: object
            description: A grouping entry (for example, a collection membership).
            properties:
              group_key:
                type: string
                description: The key identifying the group (e.g., `collection`).
              group_value:
                type: string
                description: The value associated with the group.
        royalty:
          title: Asset royalty
          type: object
          description: Royalty configuration for marketplace sales.
          properties:
            royalty_model:
              type: string
              description: The model used for royalties.
            target:
              oneOf:
                - type: string
                - type: 'null'
              description: The target address for royalties (nullable).
            percent:
              type: number
              description: Royalty percentage.
            basis_points:
              type: integer
              description: Royalty basis points.
            primary_sale_happened:
              type: boolean
              description: Whether the primary sale has occurred.
            locked:
              type: boolean
              description: Whether the royalty is locked.
        creators:
          type: array
          items:
            title: Asset creator
            type: object
            description: A creator entry for the asset.
            properties:
              address:
                type: string
                description: The creator's address.
              share:
                type: integer
                description: The creator's share percentage.
              verified:
                type: boolean
                description: Whether the creator is verified.
        ownership:
          title: Asset ownership
          type: object
          description: Current ownership details for the asset.
          required:
            - frozen
            - delegated
            - ownership_model
            - owner
          properties:
            frozen:
              type: boolean
              description: Whether the asset is frozen.
            delegated:
              type: boolean
              description: Whether the asset is delegated.
            delegate:
              oneOf:
                - type: string
                - type: 'null'
              description: The delegate's address if delegated (nullable).
            ownership_model:
              type: string
              description: The model of ownership.
            owner:
              type: string
              description: The owner's address.
        supply:
          oneOf:
            - title: Asset supply
              type: object
              description: Supply information for editioned assets.
              properties:
                print_max_supply:
                  type: integer
                  description: Maximum supply that can be printed.
                print_current_supply:
                  type: integer
                  description: Current printed supply.
                edition_nonce:
                  type: integer
                  description: Edition nonce.
            - type: 'null'
        mutable:
          type: boolean
          description: Whether the asset is mutable.
        burnt:
          type: boolean
          description: Whether the asset has been burnt.
        token_info:
          title: Token info
          type: object
          description: Token-specific information, including cached price data for the top 10k tokens by 24h volume.
          properties:
            supply:
              type: integer
              description: Total token supply.
            decimals:
              type: integer
              description: Number of decimals.
            token_program:
              type: string
              description: Token program ID.
            mint_authority:
              type: string
              description: Mint authority address.
            freeze_authority:
              type: string
              description: Freeze authority address.
            symbol:
              type: string
              description: The symbol of the token.
            price_info:
              type: object
              description: Cached price information for the token (up to 600 seconds old).
              properties:
                price_per_token:
                  type: number
                  description: The price per individual token.
                currency:
                  type: string
                  description: The currency in which the token's price is denoted.
        plugins:
          title: MPL Core plugins
          type: object
          description: MPL Core plugin payload. May include a `groups` plugin (MIP-11) on assets and collections.
          additionalProperties: true
          properties:
            groups:
              type: object
              description: MIP-11 Groups plugin with membership metadata.
              properties:
                authority:
                  type: object
                  description: Plugin authority (for example, `UpdateAuthority`).
                  additionalProperties: true
                data:
                  type: object
                  properties:
                    groups:
                      type: array
                      description: Group memberships for this asset or collection.
                      items:
                        type: object
                        properties:
                          group_address:
                            type: string
                            description: Base58 address of the MPL Core group account.
                          member_number:
                            type: integer
                            description: Member number within the group.
```
