Listing NFT Collections Under a Project

You can list all NFT collections in a project by sending a GET request to the /nft/<project_name>/nfts endpoint.

Lists all NFT collections under a project.

GET https://api.playfix.io/nft/<project_name>/nfts

Path Parameters

Name
Type
Description

project_name*

String

The name of the project that contains the token. It begins with "project/" followed by a ULID.

Example: projects/01gfav9m1c4zd6eq154th2pafz

Query Parameters

Name
Type
Description

pageToken

String

Page token for next page. You can get this value from the nextPageToken field of a previous response.

pageSize

String

Max number of projects to return in a single page. Each response will contain one page. This can be any number from 1 to 100.

Headers

Name
Type
Description

Authorization*

String

Bearer <your_access_token>

{
  "projectNfts": [
    {
      "name": "<nft_collection_name>",
      "project": "<project_name>",
      "standard": "NFT_STANDARD_UNSPECIFIED",
      "title": "Carz",
      "description": "",
      "itemCount": "0", 
      "imageCoverUrl":"https://ipfs-gateway.playfix.io/ipfs/QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
      "imageCoverCid":"QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
      "config":{
        "name":"Carz",
        "symbol":"CRS",
        "itemPrice":0.01,
        "baseUri":"",
        "burnable":false,
        "pausable":false,
        "ownerAddress":"<your_wallet_address>"
        },
      "network":"NETWORK_POLYGON_MUMBAI",
      "contractAddress":"",
      "deployTxHash":""
      }
  ],
  "nextPageToken": "nfts/01gg6yang0tbtrv92g3mcqpjpr"
}

Example Curl API Call

curl --request GET \
  --url https://api.playfix.io/nft/<project_name>/nfts \
  --header 'Authorization: Bearer <your_access_token>'

Example Python API Call

import requests

r = requests.get(
    "https://api.playfix.io/nft/<project_name>/nfts",
    headers = {
        "Authorization": "Bearer <your_access_token>"
        }
    )

print(r.text)

Response Body

{
  "projectNfts": [
    {
      "name": "<nft_collection_name>",
      "project": "<project_name>",
      "standard": "NFT_STANDARD_UNSPECIFIED",
      "title": "Carz",
      "description": "",
      "itemCount": "0", 
      "imageCoverUrl":"https://ipfs-gateway.playfix.io/ipfs/QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
      "imageCoverCid":"QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
      "config":{
        "name":"Carz",
        "symbol":"CRS",
        "itemPrice":0.01,
        "baseUri":"",
        "burnable":false,
        "pausable":false,
        "ownerAddress":"<your_wallet_address>"
        },
      "network":"NETWORK_POLYGON_MUMBAI",
      "contractAddress":"",
      "deployTxHash":""
      }
  ],
  "nextPageToken": "nfts/01gg6yang0tbtrv92g3mcqpjpr"
}

Response Fields

  • projectNfts - An array of objects. Each object contains the details of an NFT collection under the project.

  • nextPageToken - A string that enable you to query the next page of the response if you have created multiple NFT collections.

Use the nextPageToken as the value of the pageToken query parameter to view the next page of results if you have created more than 10 NFT collections.

Also, you can set the pageSize parameter to a number between 1 and 100 to increase the default number of collections returned per page.

Example cURL API Call

curl --request GET \
  --url 'https://api.playfix.io/nft/<project_name>/nfts?pageSize=100&pageToken=<your_nextPageToken>' \
  --header 'Authorization: Bearer <your_access_token>'

Example Python API Call

import requests

r = requests.get(
    "https://api.playfix.io/nft/<project_name>/nfts",
    params = {
        "pageToken": "<your_nextPageToken>".
        "pageSize": "100"
        },
    headers = {
        "Authorization": "Bearer <your_access_token>"
        }
    )

print(r.text)

The example above sets the page size to 100 collections per page.

Last updated