|
1
|
# Browserbase |
|
2
|
|
|
3
|
Proxy requests to Browserbase via Replit-managed billing. |
|
4
|
|
|
5
|
## Callback |
|
6
|
|
|
7
|
Use `externalApi__browserbase` in `code_execution`. |
|
8
|
|
|
9
|
## Allowed operations |
|
10
|
|
|
11
|
- `POST` `/v1/fetch` - Fetch a URL via a managed headless browser. Billed per call; rate depends on the `proxies` flag and the configured tier. |
|
12
|
- `POST` `/v1/search` - Web Search (Open Web Tools) — flat per-call rate; numResults (1–25) does not affect price. |
|
13
|
- `POST` `/v1/sessions` - Create a browser session. Billed by Browser Minute + Proxy MB observed via polling GET /v1/sessions/{id} until terminal status or expiresAt passes. |
|
14
|
- `POST` `/v1/sessions:id(/[^/]+)` - Close a browser session (REQUEST_RELEASE). No charge — session duration is billed on creation. |
|
15
|
- `POST` | `GET` | `DELETE` `/v1/contexts/:path*` - Browserbase contexts: create (POST /v1/contexts), read (GET /v1/contexts/{id}), delete (DELETE /v1/contexts/{id}). No charge. |
|
16
|
|
|
17
|
Authorization is handled automatically by Replit. Do not pass an `Authorization` header. |
|
18
|
|
|
19
|
## Quickstart |
|
20
|
|
|
21
|
1. Call the callback with a supported `path` and `method`. |
|
22
|
2. Put URL params in `query` and inspect `result.body`. |
|
23
|
|
|
24
|
## Example |
|
25
|
|
|
26
|
```javascript |
|
27
|
const result = await externalApi__browserbase({ |
|
28
|
path: '/v1/fetch', |
|
29
|
method: 'POST', |
|
30
|
query: {}, |
|
31
|
}) |
|
32
|
|
|
33
|
console.log(result.status) |
|
34
|
console.log(result.body) |
|
35
|
``` |