Collections

The APIs on this page, allows to get NFTs and other interesting insights over NFT collections.

Get NFTs

Get on-chain metadata for NFTs in a collection. This API supports pagination support, with a default page size of 10.

GET /sol/v1/collections/get_nfts

Query Parameters:

  • network(optional): Solana blockchain environment (mainnet-beta). Currently, this endpoint works for mainnet-beta only.

  • collection_address: On-chain address(public key) of the collection.

  • page: (optional) The page number to get the results for a particular page. If no page number is specified, then all the collections' nfts are returned in a single request.

  • size: (optional) The number of results to be returned for each page. The default number is 10 and maximum 50 allowed.

Response:

  • nfts: An array of on-chain and off-chain metadata of NFTs. The size of the array is equal to size the param, used in the input request.

  • total_pages: The total number of pages for the NFTs, according to the size param. Not present if the page is not sent in the API request.

  • total_count: Total number of NFTs in this collection.

  • page: Represents the present page number. Not present if the page param is not mentioned in the request.

  • size: Represents the page size used. Not present if the page param is not mentioned in the request.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<YOUR-API-KEY>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/collections/get_nfts?network=mainnet-beta&collection_address=1ascapYyxEYhbmmUcgXEsg9Nkdk9eZwPBohRCJCZSx3&page=5&size=2", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Last updated