# OneSource NFT Metadata Lookup

> OneSource NFT Metadata 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-14).

Fetches NFT metadata, traits, and image URI for any ERC721 or ERC1155 token on Ethereum via eth_call with IPFS resolution

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/nft-metadata
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-nft-metadata-lookup-4202be35
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rOmY9yaO1Py1_ZZvZK75D

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-nft-metadata-lookup-4202be35
```

Example prompt: Can you fetch the metadata, traits, and image for token ID 4521 of the NFT contract 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D on Ethereum mainnet?

## When to prefer this

Use this endpoint when you need to retrieve on-chain NFT metadata, traits, and image URIs for ERC721 or ERC1155 tokens on Ethereum or Sepolia, especially when you need IPFS resolution handled automatically. Prefer this over raw RPC calls when you want a single clean response combining token URI resolution and metadata parsing.

## Known failure modes

- Contract address not a valid ERC721/ERC1155 — no tokenURI method found
- Token ID does not exist or has not been minted yet
- IPFS gateway timeout or unresolvable CID
- Invalid contract address format (must be 0x-prefixed 40 hex chars)
- Token ID out of range for the collection
- Network not supported (only ethereum and sepolia)
- Contract returns empty or malformed metadata JSON

## How this service works

NFT metadata for ERC721 or ERC1155 tokens via eth_call, with IPFS, Arweave, data URI, and public HTTP(S) resolution

## Output

Returns the NFT's metadata including name, description, image URI (with IPFS resolved), and an array of traits/attributes as defined in the token's metadata JSON, sourced via live eth_call against the Ethereum RPC.

## Example request

```json
{
 "network": "ethereum",
 "contract": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
 "token_id": "1"
}
```

## 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",
      "token_id"
     ],
     "properties": {
      "network": {
       "enum": [
        "ethereum",
        "sepolia",
        "robinhood"
       ],
       "type": "string",
       "default": "ethereum"
      },
      "contract": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "token_id": {
       "type": "string",
       "pattern": "^[0-9]+$"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "metadata": {
         "type": "object",
         "properties": {
          "name": {
           "type": "string"
          },
          "image": {
           "type": "string"
          },
          "attributes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "value": {
              "type": "string"
             },
             "trait_type": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "protocol": {
         "type": "string"
        },
        "token_id": {
         "type": "string"
        },
        "token_uri": {
         "type": "string"
        },
        "resolved_url": {
         "type": "string"
        },
        "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_cha
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "metadata": {
    "name": "Bored Ape #1",
    "image": "ipfs://QmPbxeGcXhYQQNgsC6a36dDyYUcHgMLnGKnF8pVFmGsvqi",
    "attributes": [
     {
      "value": "Orange",
      "trait_type": "Background"
     }
    ]
   },
   "protocol": "ipfs",
   "token_id": "1",
   "token_uri": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1",
   "resolved_url": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1",
   "contract_address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
  },
  "meta": {
   "endpoint": "/api/chain/nft-metadata",
   "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-nft-metadata-lookup-4202be35/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)
