Mainly

Get an NFT

Full details for a single NFT — metadata, attributes, owner, collection, and royalties.

GET /nfts/{id}

Everything about one NFT in one response. Works identically for standard, programmable, and compressed NFTs — you don't need to know which kind you're holding, and you never touch Metaplex account layouts or off-chain JSON URIs.

Parameters

ParameterInTypeRequiredDescription
idpathstringYesThe asset's address (mint address for regular NFTs, asset ID for compressed).

Example

curl https://api.sarg.am/v1/solana/nfts/F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk \
  -H "Authorization: Bearer $MAINLY_API_KEY"
{
  "id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
  "name": "Mad Lads #8420",
  "symbol": "MAD",
  "description": "Fock it.",
  "image": "https://cdn.mainly.dev/assets/F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk.png",
  "externalUrl": "https://madlads.com",
  "standard": "programmable",
  "compressed": false,
  "mutable": true,
  "burnt": false,
  "owner": {
    "address": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
    "delegated": false,
    "frozen": true
  },
  "collection": {
    "address": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",
    "name": "Mad Lads",
    "verified": true
  },
  "attributes": [
    { "traitType": "Gender", "value": "Male" },
    { "traitType": "Type", "value": "Dark" }
  ],
  "royalties": {
    "percent": 4.2,
    "primarySaleHappened": true,
    "recipients": [
      { "address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW", "share": 100 }
    ]
  }
}

Response fields

FieldTypeDescription
standardstringstandard, programmable, or edition. Programmable NFTs can enforce royalties and block certain transfers.
compressedbooleanCompressed NFTs live in Merkle trees instead of token accounts — cheaper to mint, identical here.
mutablebooleanWhether the creator can still change the metadata.
owner.delegatedbooleantrue when a marketplace or program has transfer authority (e.g. the NFT is listed).
owner.frozenbooleanWhether the token account is frozen (normal for listed/staked NFTs).
collection.verifiedbooleanCryptographic proof of collection membership. Never trust a collection name when this is false.
royalties.percentnumberCreator royalty as a percentage (converted from on-chain basis points).

Errors

codeWhen
invalid_addressThe path parameter isn't valid base58.
not_foundNo asset with this ID.

Under the hood

Replaces a DAS getAsset call, Metaplex metadata-PDA decoding, off-chain JSON resolution, and the basis-points math — and for compressed NFTs, the entirely separate indexer lookup they normally require.

On this page