npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@opensea/sdk

v11.1.1

Published

TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs, tokens, and our marketplace data

Readme

Version npm Test CI Coverage Status License Docs Discussions

@opensea/sdk

This is the TypeScript SDK for OpenSea, the largest marketplace for NFTs and tokens.

It allows developers to access the official orderbook, filter it, create listings and offers, complete trades programmatically, and swap tokens across chains.

Get started by getting an API key and instantiating your own OpenSea SDK instance. Then you can create orders off-chain or fulfill orders onchain, and listen to events in the process.

Get an API key

For quick experimentation — request a free-tier key in code, no signup needed. The returned key is valid for 30 days and the endpoint is rate-limited to 3 keys per hour per IP:

import { OpenSeaSDK } from "@opensea/sdk";

const { api_key } = await OpenSeaSDK.requestInstantApiKey();
const sdk = new OpenSeaSDK(provider, { chain: Chain.Mainnet, apiKey: api_key });

Or from the shell:

curl -s -X POST https://api.opensea.io/api/v2/auth/keys | jq -r '.api_key'

For production — create a permanent key at opensea.io/settings/developer. These keys don't expire, get higher rate limits, and can be rotated from your account. See the API key docs for details.

Happy seafaring!

Quick Start

With ethers.js

import { ethers } from "ethers";
import { OpenSeaSDK, Chain } from "@opensea/sdk";

const provider = new ethers.JsonRpcProvider("https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY");
const sdk = new OpenSeaSDK(provider, { chain: Chain.Mainnet, apiKey: "YOUR_API_KEY" });

With viem

import { createPublicClient, createWalletClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { OpenSeaSDK, Chain } from '@opensea/sdk/viem'

const publicClient = createPublicClient({ chain: mainnet, transport: http() })
const sdk = new OpenSeaSDK({ publicClient }, { chain: Chain.Mainnet, apiKey: 'YOUR_API_KEY' })

Documentation

Security Warning

Do not use this SDK directly in client-side/frontend applications.

The OpenSea SDK requires an API key for initialization. If you embed your API key in frontend code (e.g., browser applications, mobile apps), it will be publicly exposed and could be extracted by anyone, leading to potential abuse and rate limit issues.

Recommended Architecture

For frontend applications that need to interact with OpenSea functionality:

  1. Create a backend API wrapper: Set up your own backend server that securely stores your OpenSea API key
  2. Call OpenSea SDK server-side: Use @opensea/sdk on your backend to interact with OpenSea's APIs
  3. Return data to your frontend: Send the necessary data (like transaction parameters) back to your frontend
  4. Execute transactions in the browser: Have users sign transactions with their own wallets (e.g., MetaMask) in the browser

Changelog

The changelog for recent versions can be found at:

  • @opensea/sdk: https://github.com/ProjectOpenSea/opensea-js/releases
  • OpenSea API: https://docs.opensea.io/changelog