Claude Code Plugin
The Browserless plugin for Claude Code gives Claude direct access to the Browserless REST APIs: scrape webpages, take screenshots, generate PDFs, search the web, map site structures, and run custom browser automation — all from natural language.
Prerequisites
- An active Browserless API token (available in your account dashboard)
- Claude Code installed
Installation
Install the plugin in Claude Code:
Clone the repo and point Claude Code at the plugin directory:
git clone https://github.com/browserless/claude-plugin.git
cd claude-plugin
claude --plugin-dir .
Authentication
Run the auth skill inside Claude Code:
/browserless:auth
This prompts you for your token and preferred API region (SFO, LON, or a custom URL for private deployments), then saves the credentials to ~/.browserless/.env.
Alternatively, set the environment variable directly:
# On Windows:
# set BROWSERLESS_TOKEN=your-token-here
export BROWSERLESS_TOKEN=your-token-here
Auth Management
| Command | Description |
|---|---|
/browserless:auth | Interactive setup — set token and region |
/browserless:auth status | Check if authentication is configured |
/browserless:auth clear | Remove saved credentials |
/browserless:auth region | Change API region without re-entering token |
Credentials are stored in ~/.browserless/.env, but the BROWSERLESS_TOKEN environment variable takes precedence if set.
API Regions
| Region | URL |
|---|---|
| SFO (US West, default) | https://production-sfo.browserless.io |
| LON (Europe) | https://production-lon.browserless.io |
| AMS (Amsterdam) | https://production-ams.browserless.io |
| Custom | Any self-hosted or custom Browserless URL |
Skills
Once authenticated, all skills are available as slash commands:
/browserless:smart-scrape https://example.com
/browserless:screenshot https://example.com
/browserless:pdf https://example.com
/browserless:search what is browserless
/browserless:map https://example.com
/browserless:function click the login button on https://example.com
| Skill | Command | Description | Example Prompt |
|---|---|---|---|
| Smart Scrape | /browserless:smart-scrape | Scrape webpages with cascading strategies (HTTP fetch, proxy, headless browser, captcha solving). Returns markdown, HTML, screenshots, PDFs, or links. | summarize the main content of https://news.ycombinator.com |
| Screenshot | /browserless:screenshot | Capture screenshots of webpages. Supports full-page, element-specific, viewport sizing, image formats (PNG/JPEG/WebP), and proxy/geo-targeting. | take a screenshot of https://inet-ip.info/ using a French proxy, wait 5 seconds before taking it |
/browserless:pdf | Generate PDFs from webpages or HTML. Supports paper formats, margins, headers/footers, landscape, background graphics, and tagged/accessible PDFs. | save https://en.wikipedia.org/wiki/Headless_browser as a landscape A4 PDF | |
| Search | /browserless:search | Search the web and optionally scrape result pages. Supports web, news, and image sources with time-based filtering and content categories. | find recent AI news en español from the last week |
| Map | /browserless:map | Discover and list all URLs on a website. Crawls sitemaps, pages, and subdomains with relevance-based search filtering. | save a list of all URLs on https://browserless.io in json format |
| Function | /browserless:function | Execute custom Puppeteer JavaScript in a cloud browser. Run arbitrary automation scripts, interact with page elements, fill forms, and return structured data. | go to https://news.ycombinator.com and return the top 10 story titles as JSON |
API Reference
Each skill maps to a Browserless REST API endpoint. Full API documentation is available at docs.browserless.io/rest-apis/intro.
| Skill | Endpoint |
|---|---|
| Smart Scrape | POST /smart-scrape |
| Screenshot | POST /screenshot |
POST /pdf | |
| Search | POST /search |
| Map | POST /map |
| Function | POST /function |
Further Reading
- Browserless Account Dashboard - Get your API token
- REST APIs — Direct REST API access
- AI Integrations — Other AI platform integrations