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

@parsew/sdk

v0.9.0

Published

TypeScript SDK for [Parsew](https://parsew.com) — web scraping, structured extraction, branding intelligence, and logo CDN.

Readme

@parsew/sdk

TypeScript SDK for Parsew — web scraping, structured extraction, branding intelligence, and logo CDN.

Install

npm install @parsew/sdk

Entrypoints

| Import | Use case | Auth | |--------|----------|------| | @parsew/sdk/server | Scrape, extract, map, brand (server-side) | sr_ secret key | | @parsew/sdk/client | Logo URLs and fetches (browser-safe) | pk_ publishable key |

Server — Extract API

import { Parsew } from '@parsew/sdk/server'

const parsew = new Parsew({ apiKey: 'sr_...' })

// Scrape a page
const scrapeResult = await parsew.scrape('https://example.com')
console.log(scrapeResult.markdown)

// Extract structured data with a schema
const { data } = await parsew.extract('https://example.com/jobs/123', {
  schema: z.object({
    title: z.string(),
    company: z.string(),
    salary: z.number().optional(),
  }),
  prompt: 'Extract the job posting details',
})

// Discover URLs
const mapResult = await parsew.map('https://example.com/jobs', {
  pattern: '/jobs/.*\\d+',
  limit: 20,
})
console.log(mapResult.links)

// Extract branding
const brandResult = await parsew.brand('https://stripe.com')
console.log(brandResult.data.colors.primary)

new Parsew(options)

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | required | Your secret API key (sr_ prefix) | | baseUrl | string | https://api.parsew.com | API base URL | | timeout | number | 60000 | Request timeout in ms |

Client — Logo API

import { ParsewBrands } from '@parsew/sdk/client'

const brands = new ParsewBrands({ token: 'pk_...' })

// Build a URL for <img> tags
const url = brands.url('stripe.com', { size: 256, format: 'webp' })

// Fetch programmatically
const logo = await brands.fetch('stripe.com', { size: 512 })
console.log(logo.contentType) // "image/png"
console.log(logo.data)        // ArrayBuffer

new ParsewBrands(options)

| Option | Type | Default | Description | |--------|------|---------|-------------| | token | string | required | Your publishable key (pk_ prefix) | | baseUrl | string | https://logo.parsew.com | Logo API base URL | | timeout | number | 30000 | Fetch timeout in ms |

brands.url(domain, options?)

Returns a logo URL string. Normalizes the domain automatically.

| Option | Type | Description | |--------|------|-------------| | size | number | Image size 1–2048 | | format | 'jpg' \| 'png' \| 'webp' | Image format | | fallback | 'monogram' \| '404' | What to return when no logo is found | | retina | boolean | Double size for high-DPI displays | | v | string \| number | Cache bust version |

Note: When the server has an SVG logo, it returns image/svg+xml directly — size, format, and retina have no effect for SVG logos.

brands.fetch(domain, options?)

Fetches the logo. Returns { data: ArrayBuffer, contentType: string }. Throws ParsewError on HTTP errors.

Error Handling

import { Parsew, ParsewError } from '@parsew/sdk/server'
// or
import { ParsewBrands, ParsewError } from '@parsew/sdk/client'

try {
  await parsew.scrape('https://example.com')
} catch (err) {
  if (err instanceof ParsewError) {
    console.log(err.status)   // HTTP status code
    console.log(err.code)     // Error code (e.g. "HTTP_504")
    console.log(err.message)  // Error message
  }
}

License

MIT