
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@browserbasehq/sdk
Advanced tools
Browserbase is the best developer platform to reliably run, manage, and monitor headless browsers.
Get browsers' full control and leverage Browserbase's Infrastructure, Stealth Mode, and Session Debugger to power your automation, test suites, and LLM data retrievals.
npm install -S @browserbasehq/sdk
import { Browserbase } from '@browserbasehq/sdk'
// Init the SDK
const browserbase = new Browserbase()
// Load a webpage
const rawHtml = await browserbase.load('https://www.browserbase.com')
// Load multiple webpages (returns iterator)
const rawHtmls = browserbase.loadURLs([
'https://www.browserbase.com',
'https://docs.browserbase.com',
])
for await (let rawHtml of rawHtmls) {
// ...
}
// Text-only mode
const text = await browserbase.load('https://www.browserbase.com', {
textContent: true,
})
// Screenshot (returns bytes)
const result = await browserbase.screenshot('https://www.browserbase.com', {
textContent: true,
})
Install the additional dependencies:
npm i ai openai zod
import OpenAI from 'openai'
import { Browserbase } from '@browserbasehq/sdk'
import { BrowserbaseAISDK } from '@browserbasehq/sdk/dist/integrations/ai-sdk'
import {
OpenAIStream,
StreamingTextResponse,
experimental_generateText,
} from 'ai'
// Create new OpenAI client
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
})
// Init the Browserbase SDK
const browserbase = new Browserbase()
// Init the tool
const browserTool = BrowserbaseAISDK(browserbase, { textContent: true })
// Load completions
const result = await experimental_generateText({
model: openai.chat('gpt-3.5-turbo'),
tools: {
browserTool,
},
prompt: 'What is the weather in San Francisco?',
})
FAQs
The official Node.js library for the Browserbase API
The npm package @browserbasehq/sdk receives a total of 210,625 weekly downloads. As such, @browserbasehq/sdk popularity was classified as popular.
We found that @browserbasehq/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.