OpenSea: API v2, SDK, CLI, and MCP for marketplace data logoOpenSea: API v2, SDK, CLI, and MCP for marketplace data
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/295OpenSea 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.
# 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.
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.
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{
"mcpServers": {
"OpenSea": {
"url": "https://mcp.opensea.io/mcp"
}
}
}What the API covers
| Surface | Use |
|---|---|
| Data and discovery | Accounts, collections, NFTs, contracts, tokens, search |
| Marketplace | Listings, offers, cancel, swap quotes, drop mint txs |
| Analytics | Floor, volume, sales, event streams |
| Stream | WebSocket via @opensea/sdk/stream |
Displaying OpenSea data: link back to the marketplace and use official logos.
Resources
Keep reading
npx -y @star-factory/launch-cli launch login. Create with --dry-run then --yes --wait-until live. MCP: mcp serve.
One key, chainid per chain. MCP for live data. Docs MCP needs no key. CLI: brew install etherscan/etherscan-cli/etherscan.
Leases, not generic loans. Pirin mainnet. Solray program 9ATDq9…HJYy2. npm install @nolus/nolusjs.
Get new articles in your inbox
Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.
