For AI agents: a documentation index is available at /llms.txt
Skip to main content

Claude Code Plugin

The Browserless plugin for Claude Code gives Claude direct access to the Browserless REST APIs. It can scrape webpages, take screenshots, generate PDFs, search the web, map site structures, and run custom browser automation, all from natural language.

Prerequisites

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

CommandDescription
/browserless:authInteractive setup — set token and region
/browserless:auth statusCheck if authentication is configured
/browserless:auth clearRemove saved credentials
/browserless:auth regionChange API region without re-entering token

Credentials are stored in ~/.browserless/.env, but the BROWSERLESS_TOKEN environment variable takes precedence if set.

API Regions

RegionURL
SFO (US West, default)https://production-sfo.browserless.io
LON (Europe)https://production-lon.browserless.io
AMS (Amsterdam)https://production-ams.browserless.io
CustomAny 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
SkillCommandDescriptionExample Prompt
Smart Scrape/browserless:smart-scrapeScrape 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:screenshotCapture 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
PDF/browserless:pdfGenerate 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:searchSearch 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:mapDiscover 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:functionExecute 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 in the REST APIs guide.

SkillEndpoint
Smart ScrapePOST /smart-scrape
ScreenshotPOST /screenshot
PDFPOST /pdf
SearchPOST /search
MapPOST /map
FunctionPOST /function

FAQ & Troubleshooting

How do I set or change my API token and region?

Run /browserless:auth inside Claude Code for interactive setup, or /browserless:auth region to change the region without re-entering your token. Credentials are stored in ~/.browserless/.env, unless the BROWSERLESS_TOKEN environment variable is set, which takes precedence.

Which skill should I use to scrape a page?

Use /browserless:smart-scrape for most scraping tasks. It cascades through HTTP fetch, proxy, headless browser, and CAPTCHA solving strategies automatically, returning markdown, HTML, screenshots, PDFs, or links.

How do I run custom automation beyond the built-in skills?

Use /browserless:function to execute custom Puppeteer JavaScript in a cloud browser, for example clicking elements, filling forms, or returning structured data that the other skills don't cover.

Next steps