Browser Configuration
BrowserCat offers full control over your browser instances using just a handful of configuration options. Whether you’re using Playwright, Puppeteer, or any other CDP client, you’ll have an easy time tweaking your browser to your needs.
You have two options for configuring your browser:
BrowserCat-Opts
header: This API provides you with full control over your browser instance, supporting all configuration options.- Query parameters: While not as fully-featured as the header syntax, you can use query parameters to quickly set the most common configuration options.
Deep docs…
Jump to the full documentation for specific configuration options:
- Browser Region
- Browser Selection
- Headless/Headed Mode
- CLI Launch Args
- User Preferences
- Third-Party Proxies
Query parameters
The query parameters are a subset of the BrowserCat-Opts
header. You can use them to set the most common configuration options:
interface BrowserCatOptsParams {
// Set the region for your browser instance
region?: string
// Manually select your browser. Typically only necessary when working with userland `chrome`
browser?: 'chrome' | 'chromium' | 'firefox' | 'webkit'
// Configures headed/headless mode.
// Playwright defaults to "old"
// Puppeteer (and others) default to "new"
headless?: 'new' | 'old' | boolean
}
BrowserCat-Opts
header
The BrowserCat-Opts
header receives a JSON object with the following shape:
interface BrowserCatHeaders {
// Authenticate your requests...
'Api-Key': string;
// JSON `BrowserCatOptsHeader` object
'BrowserCat-Opts': string;
}
interface BrowserCatOptsHeader {
// Set the region for your browser instance
region?: string
// Manually select your browser. Typically only necessary when working with userland `chrome`
browser?: 'chrome' | 'chromium' | 'firefox' | 'webkit'
// Configures headed/headless mode.
// Playwright defaults to "old"
// Puppeteer (and others) default to "new"
headless?: 'new' | 'old' | boolean
// Set additional CLI args for browser launch
enableArgs?: string[]
// Disable default CLI args for browser launch. Use `true` to disable all defaults.
disableArgs?: string[] | boolean
// Set browser features flags
// E.G. Chrome'- `about://flags` or Firefox's `about:config`
userPrefs?: Record<string, string | number | boolean>
// Set the proxy server for your browser instance
proxy?: {
server: string
username?: string
password?: string
bypass?: string
}
}