Expand description
Browsr Client - HTTP client for browser automation
This crate provides a client for interacting with Browsr servers for browser automation, web scraping, and structured content extraction.
§Quick Start
ⓘ
use browsr_client::{BrowsrClient, BrowsrClientConfig};
use browsr_types::Commands;
// From environment variables
let client = BrowsrClient::from_env();
// Navigate to a page
let response = client.navigate("https://example.com", None).await?;
// Extract structured content
let data = client.extract_structured(
"Extract the main heading and first paragraph",
None,
None,
).await?;§Configuration
The client can be configured via environment variables or programmatically:
BROWSR_BASE_URL: Base URL (defaults tohttps://api.browsr.dev)BROWSR_API_KEY: Optional API key for authentication
Structs§
- Browser
Step Input - Input for browser_step execution (tool parameters).
- Browser
Step Request - Request payload for the /browser_step API.
- Browser
Step Result - Result of browser_step execution.
- Browsr
Client - Browsr HTTP client for browser automation.
- Browsr
Client Config - Configuration for the Browsr client.
- Observe
Options - Options for observing the browser state.
- Session
Created - Response from creating a browser session
Enums§
Constants§
- DEFAULT_
BASE_ URL - Default base URL for the Browsr cloud service
- ENV_
API_ KEY - Environment variable for the API key
- ENV_
BASE_ URL - Environment variable for the base URL
Functions§
- default_
base_ url - Derive a default base URL for HTTP transport from standard env vars.
- default_
transport