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

@orsa.dev/sdk

v0.1.0

Published

Official TypeScript SDK for Orsa.dev — web data extraction & brand intelligence API

Readme

@orsa.dev/sdk

Official TypeScript SDK for Orsa.dev — web data extraction & brand intelligence.

Install

npm install @orsa.dev/sdk
# or
bun add @orsa.dev/sdk
# or
pnpm add @orsa.dev/sdk

Requires Node ≥ 18 (native fetch). Ships ESM + CJS + TypeScript types.

Quick start

import Orsa from '@orsa.dev/sdk';

const client = new Orsa({ apiKey: process.env.ORSA_API_KEY! });

// Brand intelligence
const brand = await client.brand.retrieve({ domain: 'stripe.com' });
console.log(brand.title);              // "Stripe"
console.log(brand.colors[0]);          // { hex: "#635BFF", name: "Iris" }
console.log(brand.logos[0]?.url);      // logo URL

// Web scraping
const page = await client.web.scrape({ url: 'https://stripe.com/docs' });
console.log(page.markdown);

// AI extraction
const ans = await client.ai.query({
  domain: 'stripe.com',
  dataToExtract: 'Return pricing plans as a JSON array.',
});
console.log(ans.result);

Every method returns the unwrapped response payload — you don't need to reach into .data yourself.

Configuration

new Orsa({
  apiKey: 'or_live_...',           // required
  baseUrl: 'https://api.orsa.dev', // override for self-hosted or staging
  timeout: 30_000,                  // per-request timeout in ms (default 30s)
  maxRetries: 3,                    // retry on 429/5xx and connection errors
  userAgent: 'my-app/1.0',          // appended after the SDK identifier
});

Each method also accepts a per-call RequestOptions:

const ac = new AbortController();
await client.brand.retrieve({ domain: 'stripe.com' }, {
  signal: ac.signal,
  timeout: 5_000,
  headers: { 'x-correlation-id': 'abc' },
});

Resources

client.brand

| Method | Endpoint | Returns | |---|---|---| | retrieve({ domain, refresh? }) | GET /v1/brand/retrieve | BrandContextDev (arrays + *_legacy mirrors) | | retrieveByDomain({ domain }) | GET /v1/brand/retrieve-by-domain | Brand (legacy dict shape) | | retrieveByName({ name }) | GET /v1/brand/retrieve-by-name | BrandSearchResult (top + candidates) | | retrieveByEmail({ email }) | GET /v1/brand/retrieve-by-email | Brand | | retrieveByTicker({ ticker }) | GET /v1/brand/retrieve-by-ticker | Brand | | retrieveByISIN({ isin }) | GET /v1/brand/retrieve-by-isin | Brand | | retrieveSimplified({ domain }) | GET /v1/brand/retrieve-simplified | SimplifiedBrand | | screenshot({ domain }) | GET /v1/brand/screenshot | Screenshot (inline base64 PNG) | | styleguide({ domain }) | GET /v1/brand/styleguide | Styleguide (W3C-DTCG tokens + DESIGN.md) | | fonts({ domain }) | GET /v1/brand/fonts | FontsResult | | naics({ domain }) | GET /v1/brand/naics | NaicsResult (industries array) | | transactionIdentifier({ transactionInfo }) | GET /v1/brand/transaction-identifier | TransactionIdentifierResult |

client.web

| Method | Endpoint | Returns | |---|---|---| | scrape({ url, mode?, jsRendering? }) | GET /v1/web/scrape/template | ScrapeResult (markdown | html | text based on mode) | | scrapeImages({ url }) | GET /v1/web/scrape/images | ScrapeImagesResult (with role classification) | | scrapeSitemap({ domain }) | GET /v1/web/scrape/sitemap | ScrapeSitemapResult (urls + path-grouped buckets) |

client.ai

| Method | Endpoint | Returns | |---|---|---| | query({ domain, dataToExtract }) | POST /v1/brand/ai/query | AIQueryResult (free-form string result) | | products({ domain }) | GET /v1/brand/ai/products | AIProductsResult (tool-use enforced schema) |

Errors

All errors extend OrsaError:

import {
  OrsaError,           // base class
  OrsaAPIError,        // 4xx/5xx response after retries — has `.status`, `.errorCode`, `.requestId`
  OrsaTimeoutError,    // request exceeded the timeout / was aborted
  OrsaConnectionError, // network failure after retries
} from '@orsa.dev/sdk';

try {
  await client.brand.retrieve({ domain: 'stripe.com' });
} catch (err) {
  if (err instanceof OrsaAPIError && err.status === 404) {
    console.log('No brand cached yet');
  } else if (err instanceof OrsaTimeoutError) {
    console.log('Took too long');
  } else {
    throw err;
  }
}

Retries are automatic for 429, 500, 502, 503 and connection errors (exponential backoff, honors Retry-After). 4xx errors throw immediately without retry.

Documentation

Full API reference: docs.orsa.dev/api-reference Get an API key: orsa.dev/dashboard/api-keys

License

MIT — © Orsa