CLI
Install the BrowserSolver CLI SDK and make your first API call.
The official BrowserSolver command-line interface, with one command per endpoint.
Requirements
- Node.js 20+
Install
npm install --global @browsersolver/cli
browsersolver --helpnpx @browsersolver/cli --helpGet your API key
Copy your API key from the BrowserSolver dashboard and set it in the BROWSERSOLVER_API_KEY environment variable, which the SDK reads by default. Keep it out of source control.
export BROWSERSOLVER_API_KEY="YOUR_API_KEY"$env:BROWSERSOLVER_API_KEY = "YOUR_API_KEY"Usage
browsersolver website-webunlocker --query https://example.combrowsersolver website-webunlocker --help # parameters of one command
browsersolver endpoints # every command and its HTTP path
browsersolver endpoints search # filter the listbrowsersolver website-screenshot --url https://example.com --format png -o screenshot.pngecho '{"query": "https://example.com"}' | browsersolver website-webunlocker --params -
browsersolver website-webunlocker --params params.json --compactbrowsersolver request get /v1/usage
browsersolver request post /v1/some/new/endpoint --params body.jsonbrowsersolver website-webunlocker --query https://example.com | jq .Exit codes
0: success1: API or network failure2: invalid usage, such as an unknown command, a missing API key or a missing parameter
Links
- Package:
@browsersolver/cli - Source code: github.com/browsersolver/browsersolver-cli
- API reference