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, screenshots, scraping content, downloading files, executing functions, exporting sessions, and unblocking websites).

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 multi-step workflows.

Quick Start

Scrape a site in 30 seconds with a single HTTP request:

  1. Sign Up

    Sign up for a Browserless account (free plan available).

  2. Get API Key

    Get your API Key from the account dashboard.

  3. Run Your First Request

    curl -X POST "https://production-sfo.browserless.io/scrape?token=YOUR_API_TOKEN_HERE" \
    -H "Content-Type: application/json" \
    -d '{"url":"https://example.com"}'

    While the above example uses curl, you can call these REST APIs from any programming language or tool that can make HTTP requests.

  4. Get the Response

    You'll receive a JSON response with the scraped data:

    {
    "data": [
    {
    "title": "Example Domain",
    "description": "Example Domain. This domain is for use in illustrative examples..."
    }
    ]
    }

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 multi-step automation scenarios, especially those involving bot detection bypass, consider using BrowserQL, which provides a more powerful and flexible approach.

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
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 :