# Spider Browser

> Spider Browser is a cloud browser API for web data and web automation. Scrapers, crawlers, curation jobs and AI agents open a session over a WebSocket and drive a browser that Spider runs.

Generated from the data behind https://spider.cloud/browser/, so the figures here match the page.

## Connect

The endpoint is `wss://browser.spider.cloud/v1/browser`. Install the SDK, pass your Spider API key and call `init()`. The package is named `spider-browser` in each registry.

| Language | Install | Registry |
|---|---|---|
| TypeScript | `npm install spider-browser` | [npm](https://www.npmjs.com/package/spider-browser) |
| Python | `pip install spider-browser` | [PyPI](https://pypi.org/project/spider-browser/) |
| Rust | `cargo add spider-browser` | [crates.io](https://crates.io/crates/spider-browser) |

```typescript
// npm install spider-browser
import { setTimeout as sleep } from "node:timers/promises"
import { SpiderBrowser } from "spider-browser"

const browser = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY,
})
await browser.init()

await browser.goto(
  "https://books.toscrape.com/",
)

const elements = await browser.observe()

await browser.page.click(
  'a[href*="travel_2"]',
)
for (let i = 0; i < 40; i++) {
  const url = await browser.page.url()
  if (url.includes("travel_2")) break
  await sleep(50)
}
await browser.page.waitForSelector(
  "article.product_pod",
)

const row = await browser.page.extractFields({
  heading: "h1",
  results: "form.form-horizontal strong",
  title: {
    selector: "article.product_pod h3 a",
    attribute: "title",
  },
  price: "article.product_pod .price_color",
  stock: "article.product_pod .availability",
})

const html = await browser.page.content()

const credits =
  await browser.getSessionCredits()
await browser.close()

console.log(elements.length, row, html.length, credits)

```

A Playwright or Puppeteer script connects to the same endpoint over CDP, with the API key as the token.

```typescript
import { chromium } from "playwright"

const url =
  "wss://browser.spider.cloud/v1/browser"
const key = process.env.SPIDER_API_KEY

const browser =
  await chromium.connectOverCDP(
    url + "?token=" + key,
  )
const page = await browser.newPage()
await page.goto("https://books.toscrape.com/")
console.log(await page.title())
await browser.close()
```

## Calls

The SDK puts four calls on top of a page API: click, fill, type, press, hover, scroll, waits, screenshot and content. `observe()` runs without a model key when you call it with no instruction. `act()`, `extract()` and `agent()` use the model key you configure, and your model provider bills those calls.

- `act()`: one step you describe in plain words.
- `observe()`: the elements on the page with their selectors.
- `extract()`: JSON in the schema you pass.
- `agent()`: works toward a goal across pages.

## Limits

| Limit | Value |
|---|---|
| Open sessions per account | 1,000 |
| New sessions a minute, per account | 100 |
| Commands a second, per session | 500, with bursts to 1,000 |
| Session length | 30 minutes, then the server ends the session |

## Measured latency

Medians from 2026-11-17. A raw CDP client on a laptop on the public internet ran 10 warmup rounds, then the measured rounds.

| Reading | Median | Run |
|---|---|---|
| Connect: socket open, key accepted, first protocol answer | 754 ms | example.com, 50 rounds |
| Session create: connect plus the page attach, what `init()` does | 1,069 ms | example.com, 50 rounds |
| Session close: target closed and the socket shut, what `close()` does | 44 ms | example.com, 50 rounds |

## Pricing

Pay per use, from $1 per GB transferred and $0.0001 per session minute. One credit is $0.0001. The meter bills every 3 seconds while a session is open. Recording a session adds 15% to its compute and leaves bandwidth alone. There is no monthly minimum.

The pricing guide has the whole meter: https://spider.cloud/guides/pricing-and-plans/#how-minutes-are-metered

## Browser Fidelity Bench V1

Spider passed 80 of 80 tasks on 2026-09-18, a 100% pass rate. Each task loads one real page on a production site and passes when the page comes back complete. The other providers on the board keep their 2026-03-22 readings and were not re-measured.

Tasks and harness, revision 46fc6a03: https://github.com/spider-rs/benchmark

## Dataset run

Spider Browser loaded 999 of 999 URLs across 254 domains. The public dataset lists every URL with its outcome, results published 2026-02-17.

- Dataset: https://github.com/spider-rs/spider-browser-dataset
- Write-up: https://spider.cloud/blog/spider-browser-vs-kernel-browserbase-benchmark/

## MCP and desktop

Nine browser tools for Claude, Cursor or any MCP client: open, navigate, click, fill, screenshot, content, evaluate, wait_for and close. A tenth tool, spider_ai_browser, takes one step in plain language. The four SDK calls are not in the MCP tool set. Setup: https://spider.cloud/mcp/

The same browser as an app for macOS on Apple silicon, Windows and Linux. Downloads: [macOS](https://api.spider.cloud/data/download/browser?platform=macos-arm64), [Windows](https://api.spider.cloud/data/download/browser?platform=windows-x64), [Linux](https://api.spider.cloud/data/download/browser?platform=linux-x64-appimage).

## Links

- Page: https://spider.cloud/browser/
- Docs: https://spider.cloud/docs/core/spider-browser/
- API reference: https://spider.cloud/docs/api/browser/
- Pricing guide: https://spider.cloud/guides/pricing-and-plans/#how-minutes-are-metered
- Benchmark source: https://github.com/spider-rs/benchmark
- Dataset: https://github.com/spider-rs/spider-browser-dataset
