NFT API
Get Collection Metadata

Get Collection Metadata

Overview

The Get Collection Metadata endpoint obtains metadata for an NFT collection represented by its smart contract, which is a required path parameter.

A successful request to the endpoint will return a JSON response with the collection's metadata featuring the following fields: address, standard, total_supply, symbol, and name.

Querying via Postman

If you prefer querying via Postman, the description of PARSIQ Endpoints for Get Collection Metadata (opens in a new tab) might come in handy. There you will find examples and responses for good and bad requests as well as parameter definitions and their example values.

Usage

In this example, we receive data on an NFT collection by the contract 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D.

import * as Parsiq from '@parsiq/parsiq.js';
 
const client = Parsiq.createClient(process.env.API_KEY, Parsiq.ChainId.ETH_MAINNET);
 
const collectionMetadata = await client.nft.getCollectionMetadata(
  `0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D`
);
 
console.log(collectionMetadata)

Output:

{
  address: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
  total_supply: '10000',
  symbol: 'BAYC',
  name: 'BoredApeYachtClub',
  standard: 'ERC721'
}

Parameters

Path params
chainId
string
REQUIRED
version
string
REQUIRED
contract
string
REQUIRED
Query params
estimate_cu
boolean