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

@apicity/b2

v0.7.3

Published

Backblaze B2 S3-compatible object storage provider.

Readme

@apicity/b2

npm dependencies TypeScript docs

Backblaze B2 S3-compatible object storage provider.

Runtime dependencies:

  • zod@^4.4.3 — request schemas attached to every POST endpoint as .schema

Installation

npm install @apicity/b2
# or
pnpm add @apicity/b2

Quick Start

import { createB2 } from "@apicity/b2";

const b2 = createB2({
  accessKeyId: process.env.B2_ACCESS_KEY_ID!,
  secretAccessKey: process.env.B2_SECRET_ACCESS_KEY!,
  region: process.env.B2_REGION!,
  endpoint: process.env.B2_ENDPOINT,
});

@apicity/b2 bundles its S3-compatible signing, transport, response parsing, and schemas locally while exposing only Backblaze-supported calls.

API Reference

39 endpoints across 2 groups. Each method mirrors an upstream URL path.

buckets

PUT https://s3.us-west-004.backblazeb2.com/{bucket}

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.create({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

DELETE https://s3.us-west-004.backblazeb2.com/{bucket}

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.del({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

DELETE https://s3.us-west-004.backblazeb2.com/{bucket}?cors

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.delCors({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

DELETE https://s3.us-west-004.backblazeb2.com/{bucket}?encryption

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.delEncryption({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?acl

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.getAcl({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?cors

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.getCors({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?encryption

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.getEncryption({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?object-lock

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.getObjectLockConfiguration({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?versioning

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.getVersioning({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

HEAD https://s3.us-west-004.backblazeb2.com/{bucket}

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.head({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.list({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?location

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.location({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}?acl

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.putAcl({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}?cors

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.putCors({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}?encryption

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.putEncryption({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}?object-lock

Cost tier: cheap

Upstream docs ↗

const res = await b2.buckets.putObjectLockConfiguration({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

objects

DELETE https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.abortMultipartUpload({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

POST https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.completeMultipartUpload({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}/{key}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.copy({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

POST https://s3.us-west-004.backblazeb2.com/{bucket}/{key}?uploads

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.createMultipartUpload({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

DELETE https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.del({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

POST https://s3.us-west-004.backblazeb2.com/{bucket}?delete

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.delMany({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.get({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}/{key}?acl{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.getAcl({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}/{key}?legal-hold{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.getLegalHold({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}/{key}?retention{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.getRetention({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.getStream({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

HEAD https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.head({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?list-type=2{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.list({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.listLegacy({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?uploads{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.listMultipartUploads({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.listParts({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

GET https://s3.us-west-004.backblazeb2.com/{bucket}?versions{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.listVersions({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}/{key}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.put({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}/{key}?acl{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.putAcl({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}/{key}?legal-hold{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.putLegalHold({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}/{key}?retention{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.putRetention({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.uploadPart({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

PUT https://s3.us-west-004.backblazeb2.com/{bucket}/{key}{query}

Cost tier: cheap

Upstream docs ↗

const res = await b2.objects.uploadPartCopy({ /* ... */ });

Source: packages/provider/b2/src/b2.ts

Part of the apicity monorepo.

License

MIT — see LICENSE.