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

sightradar

v1.0.1

Published

Official Node.js / TypeScript client for the SightRadar face recognition API

Readme


What is SightRadar?

SightRadar is a fast, accurate, and affordable face recognition API for developers. This is the official Node.js / TypeScript SDK — a thin, fully-typed wrapper over the SightRadar facial recognition API that lets you add face detection, face matching, 1:1 face verification, and 1:N face search to any application in minutes.

If you are looking for an AWS Rekognition alternative with high-accuracy face recognition, simpler pricing, and a cleaner API, SightRadar is built for you. The SDK has no runtime dependencies (uses the built-in fetch — Node ≥ 18, Deno, Bun, and browsers), and ships full TypeScript types for every request and response.

  • 🎯 High-accuracy facial recognition — state-of-the-art embeddings with quality gating for reliable matches
  • Fast face search — index millions of faces and search a collection with a single selfie
  • 🔁 Drop-in AWS Rekognition alternative — familiar index / search / detect / compare operations
  • 🟦 First-class TypeScript — typed inputs and responses, works in Node, Deno, Bun, and the browser
  • 💸 Transparent, usage-based pricing — pay per call, no minimums (see pricing)

Get a free API key at sightradar.com and start building.

SightRadar vs. AWS Rekognition

Already wrote code against AWS Rekognition? SightRadar mirrors the operations you know — IndexFaces, SearchFacesByImage, DetectFaces, CompareFaces — so migrating is mostly a find-and-replace, not a rewrite. See the migration guide.

| | SightRadar | AWS Rekognition | |---|---|---| | Face detection API | ✅ | ✅ | | 1:1 face verification (compare) | ✅ | ✅ | | 1:N face search (collections) | ✅ | ✅ | | Selfie / liveness-style registration | ✅ | ⚠️ limited | | Zero-dependency SDK | ✅ | ❌ (aws-sdk) | | First-class TypeScript types | ✅ | ⚠️ partial | | Transparent per-call pricing | ✅ | ⚠️ complex tiers | | Free API key to start | ✅ | ⚠️ AWS account required |

Install

npm install sightradar

Authenticate

Create an API key in the console, then pass it directly or via the SIGHTRADAR_API_KEY environment variable.

import { SightRadar } from "sightradar";

const sr = new SightRadar({ apiKey: "frs_..." }); // or new SightRadar() with the env var

Core workflow — index and search faces

// 1. Create a collection to hold faces.
await sr.createCollection("event-2026");

// 2. Index faces from photos (URL, GCS key, or an uploaded file).
await sr.index("event-2026", { url: "https://example.com/group.jpg" });
await sr.index("event-2026", { file: buffer, filename: "photo.jpg", photoId: "img-42" });

// 3. Search the collection with one selfie.
const result = await sr.search("event-2026", { url: "https://example.com/selfie.jpg" });
for (const m of result.matches) console.log(m.photo_id, m.similarity);

Stateless operations (nothing stored)

// Detect + quality-gate faces in an image.
const det = await sr.detect({ url: "https://example.com/photo.jpg" });
console.log(det.detected_face_count, det.gated_face_count);

// 1:1 face verification between two faces.
const cmp = await sr.compare({
  sourceUrl: "https://example.com/a.jpg",
  targetUrl: "https://example.com/b.jpg",
});
console.log(cmp.match, cmp.similarity);

Account

console.log((await sr.wallet()).balance_credits);
console.log(await sr.usage(30));

Errors

Every non-2xx response rejects with a typed error:

import { NotFoundError, AuthenticationError } from "sightradar";

try {
  await sr.describeCollection("missing");
} catch (e) {
  if (e instanceof NotFoundError) console.log(e.statusCode, e.message);
}

Error classes: SightRadarError (base), AuthenticationError (401), InsufficientCreditsError (402), NotFoundError (404), RateLimitError (429).

Image inputs

Index / search / detect / register-selfie accept exactly one image source:

  • url — a public image URL
  • gcsKey — a Google Cloud Storage object key
  • file — a Blob/File (browser) or Buffer/Uint8Array (Node), uploaded as multipart

search additionally accepts embedding (a 512-number array).

Resources

License

MIT © SightRadar