Mainly

List wallet NFTs

Every NFT a wallet owns — standard, programmable, and compressed — with images and collection info.

GET /wallets/{address}/nfts

Compressed NFTs (cNFTs) don't exist in regular token accounts and are invisible to standard RPC calls — reading them normally requires an indexer with a separate API. This endpoint returns standard, programmable, and compressed NFTs in one list with one shape.

Parameters

ParameterInTypeRequiredDescription
addresspathstringYesThe wallet's base58 address.
limitquerynumberNo1–1000, default 100.
cursorquerystringNoPagination cursor.
collectionquerystringNoOnly NFTs from this collection address.
includeAttributesquerybooleanNoDefault false. Adds the attributes array to each item.

Example

curl "https://api.sarg.am/v1/solana/wallets/9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM/nfts?limit=2" \
  -H "Authorization: Bearer $MAINLY_API_KEY"
{
  "address": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
  "items": [
    {
      "id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
      "name": "Mad Lads #8420",
      "image": "https://cdn.mainly.dev/assets/F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk.png",
      "standard": "programmable",
      "compressed": false,
      "collection": {
        "address": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",
        "name": "Mad Lads",
        "verified": true
      }
    },
    {
      "id": "8vw5tCePkTQ4zLmVzRvXBt5V6YyCBcAgLKOgFmQ7cPvv",
      "name": "Drip Drop #102",
      "image": "https://cdn.mainly.dev/assets/8vw5tCePkTQ4zLmVzRvXBt5V6YyCBcAgLKOgFmQ7cPvv.png",
      "standard": "standard",
      "compressed": true,
      "collection": null
    }
  ],
  "nextCursor": "eyJwYWdlIjoyfQ"
}

Response fields

FieldTypeDescription
items[].idstringThe asset's address (mint for regular NFTs, asset ID for compressed).
items[].namestringDisplay name from metadata.
items[].imagestring | nullCDN-cached image URL.
items[].standardstringstandard, programmable, or edition.
items[].compressedbooleanWhether this is a compressed NFT.
items[].collectionobject | nullCollection address, name, and whether membership is cryptographically verified.
items[].attributesarrayOnly with includeAttributes=true: [{ "traitType": "...", "value": "..." }].

For everything about a single NFT — description, royalties, delegation state — follow up with Get an NFT.

Check collection.verified before trusting collection names. Anyone can mint an NFT that claims to belong to a famous collection; only verified membership is proof. This is the most common NFT scam vector.

Errors

codeWhen
invalid_addressThe path parameter isn't valid base58.

Under the hood

Replaces a DAS-style indexer query (getAssetsByOwner), normalizes its snake_case response to these docs' conventions, resolves off-chain JSON metadata, and merges compressed and uncompressed assets into one shape.

On this page