{"uid":"cap_AVJxPLoqYodv70zmIz1H3","slug":"agent-data-tools-revmesh2074-workers-dev-polygon-nft-balance-erc-721-12ade61c","name":"Polygon NFT Balance (ERC-721 balanceOf)","description":"How many NFTs of one ERC-721 collection a wallet holds on Polygon PoS (balanceOf), with the collection's name and symbol. Use to check a holder before a token-gated action or to see whether a wallet still holds a collection; for who holds one token id use polygon_nft_owner. Both inputs are 0x addresses; a missing contract or one that is not ERC-721 is 422, uncharged.","url":"https://agent-data-tools.revmesh2074.workers.dev/polygon/nft-balance?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["contract","address"],"properties":{"address":{"type":"string","description":"0x wallet address"},"contract":{"type":"string","description":"0x ERC-721 collection contract address"}}},"responseSchema":{"type":"object","properties":{"name":{"type":"string"},"chain":{"type":"string"},"symbol":{"type":"string"},"address":{"type":"string"},"balance":{"type":"string"},"chainId":{"type":"number"},"contract":{"type":"string"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_FBbS6-LvcLiGMFd3Ls5Mk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Returns how many NFTs of a specific ERC-721 collection a wallet holds on Polygon PoS, along with the collection name and symbol.","exampleAgentPrompt":"How many NFTs from the ERC-721 collection at contract 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D does wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 hold on Polygon PoS?","exampleUseCases":[{"title":"Token-gated content access check","prompt":"Before letting this user into the members-only area, check how many NFTs from contract 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 holds on Polygon — they need at least one to get in."},{"title":"NFT airdrop eligibility verification","prompt":"I'm about to airdrop tokens to holders of Polygon NFT collection 0xa3B9Ab4e2D6E6a0DfB4E6C24a1E9D6d71b8f3C2A — can you check if wallet 0x71C7656EC7ab88b098defB751B7401B5f6d8976F actually holds any NFTs from that collection right now?"},{"title":"Portfolio NFT holding audit","prompt":"Can you tell me the name, symbol, and how many tokens from Polygon ERC-721 contract 0xD23104E648B3B2Fe43Ab74e18e9dC91Ac0a4e9bD are currently held by wallet 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B?"}],"resultDescription":"A JSON object containing: balance (number of NFTs held as a string), the collection's name and symbol, the chain name and chainId (Polygon), plus the queried contract and wallet address. Returns 404 if the contract does not exist, 422 if the contract is not ERC-721; both error cases are uncharged.","failureModes":["404 - Contract address not found on Polygon PoS (uncharged)","422 - Contract exists but is not an ERC-721 contract (uncharged)","Invalid 0x address format for either parameter causing a request error","Network timeout reaching the Polygon RPC node","Wallet holds zero NFTs — returns balance '0', not an error"],"whenToPreferThis":"Use this endpoint when you need to check how many NFTs a wallet holds across an entire ERC-721 collection on Polygon PoS (the balanceOf count), rather than identifying who owns a specific token ID. Prefer this over polygon_nft_owner when the goal is eligibility checking, access gating, or portfolio counting rather than per-token ownership lookup. Choose this over general Polygon contract calls when you also want the collection name and symbol returned alongside the balance.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:14:10.797Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-polygon-nft-balance-erc-721-12ade61c"}