# OnchainExpat NFT Metadata API

> OnchainExpat NFT Metadata API is a paid API for AI agents from x402.onchainexpat.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Fetches on-chain NFT metadata for a given token using the x402 pay-per-request protocol

## Facts

- Endpoint: POST https://x402.onchainexpat.com/api/x402-crypto/nft-metadata
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchainexpat-nft-metadata-api-dd3b470a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1wfZPpWP33AqFFtH8Eb85

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 onchainexpat-nft-metadata-api-dd3b470a -d '<json body>'
```

Example prompt: Can you look up the metadata for NFT token ID 1234 on the Bored Ape Yacht Club contract 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D on Ethereum — I want to see its name, image, and trait attributes.

## When to prefer this

Use this endpoint when you need on-chain NFT metadata (name, image, traits) for a specific token by contract address and token ID, especially in a pay-per-request context without needing a monthly subscription to a larger NFT data platform like OpenSea or Alchemy.

## Known failure modes

- Invalid or non-existent contract address returns an error
- Token ID not found on the given contract returns a 404-style error
- Unsupported blockchain network returns an error
- Payment not included or insufficient USDC balance returns a 402 payment required response
- Rate limiting or network congestion may cause timeouts

## How this service works

Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol

## Output

A JSON object containing the NFT's metadata including name, description, image URL, external URL, and an array of trait attributes (e.g. background, eyes, fur) for the specified token.

## Example request

```json
{
 "token_id": "1",
 "contract_address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "token_id",
  "contract_address"
 ],
 "properties": {
  "chain": {
   "type": "string",
   "description": "Blockchain (default: ethereum)"
  },
  "token_id": {
   "type": "string",
   "description": "Token ID of the NFT (numeric string)"
  },
  "contract_address": {
   "type": "string",
   "description": "NFT contract address (0x + 40 hex chars)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "chain": {
     "type": "string"
    },
    "owner": {
     "type": "string",
     "description": "Current owner address"
    },
    "metadata": {
     "type": "object",
     "description": "NFT name, description, image URL, attributes"
    },
    "token_id": {
     "type": "string"
    },
    "collection": {
     "type": "object",
     "description": "Collection name, symbol, total supply"
    },
    "explorer_url": {
     "type": "string",
     "description": "Link to view NFT on block explorer"
    },
    "contract_address": {
     "type": "string"
    },
    "transfer_history": {
     "type": "array",
     "description": "Recent transfer history"
    }
   }
  },
  "success": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchainexpat-nft-metadata-api-dd3b470a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.onchainexpat.com](https://www.zero.xyz/host/x402.onchainexpat.com/llms.txt)
