Skip to main content

REST APIs

Browserless REST APIs provide HTTP endpoints for common browser tasks like screenshots, PDFs, content scraping, file downloads, function execution, and website unblocking. Perform browser automation via simple HTTP requests without managing browser infrastructure.

Quick Start

Scrape a website with a single HTTP request:

  1. Sign Up

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

  2. Get API Token

    Get your API token 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","elements":[{"selector":"h1"}]}'

    Expected response:

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

When to Use REST APIs

Use REST APIs when you need to:

  • Take screenshots or generate PDFs
  • Extract content from simple pages
  • Integrate browser functionality via HTTP
  • Perform one-off tasks without maintaining state
  • Build serverless functions or microservices

For complex multi-step automation or bot detection bypass, use BrowserQL instead.

Key Features

  • Simple Integration: HTTP requests from any language or tool
  • Stateless Operations: No session management required
  • Low Overhead: Minimal resource usage for simple tasks
  • Scalable: Easy integration at any scale

Authentication

All REST API requests require an API token. Include your token as a query parameter:

https://production-sfo.browserless.io/scrape?token=YOUR_API_TOKEN_HERE

Get your API token from the Browserless dashboard.

Bot Detection

For sites with sophisticated bot detection, use BrowserQL which provides advanced stealth capabilities and CAPTCHA solving.

Next Steps