Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
removed cloud docs
Gregor Žuničdeea516d21a0
diff --git a/docs/cloud/v2/node-quickstart.mdx b/docs/cloud/v2/node-quickstart.mdxdeleted file mode 100644index c33294921..000000000--- a/docs/cloud/v2/node-quickstart.mdx+++ /dev/null@@ -1,146 +0,0 @@-----title: "Node.js"-description: "Get started with Browser Use Cloud API using Node.js"-icon: "node-js"-mode: "wide"------<img src="/images/cloud-banner-js.png" alt="Browser Use Node.js" width="full" />--> The repository is available on [GitHub](https://github.com/browser-use/browser-use-node)--<CodeGroup>--```sh npm-npm install browser-use-sdk-```--```sh pnpm-pnpm add browser-use-sdk-```--```sh yarn-yarn add browser-use-sdk-```--```sh bun-bun add browser-use-sdk-```--</CodeGroup>--☝️ Get your API Key at [Browser Use Cloud](https://cloud.browser-use.com/billing)--```ts-import BrowserUse from "browser-use-sdk";--const client = new BrowserUse({- apiKey: "bu_...",-});--const result = await client.tasks.run({- task: "Search for the top 10 Hacker News posts and return the title and url.",-});--console.log(result.doneOutput);-```--> The full API of this library can be found in [reference.md](https://github.com/browser-use/browser-use-node/blob/main/reference.md).--### Structured Output with Zod--```ts-import z from "zod";--const TaskOutput = z.object({- posts: z.array(- z.object({- title: z.string(),- url: z.string(),- })- ),-});--const result = await client.tasks.run({- task: "Search for the top 10 Hacker News posts and return the title and url.",- schema: TaskOutput,-});--for (const post of result.parsedOutput.posts) {- console.log(`${post.title} - ${post.url}`);-}-```--### Streaming Agent Updates--```ts-const task = await browseruse.tasks.create({- task: "Search for the top 10 Hacker News posts and return the title and url.",- schema: TaskOutput,-});--const stream = browseruse.tasks.stream({- taskId: task.id,- schema: TaskOutput,-});--for await (const msg of stream) {- switch (msg.status) {- case "started":- console.log(`started: ${msg.data.session.liveUrl}`);- break;- case "paused":- case "stopped":- console.log(`running: ${msg}`);- break;-- case "finished":- console.log(`done:`);-- for (const post of msg.parsedOutput.posts) {- console.log(`${post.title} - ${post.url}`);- }- break;- }-}-```--## Webhook Verification--> We encourage you to use the SDK functions that verify and parse webhook events.--```ts-import {- verifyWebhookEventSignature,- type WebhookAgentTaskStatusUpdatePayload,-} from "browser-use-sdk/lib/webhooks";--export async function POST(req: Request) {- const signature = req.headers["x-browser-use-signature"] as string;- const timestamp = req.headers["x-browser-use-timestamp"] as string;-- const event = await verifyWebhookEventSignature(- {- body,- signature,- timestamp,- },- {- secret: SECRET_KEY,- }- );-- if (!event.ok) {- return;- }-- switch (event.event.type) {- case "agent.task.status_update":- break;- case "test":- break;- default:- break;- }-}-```diff --git a/docs/cloud/v2/python-quickstart.mdx b/docs/cloud/v2/python-quickstart.mdxdeleted file mode 100644index 2a749700e..000000000--- a/docs/cloud/v2/python-quickstart.mdx+++ /dev/null@@ -1,131 +0,0 @@-----title: "Python"-description: "Get started with Browser Use Cloud API using Python"-icon: "python"-mode: "wide"------<img- src="/images/cloud-banner-python.png"- alt="Browser Use Python"- width="full"-/>--> The repository is available on [GitHub](https://github.com/browser-use/browser-use-python).--```sh-pip install browser-use-sdk-```--☝️ Get your API Key at [Browser Use Cloud](https://cloud.browser-use.com/billing)--```python-from browser_use_sdk import BrowserUse--client = BrowserUse(api_key="bu_...")--result = client.tasks.run(- task="Search for the top 10 Hacker News posts and return the title and url."-)--result.done_output-```--> The full API reference can be found in [api.md](https://github.com/browser-use/browser-use-python/blob/main/api.md).--## Async usage--Simply import `AsyncBrowserUse` instead of `BrowserUse` and use `await` with each API call:--```python-import os-import asyncio-from browser_use_sdk import AsyncBrowserUse--client = AsyncBrowserUse(- api_key=os.environ.get("BROWSER_USE_API_KEY"), # This is the default and can be omitted-)---async def main() -> None:- task = await client.tasks.run(- task="Search for the top 10 Hacker News posts and return the title and url.",- )- print(task.done_output)---asyncio.run(main())-```--Functionality between the synchronous and asynchronous clients is otherwise identical.--## Structured Output with Pydantic--Browser Use Python SDK provides first class support for Pydantic models.--```py-class HackerNewsPost(BaseModel):- title: str- url: str--class SearchResult(BaseModel):- posts: List[HackerNewsPost]--async def main() -> None:- structured_result = await client.tasks.run(- task="""- Find top 10 Hacker News articles and return the title and url.- """,- structured_output_json=SearchResult,- )-- if structured_result.parsed_output is not None:- print("Top HackerNews Posts:")- for post in structured_result.parsed_output.posts:- print(f" - {post.title} - {post.url}")--asyncio.run(main())-```--## Streaming Updates with Async Iterators--```py-class HackerNewsPost(BaseModel):- title: str- url: str--class SearchResult(BaseModel):- posts: List[HackerNewsPost]---async def main() -> None:- structured_task = await client.tasks.create(- task="""- Find top 10 Hacker News articles and return the title and url.- """,- structured_output_json=SearchResult,- )-- async for update in client.tasks.stream(structured_task.id, structured_output_json=SearchResult):- if len(update.steps) > 0:- last_step = update.steps[-1]- print(f"{update.status}: {last_step.url} ({last_step.next_goal})")- else:- print(f"{update.status}")-- if update.status == "finished":- if update.parsed_output is None:- print("No output...")- else:- print("Top HackerNews Posts:")- for post in update.parsed_output.posts:- print(f" - {post.title} - {post.url}")-- break--asyncio.run(main())-```--## Advanced--For more advanced usage of the SDK and contributions to the SDK, see [Github repository](https://github.com/browser-use/browser-use-python).diff --git a/docs/cloud/v2/quickstart.mdx b/docs/cloud/v2/quickstart.mdxdeleted file mode 100644index 1f522cc5b..000000000--- a/docs/cloud/v2/quickstart.mdx+++ /dev/null@@ -1,79 +0,0 @@-----title: "Quickstart"-description: "Skip the setup with Browser Use Cloud"-icon: "cloud"-mode: "wide"------<img- className="block dark:hidden rounded-2xl"- src="/images/cloud-banner.png"- alt="Browser Use Cloud Banner"-/>-<img- className="hidden dark:block rounded-2xl"- src="/images/cloud-banner-dark.png"- alt="Browser Use Cloud Banner"-/>--## Get Started--☝️ Get your API Key at [Browser Use Cloud](https://cloud.browser-use.com) then choose your language.--<CardGroup cols={2}>- <Card- title="Python SDK"- icon="python"- href="/cloud/v2/python-quickstart"-->-- Browser Use NPC Mode SDK 🤖-- </Card>- <Card- title="Node.js SDK"- icon="node-js"- href="/cloud/v2/node-quickstart"-->-- Browser Use Wizard Mode SDK 🧙♂️-- </Card>--</CardGroup>--{/* <br /> */}--> To play around with the API, you can use the [Browser Use Cloud Playground](https://cloud.browser-use.com/playground).--## Examples--Explore quick start examples to see how to use the SDKs.--<CardGroup cols={2}>- <Card- title="Python Examples"- icon="python"- href="https://github.com/browser-use/browser-use-examples/tree/main/python"- >- Explore quick start examples for Python.- </Card>--<Card- title="Typescript Examples"- icon="js"- href="https://github.com/browser-use/browser-use-examples/tree/main/typescript"->- Explore quick start examples for Typescript.-</Card>-- <Card- title="NextJS Examples"- icon={<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" className="remixicon text-basis h-8 w-8 text-primary"><path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM15.9999 8H14.6499V12H15.9999V8ZM9.34609 9.70937L15.405 17.5379L16.4591 16.7293L9.68281 8H8V15.9969H9.34609V9.70937Z"></path></svg>}- href="https://github.com/browser-use/browser-use-examples/tree/main/typescript/scrapper"- >- Explore quick start examples for NextJS.- </Card>-</CardGroup>diff --git a/docs/docs.json b/docs/docs.jsonindex ec4bf247f..412a8c426 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -9,10 +9,7 @@},"favicon": "/favicon.ico","contextual": {- "options": [- "copy",- "view"- ]+ "options": ["copy", "view"]},"fonts": {"family": "Geist"@@ -75,11 +72,7 @@"groups": [{"group": "Get Started",- "pages": [- "introduction",- "quickstart",- "quickstart_llm"- ]+ "pages": ["introduction", "quickstart", "quickstart_llm"]},{"group": "Customize",@@ -160,6 +153,7 @@},{"tab": "Cloud",+ "hidden": true,"versions": [{"version": "v1",@@ -187,27 +181,6 @@"openapi": "https://api.browser-use.com/api/v1/openapi.json"}]- },- {- "version": "v2",- "groups": [- {- "group": "Get Started",- "pages": [- "cloud/v2/quickstart",- "cloud/v2/python-quickstart",- "cloud/v2/node-quickstart"- ]- },- {- "group": "Platform",- "pages": [- "cloud/v1/pricing",- "cloud/v1/n8n-browser-use-integration",- "cloud/v1/search"- ]- }- ]}]}@@ -223,11 +196,7 @@"display": "interactive"},"examples": {- "languages": [- "javascript",- "curl",- "python"- ],+ "languages": ["javascript", "curl", "python"],"required": true}},diff --git a/docs/introduction.mdx b/docs/introduction.mdxindex b552a98b6..28e7ceda1 100644--- a/docs/introduction.mdx+++ b/docs/introduction.mdx@@ -20,9 +20,9 @@ icon: "book-open"Open-source Python library.</Card><Card- title="Cloud API"+ title="Cloud Setup"icon="cloud"- href="/cloud/v2/quickstart"+ href="https://docs.cloud.browser-use.com"color="#FE750E">Scale up with our cloud.