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

@browserbeam/sdk

v0.4.0

Published

Official TypeScript SDK for the Browserbeam API — browser automation built for AI agents

Readme

Browserbeam TypeScript SDK

Official TypeScript/Node.js SDK for the Browserbeam API — browser automation built for AI agents.

Installation

npm install @browserbeam/sdk

Quick Start

import Browserbeam from "@browserbeam/sdk";

const client = new Browserbeam({ apiKey: "sk_live_..." });
const session = await client.sessions.create({ url: "https://example.com" });

// Page state is available immediately
console.log(session.page?.title);
console.log(session.page?.interactive_elements);

// Interact with the page
await session.click({ ref: "e1" });

// Extract structured data
const result = await session.extract({
  title: "h1 >> text",
  links: ["a >> href"],
});
console.log(result.extraction);

await session.close();

Configuration

const client = new Browserbeam({
  apiKey: "sk_live_...",  // or set BROWSERBEAM_API_KEY env var
  baseUrl: "https://api.browserbeam.com",  // default
  timeout: 120_000,  // request timeout in ms
});

Session Options

const session = await client.sessions.create({
  url: "https://example.com",
  viewport: { width: 1280, height: 720 },
  locale: "en-US",
  timezone: "America/New_York",
  proxy: "http://user:pass@proxy:8080",
  block_resources: ["image", "font"],
  auto_dismiss_blockers: true,
  timeout: 300,
});

Available Methods

| Method | Description | |--------|-------------| | session.goto(url) | Navigate to a URL | | session.observe() | Get page state as markdown. Supports mode: "full" for all sections. | | session.click({ ref }) | Click an element by ref, text, or label | | session.fill({ value, ref }) | Fill an input field | | session.type({ value, label }) | Type text character by character | | session.select({ value, label }) | Select a dropdown option | | session.check({ label }) | Toggle a checkbox | | session.scroll({ to: "bottom" }) | Scroll the page | | session.scrollCollect() | Scroll and collect all content | | session.screenshot() | Take a screenshot | | session.extract(schema) | Extract structured data | | session.fillForm({ fields, submit }) | Fill and submit a form | | session.wait({ ms }) | Wait for time, selector, or text | | session.pdf() | Generate a PDF | | session.executeJs(code) | Run JavaScript | | session.close() | Close the session |

Page Map & Full Mode

The first observe call automatically includes a page.map — a lightweight structural outline of the page's landmark regions (header, nav, main, aside, footer) with CSS selectors and descriptive hints. Use it to discover what content is available outside the main area.

const res = await session.observe();
console.log(res.page?.map);
// [{ section: "nav", selector: "nav.top-nav", hint: "Home · Docs · Pricing" }, ...]

To re-request the map on subsequent calls:

await session.observe({ include_page_map: true });

When you need content from all page sections (sidebars, footer links, nav items), use mode: "full". The response markdown is organized by region headers:

const full = await session.observe({ mode: "full", max_text_length: 20000 });
// page.markdown.content contains:
// ## [nav]
// Home · Docs · Pricing
// ## [main]
// ...article content...
// ## [aside]
// Related posts · ...

Session Management

const sessions = await client.sessions.list({ status: "active" });
const info = await client.sessions.get("ses_abc123");
await client.sessions.destroy("ses_abc123");

Error Handling

import Browserbeam, { RateLimitError, SessionNotFoundError } from "@browserbeam/sdk";

try {
  const session = await client.sessions.create({ url: "https://example.com" });
} catch (e) {
  if (e instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${e.retryAfter}s`);
  }
}

Documentation

Full API documentation at browserbeam.com/docs.

License

MIT