NFT collection metadata
POST /api/nft-collectionFetch NFT collection (ERC-721 / ERC-1155) metadata by contract address on Ethereum, Base, Polygon, Arbitrum, or Optimism: name, symbol, token type, total supply, deployer, OpenSea slug + image, floor (ETH), Twitter/Discord, and verification (safelist) status. Send POST /api/nft-collection with the required field contract and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with contract, network, name, symbol, tokenType and 13 more.
Use to label a contract address with its collection identity before pulling tokens or sales.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contract | string | yes | NFT contract address (0x-prefixed 40-hex). Also accepted as contractAddress, token, address. |
network | string | no | Chain: ethereum, base, polygon, arbitrum, optimism (default ethereum). |
Example request
curl -i -X POST https://agent402.tools/api/nft-collection \
-H "Content-Type: application/json" \
-d '{"contract":"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d","network":"ethereum"}'
Without payment this returns HTTP 402 Payment Required with the exact price for nft-collection; any x402 v2 or MPP client pays it and retries.
Example response
{
"contract": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"network": "ethereum",
"name": "BoredApeYachtClub",
"symbol": "BAYC",
"tokenType": "ERC721",
"totalSupply": "10000",
"deployedBlockNumber": 12287507,
"deployerAddress": "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03",
"openSeaSlug": "boredapeyachtclub",
"openSeaImage": "https://...",
"floorPrice": 13.5,
"floorPriceSource": "opensea",
"safelistStatus": "verified",
"description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs.",
"externalUrl": "https://boredapeyachtclub.com",
"twitterUsername": "BoredApeYC",
"discordUrl": "https://discord.gg/3P5K3dzgdB",
"source": "alchemy-nft-v3"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
contract | string | yes | 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d |
network | string | yes | ethereum |
name | string | yes | BoredApeYachtClub |
symbol | string | yes | BAYC |
tokenType | string | yes | ERC721 |
totalSupply | string | yes | 10000 |
deployedBlockNumber | number | yes | 12287507 |
deployerAddress | string | yes | 0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03 |
openSeaSlug | string | yes | boredapeyachtclub |
openSeaImage | string | yes | https://... |
floorPrice | number | yes | 13.5 |
floorPriceSource | string | yes | opensea |
safelistStatus | string | yes | verified |
description | string | yes | The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs. |
externalUrl | string | yes | https://boredapeyachtclub.com |
twitterUsername | string | yes | BoredApeYC |
discordUrl | string | yes | https://discord.gg/3P5K3dzgdB |
source | string | yes | alchemy-nft-v3 |
From an MCP client
catalog.call {
"slug": "nft-collection",
"params": {
"contract": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"network": "ethereum"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for nft-collection; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
contractis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/nft-collection returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/nft-collection", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"contract": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"network": "ethereum"
}),
});
Related tools
NFT metadata lookup
POST /api/nft-metadataResolve the metadata for a single NFT: title, description, image URLs (original + cached CDN), attributes/traits, and th…
NFT holdings for an address
POST /api/nft-holdingsReturn the NFTs owned by a wallet address on a given network. Each row carries the collection name, contract address, to…
Wallet token transfers (filtered)
POST /api/asset-transfersRecent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…
ERC-1155 balance
GET /api/chain/erc1155-balanceHow many of one ERC-1155 token id an account holds, read straight from the contract. ERC-1155 is the multi-token standar…
NFT owner lookup (ERC-721 ownerOf)
GET /api/erc721-ownerWho owns this NFT? Calls ownerOf(tokenId) on any ERC-721 contract on Ethereum, Base, Polygon, Arbitrum, or Optimism. Com…
NFT floor price
POST /api/nft-floorGet the current floor price for an NFT collection across OpenSea + LooksRare (Ethereum). Returns per-marketplace floor (…