> For the complete documentation index, see [llms.txt](https://docs.shyft.to/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shyft.to/solana-apis/collections.md).

# Collections

## Get NFTs

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

### <mark style="color:green;">**GET**</mark> /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 addres&#x73;*(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.

{% tabs %}
{% tab title="JS" %}
{% code overflow="wrap" %}

```javascript
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));
```

{% endcode %}
{% endtab %}

{% tab title="Response" %}

```json
{
    "success": true,
    "message": "Collection Nfts retrieved successfully",
    "result": {
        "nfts": [
            {
                "mint": "12f4gcftZZ626PyttLTpBP8LoBmvPkbQiLZGRtrJb4AC",
                "collection_data": {
                    "address": "1ascapYyxEYhbmmUcgXEsg9Nkdk9eZwPBohRCJCZSx3",
                    "verified": true
                },
                "creators": [
                    {
                        "address": "7rK2nh1hfALTjQcauAUXR2eg74UcgTpQzPZG79XTS9au",
                        "verified": true,
                        "share": 0
                    },
                    {
                        "address": "Hmi7WNiQEumHHezXw5cdJrWFF3QpKXHTmDDBTFkE5KL1",
                        "verified": false,
                        "share": 100
                    }
                ],
                "is_mutable": true,
                "metadata_uri": "https://arweave.net/y1rc3Rf5f7mEZVwRByzE5Y5F5zkdPE3-cDeSzN2UTLw",
                "name": "Shiba 2132",
                "primary_sale_happened": true,
                "royalty": 2.5,
                "symbol": "SSHIBAS",
                "update_authority": "padaSLVyzU91GkTVVHFfzLD8ec86Svnv9T1HJ2E9qKW"
            },
            {
                "mint": "12kng5FSiJ64TFbu55Hd3xK3WCdnPpDbUiLFxmWiVKyV",
                "collection_data": {
                    "address": "1ascapYyxEYhbmmUcgXEsg9Nkdk9eZwPBohRCJCZSx3",
                    "verified": true
                },
                "creators": [
                    {
                        "address": "7rK2nh1hfALTjQcauAUXR2eg74UcgTpQzPZG79XTS9au",
                        "verified": true,
                        "share": 0
                    },
                    {
                        "address": "Hmi7WNiQEumHHezXw5cdJrWFF3QpKXHTmDDBTFkE5KL1",
                        "verified": false,
                        "share": 100
                    }
                ],
                "is_mutable": true,
                "metadata_uri": "https://arweave.net/ey35rG-OOYzwgjLZbPKDwhR__YTp1KidY65SXloCBFE",
                "name": "Shiba 3703",
                "primary_sale_happened": true,
                "royalty": 2.5,
                "symbol": "SSHIBAS",
                "update_authority": "padaSLVyzU91GkTVVHFfzLD8ec86Svnv9T1HJ2E9qKW"
            }
        ],
        "total_pages": 4962,
        "total_count": 9924,
        "page": 5,
        "size": 2
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.shyft.to/solana-apis/collections.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
