1
1
# Browser Use TypeScript API Library
2
2
3
- [ ![ NPM version] ( < https://img.shields.io/npm/v/browser-use.svg?label=npm%20(stable) > )] ( https://npmjs.org/package/browser-use ) ![ npm bundle size] ( https://img.shields.io/bundlephobia/minzip/browser-use )
3
+ [ ![ NPM version] ( < https://img.shields.io/npm/v/browser-use-node .svg?label=npm%20(stable) > )] ( https://npmjs.org/package/browser-use-node ) ![ npm bundle size] ( https://img.shields.io/bundlephobia/minzip/browser-use-node )
4
4
5
5
This library provides convenient access to the Browser Use REST API from server-side TypeScript or JavaScript.
6
6
7
- The full API of this library can be found in [ api.md] ( api.md ) .
7
+ The REST API documentation can be found on [ docs.browser-use.com ] ( https://docs.browser-use.com/cloud/ ) . The full API of this library can be found in [ api.md] ( api.md ) .
8
8
9
9
It is generated with [ Stainless] ( https://www.stainless.com/ ) .
10
10
@@ -15,15 +15,15 @@ npm install git+ssh://
[email protected] :stainless-sdks/browser-use-typescript.git
15
15
```
16
16
17
17
> [ !NOTE]
18
- > Once this package is [ published to npm] ( https://www.stainless.com/docs/guides/publish ) , this will become: ` npm install browser-use `
18
+ > Once this package is [ published to npm] ( https://www.stainless.com/docs/guides/publish ) , this will become: ` npm install browser-use-node `
19
19
20
20
## Usage
21
21
22
22
The full API of this library can be found in [ api.md] ( api.md ) .
23
23
24
24
<!-- prettier-ignore -->
25
25
``` js
26
- import BrowserUse from ' browser-use' ;
26
+ import BrowserUse from ' browser-use-node ' ;
27
27
28
28
const client = new BrowserUse ({
29
29
apiKey: process .env [' BROWSER_USE_API_KEY' ], // This is the default and can be omitted
@@ -40,7 +40,7 @@ This library includes TypeScript definitions for all request params and response
40
40
41
41
<!-- prettier-ignore -->
42
42
``` ts
43
- import BrowserUse from ' browser-use' ;
43
+ import BrowserUse from ' browser-use-node ' ;
44
44
45
45
const client = new BrowserUse ({
46
46
apiKey: process .env [' BROWSER_USE_API_KEY' ], // This is the default and can be omitted
@@ -162,7 +162,7 @@ The log level can be configured in two ways:
162
162
2 . Using the ` logLevel ` client option (overrides the environment variable if set)
163
163
164
164
``` ts
165
- import BrowserUse from ' browser-use' ;
165
+ import BrowserUse from ' browser-use-node ' ;
166
166
167
167
const client = new BrowserUse ({
168
168
logLevel: ' debug' , // Show all log messages
@@ -190,7 +190,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
190
190
below the configured level will not be sent to your logger.
191
191
192
192
``` ts
193
- import BrowserUse from ' browser-use' ;
193
+ import BrowserUse from ' browser-use-node ' ;
194
194
import pino from ' pino' ;
195
195
196
196
const logger = pino ();
@@ -259,7 +259,7 @@ globalThis.fetch = fetch;
259
259
Or pass it to the client:
260
260
261
261
``` ts
262
- import BrowserUse from ' browser-use' ;
262
+ import BrowserUse from ' browser-use-node ' ;
263
263
import fetch from ' my-fetch' ;
264
264
265
265
const client = new BrowserUse ({ fetch });
@@ -270,7 +270,7 @@ const client = new BrowserUse({ fetch });
270
270
If you want to set custom ` fetch ` options without overriding the ` fetch ` function, you can provide a ` fetchOptions ` object when instantiating the client or making a request. (Request-specific options override client options.)
271
271
272
272
``` ts
273
- import BrowserUse from ' browser-use' ;
273
+ import BrowserUse from ' browser-use-node ' ;
274
274
275
275
const client = new BrowserUse ({
276
276
fetchOptions: {
@@ -287,7 +287,7 @@ options to requests:
287
287
<img src =" https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg " align =" top " width =" 18 " height =" 21 " > ** Node** <sup >[[ docs] ( https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch )] </sup >
288
288
289
289
``` ts
290
- import BrowserUse from ' browser-use' ;
290
+ import BrowserUse from ' browser-use-node ' ;
291
291
import * as undici from ' undici' ;
292
292
293
293
const proxyAgent = new undici .ProxyAgent (' http://localhost:8888' );
@@ -301,7 +301,7 @@ const client = new BrowserUse({
301
301
<img src =" https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg " align =" top " width =" 18 " height =" 21 " > ** Bun** <sup >[[ docs] ( https://bun.sh/guides/http/proxy )] </sup >
302
302
303
303
``` ts
304
- import BrowserUse from ' browser-use' ;
304
+ import BrowserUse from ' browser-use-node ' ;
305
305
306
306
const client = new BrowserUse ({
307
307
fetchOptions: {
@@ -313,7 +313,7 @@ const client = new BrowserUse({
313
313
<img src =" https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg " align =" top " width =" 18 " height =" 21 " > ** Deno** <sup >[[ docs] ( https://docs.deno.com/api/deno/~/Deno.createHttpClient )] </sup >
314
314
315
315
``` ts
316
- import BrowserUse from ' npm:browser-use' ;
316
+ import BrowserUse from ' npm:browser-use-node ' ;
317
317
318
318
const httpClient = Deno .createHttpClient ({ proxy: { url: ' http://localhost:8888' } });
319
319
const client = new BrowserUse ({
0 commit comments