# OneSource ERC-721 Token Holdings Lookup

> OneSource ERC-721 Token Holdings Lookup is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-15).

Returns all ERC-721 (NFT) token IDs owned by a given address for a specific contract on Ethereum mainnet or Sepolia testnet

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/erc721-tokens
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-erc-721-token-holdings-lookup-39d68a93
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SvzJSbNm9OenUOv_3Byz2

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 onesource-erc-721-token-holdings-lookup-39d68a93
```

Example prompt: Can you look up which BAYC NFTs (contract 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d) are owned by 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Ethereum mainnet, up to 100 results?

## When to prefer this

Use this endpoint when you need to enumerate all ERC-721 token IDs held by a specific Ethereum address within a particular NFT contract. Ideal for checking NFT ownership, building NFT portfolio views, verifying access based on NFT holdings, or checking whitelist eligibility. Prefer this over general blockchain RPCs when you need clean, pre-parsed NFT holding data rather than raw RPC responses.

## Known failure modes

- Invalid owner address format (not a valid 0x hex address) — likely 400 or validation error
- Invalid contract address format — likely 400 or validation error
- Contract is not an ERC-721 contract — may return empty results or error
- Owner holds no tokens in this contract — returns empty token list
- Network not supported or node unavailable — 5xx error
- Max parameter out of range (below 1 or above 1000) — validation error
- Payment not provided or insufficient — 402 Payment Required

## How this service works

List every ERC721 NFT token_id a wallet owns in a collection via tokenOfOwnerByIndex (eth_call)

## Output

A JSON object containing the owner address, contract address, a list of token ID strings owned by that address, and a count of total tokens returned. Example: {count: 3, owner: '0x...', tokens: ['1','42','100'], contract: '0x...'}

## Example request

```json
{
 "max": 100,
 "owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
 "network": "ethereum",
 "contract": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "contract",
      "address"
     ],
     "properties": {
      "max": {
       "type": "integer",
       "maximum": 1000,
       "minimum": 1
      },
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "network": {
       "enum": [
        "ethereum",
        "sepolia",
        "robinhood"
       ],
       "type": "string",
       "default": "ethereum"
      },
      "contract": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "owner": {
         "type": "string"
        },
        "balance": {
         "type": "string"
        },
        "token_ids": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "is_enumerable": {
         "type": "boolean"
        },
        "contract_address": {
         "type": "string"
        }
       },
       "description": "Endpoint-specific response payload"
      },
      "meta": {
       "type": "object",
       "required": [
        "endpoint",
        "request_id"
       ],
       "properties": {
        "endpoint": {
         "type": "string"
        },
        "cost_usdc": {
         "type": "string"
        },
        "request_id": {
         "type": "string"
        },
        "payment_chain": {
         "type": "string"
        },
        "payment_token": {
         "type": "string"
        }
       }
      },
      "error": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "code": {
         "type": "integer"
        },
        "message": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "owner": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
   "balance": "3",
   "token_ids": [
    "1",
    "42",
    "100"
   ],
   "is_enumerable": true,
   "contract_address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
  },
  "meta": {
   "endpoint": "/api/chain/erc721-tokens",
   "cost_usdc": "0.001",
   "request_id": "00000000abcdef01",
   "payment_chain": "base",
   "payment_token": "USDC"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onesource-erc-721-token-holdings-lookup-39d68a93/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
