Skip to main content

REST APIs

Browserless is a cloud-based service for running headless browsers at scale. It provides multiple offerings for different use cases, all using the same cloud infrastructure but accessed in various ways.

Browserless RESTful APIs are a set of ready-made HTTP endpoints for common browser tasks (such as generating PDFs or screenshots, scraping content, etc.). These endpoints let you perform automation via simple HTTP(S) requests without writing a full script. They are great for quick integrations or one-off tasks, although not as flexible for complex flows.

Benefits of REST APIs

  • Simplicity: Interact with browser functionality using simple HTTP requests
  • Language Agnostic: Use any programming language or tool that can make HTTP requests
  • Stateless Operations: No need to maintain browser sessions for simple operations
  • Scalability: Easily integrate browser functionality into your applications at scale
  • Low Overhead: Minimize resource usage for simple browser tasks

When to Use REST APIs

REST APIs are ideal for:

  • Simple, one-off browser operations (screenshots, PDF generation, content extraction)
  • Integrations where maintaining a browser session is unnecessary
  • Applications written in languages without robust browser automation libraries
  • Serverless functions or microservices where simplicity is paramount
  • High-throughput scenarios where connection overhead should be minimized

For more complex automation scenarios, especially those involving bot detection bypass, consider using BrowserQL, which provides a more powerful and flexible approach.

Getting Started

To use the APIs, you need a unique token, created when you sign-up for a Browserless account:

  1. Sign up for a Browserless account (free plan available).
  2. Get your API Key.

Once ready you should use this token anytime you interact with the service.

You can use this token with most of our integrations by simply appending a ?token=YOUR_API_TOKEN_HERE as a query-string parameter.

Global Endpoints

Browserless operates multiple regional endpoints for low-latency access. The primary shared clusters are in US West (SFO), EU West (London), and EU Central (Amsterdam) (Load Balancers). For example:

  • https://production-sfo.browserless.io – San Francisco, USA (default US endpoint)
  • https://production-lon.browserless.io – London, UK (European endpoint)
  • https://production-ams.browserless.io – Amsterdam, NL (another EU endpoint)

You can use the endpoint closest to your servers or users. All endpoints offer the same API and require your token.

Available REST APIs

Browserless has production ready APIs for various browser operations. Each API accepts different parameters and options.

Schemas

The schemas for each endpoint are displayed in the Browserless OpenAPI Documentation.

The Browser APIs help you execute specific tasks for your use-case, and are available for both shared and enterprise users.

  • /content, to return HTML of dynamic content
  • /unblock, to return HTML, screenshots or cookies for protected sites
  • /download, return files Chrome has downloaded
  • /function, run HTTP requests without installing a library
  • /pdf, export a page as a PDF
  • /screenshot, capture a .png or .jpg
  • /scrape, return the structured JSON
  • /export, create self-contained exports of any URL resource for offline access
  • /performance, run parallel Google Lighthouse tests
Bot Detection

For strict bot detectors where browsers and a proxy aren't enough to get past, we would recommend using BrowserQL.

Next Steps

Before exploring all Browserless REST APIs have to offer, learn more about connecting and building an URL for your needs, and all launch parameters available: