← Articles
OpenSea: API v2, SDK, CLI, and MCP for marketplace data logo
nft

OpenSea: API v2, SDK, CLI, and MCP for marketplace data

· SEP 2, 2026 ·
Read
Share

x-api-key on every call. Instant POST /api/v2/auth/keys for agents. SDK for Seaport trading. MCP at https://mcp.opensea.io/mcp.

devrels.xyz/a/295

OpenSea ships a v2 API for NFTs, tokens, and marketplace data across supported chains. Fetch metadata, create and fulfill orders, track events, and wire agents through MCP and a CLI. Start at docs.opensea.io/reference/api-overview.

Base URL is https://api.opensea.io. Machine index: docs.opensea.io/llms.txt. OpenAPI: /api/v2/openapi.json. Site-level llms: opensea.io/llms.txt.

Auth

Every request needs x-api-key. Agents can mint a free-tier key with no signup. Keys expire after 7 days. Production keys come from Settings → Developer. Three keys per account. All keys on one account share one rate-limit bucket.

bash
# Instant free-tier key (no signup)
curl -X POST https://api.opensea.io/api/v2/auth/keys

# First read
curl "https://api.opensea.io/api/v2/collections/doodles-official" \
  -H "x-api-key: YOUR_KEY"

Wallet-specific endpoints (drop eligibility, favorites, cancel) also need Authorization: Bearer with a scoped token. See Authentication.

Instant-key example rates in docs: 600/h read, 30/h write, 5/m fulfillment. Treat those as the mint response, not a contract. Build against X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. On 429, wait until reset. Batch via /api/v2/collections/batch, /api/v2/nfts/batch, /api/v2/tokens/batch. Extra keys do not raise throughput.

TOON for agents

Send Accept: text/markdown on GET to receive TOON (Token-Optimized Object Notation). Docs say ~40% fewer tokens than JSON. Default remains JSON.

bash
curl "https://api.opensea.io/api/v2/collections/doodles-official" \
  -H "x-api-key: YOUR_KEY" \
  -H "Accept: text/markdown"

SDK, CLI, MCP

Trading SDK is @opensea/sdk (Seaport). ethers.js or viem. CLI is @opensea/cli. MCP is hosted at https://mcp.opensea.io/mcp (SSE: https://mcp.opensea.io/sse). Same API key for REST and MCP. MCP docs name Ethereum, Polygon, Base, Solana, and other major chains. Live chain list: GET /api/v2/chains.

bash
npm install @opensea/sdk
npm install -g @opensea/cli

npx @opensea/cli collections get mfers
export OPENSEA_API_KEY=YOUR_KEY
opensea collections get mfers
json
{
  "mcpServers": {
    "OpenSea": {
      "url": "https://mcp.opensea.io/mcp"
    }
  }
}

What the API covers

SurfaceUse
Data and discoveryAccounts, collections, NFTs, contracts, tokens, search
MarketplaceListings, offers, cancel, swap quotes, drop mint txs
AnalyticsFloor, volume, sales, event streams
StreamWebSocket via @opensea/sdk/stream

Displaying OpenSea data: link back to the marketplace and use official logos.

Resources

Keep reading

Get new articles in your inbox

Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.