NFT owner lookup (ERC-721 ownerOf)

$0.002 per call · USDC via x402 · GET /api/erc721-owner

Who owns this NFT? Send GET /api/erc721-owner with the required fields contract and tokenId and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with network, contract, tokenId and owner.

Calls ownerOf(tokenId) on any ERC-721 contract on Ethereum, Base, Polygon, Arbitrum, or Optimism. Complements nft-holdings (which lists a WALLET's NFTs) - this answers by TOKEN. Keyless multi-endpoint failover. ?contract=0x…&tokenId=123&network=ethereum

Category: Crypto & onchain data · Tags: crypto nft erc721 owner ownerof token rpc evm · Also found as: nft-owner

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
contractstringyesERC-721 contract address (0x…). Also accepted as contractAddress, token, address.
tokenIdstringyesToken id - decimal or 0x hex string. Also accepted as id, token_id.
networkstringnoethereum / base / polygon / arbitrum / optimism (default base).

Example request

curl -i "https://agent402.tools/api/erc721-owner?contract=0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85&tokenId=0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc&network=ethereum"

Without payment this returns HTTP 402 Payment Required with the exact price for erc721-owner; any x402 v2 or MPP client pays it and retries.

Example response

{
  "network": "ethereum",
  "contract": "0x57f1…",
  "tokenId": "0xaf2c…",
  "owner": "0x…"
}
FieldTypeAlways presentIn the example
networkstringyesethereum
contractstringyes0x57f1…
tokenIdstringyes0xaf2c…
ownerstringyes0x…

From an MCP client

catalog.call {
  "slug": "erc721-owner",
  "params": {
    "contract": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85",
    "tokenId": "0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc",
    "network": "ethereum"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for erc721-owner; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

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/erc721-owner?contract=0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85&tokenId=0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc&network=ethereum");

Related tools

NFT holdings for an address

$0.002 · POST /api/nft-holdings

Return the NFTs owned by a wallet address on a given network. Each row carries the collection name, contract address, to…

NFT metadata lookup

$0.001 · POST /api/nft-metadata

Resolve the metadata for a single NFT: title, description, image URLs (original + cached CDN), attributes/traits, and th…

Known-address label lookup

FREE w/ compute · or $0.002 · POST /api/address-label

Label a known EVM address from a curated, committed dataset: major stablecoin + token contracts (the USDC and USDG contr…

Wallet token transfers (filtered)

$0.003 · POST /api/asset-transfers

Recent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…

Block info

$0.001 · GET /api/block-info

Header-level detail for one block on Ethereum, Base, Polygon, Arbitrum, or Optimism: hash, timestamp (unix + ISO), trans…

Latest block number

$0.001 · GET /api/block-number

The latest block number on Ethereum, Base, Polygon, Arbitrum, or Optimism: returns network, blockNumber (integer) and he…