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/api-types

v0.16.1

Published

Auto-generated TypeScript types from the OpenSea API OpenAPI spec

Downloads

57,699

Readme

@opensea/api-types

Read-only mirror. This package is developed in a private monorepo and mirrored to ProjectOpenSea/api-types when a version is released, so the public code can trail the internal main branch by weeks.

Pull requests opened on the mirror cannot be merged there. They are read, and a fix worth taking is recreated in the monorepo. Because a fix that has landed internally is not public until the next release, filing an issue before writing a patch is the quickest way to find out whether a bug is already fixed.

Auto-generated TypeScript types from the OpenSea API OpenAPI spec.

Updating the spec

# Fetch latest spec from the API (once the endpoint is live)
pnpm --filter @opensea/api-types run update-spec

# Rebuild types
pnpm --filter @opensea/api-types run build

The opensea-api.json file is committed to git intentionally — it's the versioned source of truth for codegen. The update-spec script fetches the latest version from the API and writes it locally. Commit the updated spec so diffs show exactly what changed in the API.

Usage

import type { Schemas, OperationResponse, OperationQueryParams } from "@opensea/api-types";

type Collection = Schemas["CollectionResponse"];
type ListingsResult = OperationResponse<"list_listings_collection_all">;
type ListParams = OperationQueryParams<"list_collections">;

Runtime values

Most of this package is types, which disappear at compile time. Two exports are real values, both generated from opensea-api.json so they cannot drift from the types beside them.

CHAIN_IDENTIFIERS is every chain slug the API accepts, in spec order, and isChainIdentifier narrows an arbitrary string to ChainIdentifier. Reach for these instead of writing out the chain list, which is the copy that goes stale when the API adds a chain.

import { CHAIN_IDENTIFIERS, isChainIdentifier } from "@opensea/api-types";

for (const chain of CHAIN_IDENTIFIERS) {
  console.log(chain); // "blast" | "base" | "ethereum" | ...
}

const input: string = process.argv[2] ?? "";
if (isChainIdentifier(input)) {
  // input is ChainIdentifier here
  await fetchCollections(input);
}

AUTH_SCOPES is the scope registry (name, display name, description, group, endpoints, MCP tools) from the spec's AuthScope schema.

These are wire types, in snake_case

Every type here mirrors the OpenAPI spec, so its keys are the ones the API actually sends and accepts. That is the right shape for code that calls the API directly.

It is the wrong shape for a value that came back from @opensea/sdk. The SDK rewrites response keys to camelCase, so a raw type used to annotate an SDK return value describes renamed fields that do not exist at runtime and read undefined. Single-word keys survive the rewrite, so part of the value still reads correctly and the rest looks like missing data. TypeScript rejects that pairing only where the wire type has a required snake_case key somewhere in its tree, so it can compile cleanly.

SDK callers want the camelized view: the matching type from @opensea/sdk (OpenSeaCollection, ResolveAccountResponse, and so on), or Camelize<T> from @opensea/sdk wrapped around the wire type. The SDK README has the detail under "Response casing".

Security

Found a vulnerability? Report it through OpenSea's Bugcrowd program at https://bugcrowd.com/engagements/opensea rather than opening a public issue. See SECURITY.md.