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

@asmelabs/olib

v0.1.0

Published

An SDK for the OpenLibrary platform

Readme

@asmelabs/olib

A type-safe TypeScript SDK for the Open Library API.

Status: Work in progress 🚧

Why?

Open Library is an incredible open-source project — a free, editable catalog aiming to have one web page for every book ever published. But working with its API in TypeScript is painful:

  • No type safety. Response shapes are undocumented, inconsistent, and polymorphic. A description field might be a string or { type: string; value: string }. Good luck.
  • No official TypeScript SDK. There's a Python client, but nothing for the JS/TS ecosystem.
  • Verbose and scattered docs. You end up reading source code to understand what you'll actually get back.

@asmelabs/olib fixes all of that — Zod-validated responses, normalized types, and a clean API surface.

Install

# bun
bun add @asmelabs/olib

# npm
npm install @asmelabs/olib

# yarn
yarn add @asmelabs/olib

# pnpm
pnpm add @asmelabs/olib

Quick Start

import { createOlibClien } from "@asmelabs/olib";

const ol = createOlibClien();

// Search for books
const results = await ol.search("Fantastic Mr Fox");

// Get a work by its Open Library ID
const work = await ol.works.get("OL45804W");

// Get an edition by ISBN
const edition = await ol.editions.getByISBN("9780140328721");

// Get an author
const author = await ol.authors.get("OL34184A");

// Build a cover image URL
const coverUrl = ol.covers.book("9780140328721", "isbn", "M");
// => "https://covers.openlibrary.org/b/isbn/9780140328721-M.jpg"

Features

  • 🔒 Type-safe — Full TypeScript types for all endpoints, powered by Zod schemas
  • Runtime validation — Responses are parsed and validated at runtime, not just at compile time
  • 🌐 Universal — Works in Node.js, Bun, Deno, and browsers (uses fetch)
  • 📦 Tree-shakeable — ESM-first, import only what you need
  • 🧩 Normalized responses — Polymorphic fields like description are normalized to consistent types
  • 📖 Covers helper — URL builder for book covers and author photos without extra API calls

API Coverage

| Module | Endpoints | Status | | ------------ | ---------------------------------------- | ------ | | Search | Books, Authors, Subjects | ✅ | | Works | Get, Editions, Ratings, Bookshelves | ✅ | | Editions | Get, by ISBN | ✅ | | Authors | Get, Works | ✅ | | Covers | Book covers, Author photos (URL builder) | ✅ | | Subjects | Get | ✅ |

Docs

→ Full documentation coming soon.

Requirements

  • TypeScript ≥ 5.0
  • A fetch-compatible runtime (Node 18+, Bun, Deno, modern browsers)

Contributing

Contributions are welcome! Please read the Contributing Guide before submitting a PR.

License

MIT

Credits

Built and maintained by Asme Labs.

Open Library is a project of the Internet Archive, a 501(c)(3) non-profit.