← Protocols
Alchemy NFT API
NFT / Marketplace·Ethereum · Polygon · Arbitrum · Optimism · Base · Zora · World Chain · Shape · Solana

Alchemy NFT API

01Description

Production NFT data API: ownership, metadata, floor prices, transfers, and spam detection across Ethereum and major L2s, with batch endpoints and webhooks.

02Best for
  • 01wallet NFT portfolios
  • 02metadata + media URLs
  • 03spam / phishing filtering
  • 04transfer event webhooks
  • 05floor price aggregation
03Install
  • pnpm add alchemy-sdk
04Environment variables
VariableScopeDescription
ALCHEMY_API_KEYServerAlchemy API key from the Alchemy dashboard. Server-side only.
05Prompt snippet
Use the Alchemy NFT API for owner/metadata lookups. Construct once: `const alchemy = new Alchemy({ apiKey: process.env.ALCHEMY_API_KEY!, network: Network.ETH_MAINNET })`. Read portfolios with `alchemy.nft.getNftsForOwner(address, { excludeFilters: [NftFilters.SPAM], pageSize: 100 })` and page via the returned `pageKey`. For single-asset metadata use `alchemy.nft.getNftMetadata(contract, tokenId)`; for floor data use `alchemy.nft.getFloorPrice(contract)`. Subscribe to NFT activity webhooks via the Notify dashboard rather than polling.
06Gotchas
  • The `alchemy-sdk-js` JS package is in maintenance mode (archival announced for 2026) — for new projects prefer direct REST/`fetch` calls to `https://<network>.g.alchemy.com/nft/v3/<key>/...` so you don't inherit a deprecated dependency.
  • Spam filter is heuristic; legitimate niche collections occasionally land in `SPAM` and get hidden — log and audit filter exclusions before showing portfolios in regulated/compliance contexts.
  • Floor prices come from OpenSea + LooksRare aggregation, not on-chain — they lag by tens of seconds and don't reflect Blur bidding pools, so don't use them for liquidations.
  • Metadata refresh is eventually consistent: a freshly revealed `tokenURI` may take minutes to propagate; force `refreshContract` or `refreshNftMetadata` after a reveal mint and re-poll.
  • IPFS gateway URLs returned by the API point at Alchemy's gateway; if you need permanent media URLs in your own DB, extract the `ipfs://` CID from `tokenUri.raw` and pin to your own provider rather than caching the proxy URL.
  • Each chain requires a separate `Network` instance; calls to `getNftsForOwner` on the wrong network return an empty array silently rather than erroring.
07Alternatives