Skip to content

Add direct API examples for Browser Use Cloud custom proxy#4

Draft
MagMueller wants to merge 1 commit intomainfrom
cursor/direct-api-examples-010a
Draft

Add direct API examples for Browser Use Cloud custom proxy#4
MagMueller wants to merge 1 commit intomainfrom
cursor/direct-api-examples-010a

Conversation

@MagMueller
Copy link
Copy Markdown

@MagMueller MagMueller commented Mar 30, 2026

Summary

Adds examples for calling the Browser Use Cloud API directly without using the SDK, as requested by Aitor. These examples demonstrate how to create browser sessions with custom proxy support.

New Files

  • examples/direct-api/custom_proxy.sh - curl/bash script
  • examples/direct-api/custom_proxy.py - Python with requests (no SDK)
  • examples/direct-api/custom_proxy.ts - TypeScript with fetch (no SDK)
  • examples/direct-api/README.md - Documentation for direct API examples

Features

All examples support:

  • Environment variable configuration (BROWSER_USE_API_KEY, PROXY_HOST, PROXY_PORT)
  • Optional proxy authentication (PROXY_USERNAME, PROXY_PASSWORD)
  • Creating browser sessions routed through custom HTTP or SOCKS5 proxies

Changes

  • Updated main README.md to reference the new direct API examples

Related

Slack Thread

Open in Web Open in Cursor 

Summary by cubic

Adds direct API examples for creating Browser Use Cloud sessions through a custom proxy without the SDK. Includes curl, Python, and TypeScript examples and a README link.

  • New Features
    • Added examples/direct-api/ with custom_proxy.sh, custom_proxy.py, and custom_proxy.ts.
    • Supports env vars: BROWSER_USE_API_KEY, PROXY_HOST, PROXY_PORT, optional PROXY_USERNAME, PROXY_PASSWORD.
    • Works with HTTP or SOCKS5 proxies and returns cdpUrl and liveUrl.
    • Updated main README to reference the new direct API examples.

Written for commit 481d391. Summary will update on new commits.

Add examples showing how to call the Browser Use Cloud API directly
without using the SDK:

- examples/direct-api/custom_proxy.sh - curl/bash script
- examples/direct-api/custom_proxy.py - Python with requests
- examples/direct-api/custom_proxy.ts - TypeScript with fetch

All examples demonstrate creating a browser session with a custom
HTTP or SOCKS5 proxy, supporting environment variable configuration
for proxy host, port, and optional authentication.

Addresses request from Aitor for curl & other language examples
beyond the SDK.

Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants