Skip to main content
Headless browser APIs

Headless Browser APIs for Any Output You Need

Browserless gives you a production-grade headless browser API for screenshots, PDFs, scraping, file downloads, and performance audits, with no browser library to install and no browser infrastructure to run.

Works withcURLNode.jsPythonPHPRubyGoAny HTTP client

8 years in production175M+ Docker pulls13K GitHub starsSOC 2 Type II

Headless browser APIs for every browser task

Each endpoint below launches a managed cloud browser, runs your request, and returns clean output, so you never spin up a Chrome instance yourself. If you need to search the web or see every endpoint with its parameters, check the full REST API list.

Rendering and extraction

/content

Fully rendered HTML

Returns the complete DOM after JavaScript has executed, essential for SPAs and web pages where content loads dynamically.

See the docs →

/scrape

Structured data via CSS selectors

Pass an array of CSS selectors and get back clean, structured JSON. Great when you know which elements you need.

See the docs →

/unblock

Bot detection bypass

Gets past CAPTCHAs and bot detection in a real browser, then returns the page content, cookies, a screenshot, or a live browserWSEndpoint. Works best with residential proxies.

See the docs →

Files and captures

/pdf

PDF generation from URL or HTML

Renders dynamic pages or raw HTML to PDF with Puppeteer-style options for page size, margins, headers, footers, and backgrounds. Ideal for dashboard exports and automated reports.

See the docs →

/screenshot

Full-page screenshots

Captures PNG, JPEG, or WebP with support for custom viewports, full-page mode, and raw HTML input.

See the docs →

/export

Native content streaming

Fetches a URL and streams it in its original content type, with an option to bundle all page resources into a ZIP archive.

See the docs →

/download

Browser-triggered file retrieval

Executes your code in a managed browser session, intercepts any triggered downloads, returning the files in the API response.

See the docs →

Custom scripts and audits

/function

Custom output via Puppeteer over HTTP

Execute arbitrary Puppeteer scripts server-side and return any content type you need from any language with an HTTP client – no Node.js environment required.

See the docs →

/performance

Lighthouse audits at scale

Run parallel Google Lighthouse tests and get back SEO, accessibility, and performance scores from JS-enabled cloud browsers.

See the docs →

Not every page needs a browser

If you’d rather start with a fast HTTP fetch and only bring in a headless browser when a page demands it, Smart Scrape does that automatically.

Learn more about Smart Scrape

What is a headless browser API?

With a headless browser API, you send an HTTP request and get back what a real browser would produce – rendered HTML, a screenshot, a PDF or structured data – without running the browser yourself. Browserless launches Chrome, loads your page, completes the task, and returns the result.

Quickstart

How the headless browser API works

There's no Chrome to install and no browser fleet to keep running. Each request runs in a fresh headless browser on Browserless, which closes as soon as your output is ready.

1

Get your API token

Sign up for the free plan, with no credit card needed, and copy your API token from the account dashboard.

2

Send a POST request

Pick the endpoint for the job, such as /screenshot or /pdf, and send the URL and your options as JSON. Add your token as a query parameter. Any HTTP client works, including curl and Python’s requests.

3

Get your output back

Browserless loads the page, completes the task, and returns the result as an image, a PDF, rendered HTML, or JSON, depending on the endpoint.

The example below uses the San Francisco endpoint (production-sfo). For London or Amsterdam, swap the hostname for production-lon or production-ams – pick the region closest to your target sites. Here’s a full-page screenshot of example.com in a single request:

cURL · /screenshot

curl -X POST "https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "options": {"fullPage": true}}' \
  --output example.png
Browser automation

Combine APIs to automate browser tasks at scale

Each endpoint gives you a managed Chrome instance on demand, so you can chain them into document pipelines, CI checks, or archiving jobs. Here's how they work together.

/performance + /screenshot

Audit every release from CI

Run /performance against key pages after each deploy to catch Lighthouse regressions, and capture /screenshot images of the same pages so you can see what changed.

/export + /content

Archive pages and index them

Use /export with includeResources to bundle a page and its assets into a ZIP for your records, and /content to pull the rendered HTML into your search index.

/pdf + /screenshot

Generate reports and visual assets at scale

Render dashboards, invoices, and data exports as pixel-perfect PDFs or screenshots. Pass raw HTML for fully dynamic output, or a URL for live-page capture with custom styling options.

/unblock + Puppeteer or Playwright

Get past the bot check, then take over the browser

Call /unblock with browserWSEndpoint: true, cookies: true, and a ttl of up to 60 seconds. It loads the protected page and returns a live browserWSEndpoint with its cookies, so your own Puppeteer or Playwright script can connect and carry on from there.

Web scraping

Extract exactly what you need, at any scale

Whether you need the whole rendered page or a few specific elements, these endpoints run a real browser for every request, so JavaScript-heavy pages load the same way they do for your users.

AI headless browser

Wire your AI assistant into hosted browser automation

The Browserless MCP server enables Claude Desktop, Cursor, VS Code, Windsurf, or any MCP-compatible client to scrape, search, map, crawl, export, audit performance, and run custom Puppeteer code against the same hosted infrastructure behind the REST APIs – no code, and no token to copy if your client supports OAuth.

01

AI-driven competitive research

Point your agent at competitor URLs. It scrapes each page through /smart-scrape, pulls out the content you ask for, and returns a summary.

02

Automated Lighthouse auditing pipelines

Ask your agent to run /performance across your key pages, flag regressions, and build a PDF report with a short Puppeteer script through /function, all from a single instruction.

03

Let your assistant drive a live browser

With Browserless Agent, your own model reads page snapshots, plans its next step, and drives the browser itself, so it can handle tasks no fixed endpoint covers.

Headless browser API FAQs

Headless browser API FAQs

Stop managing browsers and start automating

Browserless handles the infrastructure so you can focus on what you're actually building.