# NFT Rarity & Metadata Analyzer

> NFT Rarity & Metadata Analyzer is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-13).

Analyzes NFT token rarity scores and metadata attributes to assess how rare or common a given NFT is within its collection

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/nft/rarity
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-shield-hazel-vercel-app-68ea0cb1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OJawuyEdZJttdQ3Fzqkju

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 defi-shield-hazel-vercel-app-68ea0cb1 -d '<json body>'
```

Example prompt: Can you check the rarity of NFT token ID 4521 from the Bored Ape Yacht Club collection — I want to know its rarity score, rank, and which traits make it rare or common?

## When to prefer this

Use this endpoint when you need to programmatically assess the rarity of a specific NFT token within its collection, especially in DeFi or trading contexts where rarity impacts valuation. Prefer this over generic NFT APIs when you need trait-level frequency breakdowns and a ranked rarity score rather than just raw metadata.

## Known failure modes

- Invalid or unrecognized contract address returns error
- Token ID does not exist in the collection
- Collection metadata not indexed or unavailable
- Rate limit or payment validation failure returns 402
- Network timeout if on-chain metadata fetch is slow

## Output

Returns a rarity score and rank for the specified NFT token, along with a breakdown of its metadata attributes and trait frequencies within the collection, indicating how rare each trait is and an overall rarity tier classification.

## Example request

```json
{
 "input": {
  "body": {
   "token_id": 4521,
   "collection_address": "0xbc4ca0eda7647a8ab7c2061c2e2ad7d64fda3371"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "properties": {
      "token_id": {
       "type": "number",
       "description": "Token ID to analyze"
      },
      "collection_address": {
       "type": "string",
       "description": "NFT collection contract address"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-shield-hazel-vercel-app-68ea0cb1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-shield-hazel.vercel.app](https://www.zero.xyz/host/defi-shield-hazel.vercel.app/llms.txt)
