# Polygon NFT Balance (ERC-721 balanceOf)

> Polygon NFT Balance (ERC-721 balanceOf) is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-20).

Returns how many NFTs of a specific ERC-721 collection a wallet holds on Polygon PoS, along with the collection name and symbol.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/polygon/nft-balance?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Provider: agent-data-tools.revmesh2074.workers.dev
- Website: https://agent-data-tools.revmesh2074.workers.dev
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-polygon-nft-balance-erc-721-12ade61c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AVJxPLoqYodv70zmIz1H3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-data-tools-revmesh2074-workers-dev-polygon-nft-balance-erc-721-12ade61c
```

Example prompt: How many NFTs from the ERC-721 collection at contract 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D does wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 hold on Polygon PoS?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "contract",
  "address"
 ],
 "properties": {
  "address": {
   "type": "string",
   "description": "0x wallet address"
  },
  "contract": {
   "type": "string",
   "description": "0x ERC-721 collection contract address"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string"
  },
  "chain": {
   "type": "string"
  },
  "symbol": {
   "type": "string"
  },
  "address": {
   "type": "string"
  },
  "balance": {
   "type": "string"
  },
  "chainId": {
   "type": "number"
  },
  "contract": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-polygon-nft-balance-erc-721-12ade61c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
