Skip to content

πŸ”₯ Open Source Browser API for AI Agents & Apps. Steel Browser is a batteries-included browser instance that lets you automate the web without worrying about infrastructure.

License

Notifications You must be signed in to change notification settings

steel-dev/steel-browser

Repository files navigation


Steel Logo

Steel

The open-source browser API for AI agents & apps.
The best way to build live web agents and browser automation tools.

Commit Activity License Discord Twitter Follow GitHub stars

Steel Demo

✨ Highlights

Steel.dev is an open-source browser API that makes it easy to build AI apps and agents that interact with the web. Instead of building automation infrastructure from scratch, you can focus on your AI application while Steel handles the complexity.

This repo is the core building block behind Steel - a production-ready, containerized browser sandbox that you can deploy anywhere. It includes built-in stealth capabilities, text-to-markdown, session management, a web UI to view/debug sessions, and full browser control through standard automation frameworks like Puppeteer, Playwright, and Selenium.

Under the hood, it manages sessions, pages, and browser processes, allowing you to perform complex browsing tasks programmatically without any of the headaches:

  • Full Browser Control: Uses Puppeteer and CDP for complete control over Chrome instances -- allowing you to connect using Puppeteer, Playwright, or Selenium.
  • Session Management: Maintains browser state, cookies, and local storage across requests
  • Proxy Support: Built-in proxy chain management for IP rotation
  • Extension Support: Load custom Chrome extensions for enhanced functionality
  • Debugging Tools: Built-in request logging and session recording capabilities
  • Anti-Detection: Includes stealth plugins and fingerprint management
  • Resource Management: Automatic cleanup and browser lifecycle management
  • Browser Tools: Exposes APIs to quick convert pages to markdown, readability, screenshots, or PDFs.

For detailed API documentation and examples, check out our API reference or explore the Swagger UI directly at http://0.0.0.0:3000/documentation.

Steel is in public beta and evolving every day. Your suggestions, ideas, and reported bugs help us immensely. Do not hesitate to join in the conversation on Discord or raise a GitHub issue. We read everything, respond to most, and love you.

If you love open-source, AI, and dev tools, we're hiring across the stack!

Make sure to give us a star ⭐

Start us on Github!

πŸ› οΈ Getting Started

The easiest way to get started with Steel is by creating a Steel Cloud account. Otherwise, you can deploy this Steel browser instance to a cloud provider or run it locally.

⚑ Quick Deploy

If you're looking to deploy to a cloud provider, we've got you covered.

Deployment methods Link
Pre-built Docker Image (API only) Deploy with Github Container Redistry
1-click deploy to Railway Deploy on Railway
1-click deploy to Render Deploy to Render

πŸ’» Running Locally

Docker

The simplest way to run a Steel browser instance locally is to run the pre-built Docker images:

# Clone and build the Docker image
git clone https://github.com/steel-dev/steel-browser
cd steel-browser
docker compose up

This will start the Steel server on port 3000 (http://localhost:3000) and the UI on port 5173 (http://localhost:5173).

You can now create sessions, scrape pages, take screenshots, and more. Jump to the Usage section for some quick examples on how you can do that.

Quickstart for Contributors

When developing locally, you will need to run the docker-compose.dev.yml file instead of the default docker-compose.yml file so that your local changes are reflected. Doing this will build the Docker images from the api and ui directories and run the server and UI on port 3000 and 5173 respectively.

docker compose -f docker-compose.dev.yml up

You will also need to run it with --build to ensure the Docker images are re-built every time you make changes:

docker compose -f docker-compose.dev.yml up --build

In case you run on a custom host, you need to copy .env.example to .env while changing the host or modify the environment variables used by the docker-compose.dev.yml to use your host.

Node.js

Alternatively, if you have Node.js and Chrome installed, you can run the server directly:

npm install
npm run dev

This will also start the Steel server on port 3000 and the UI on port 5173.

Make sure you have the Chrome executable installed and in one of these paths:

  • Linux: /usr/bin/google-chrome

  • MacOS: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

  • Windows:

    • C:\Program Files\Google\Chrome\Application\chrome.exe OR
    • C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

Custom Chrome Executable

If you have a custom Chrome executable or a different path, you can set the CHROME_EXECUTABLE_PATH environment variable to the path of your Chrome executable:

export CHROME_EXECUTABLE_PATH=/path/to/your/chrome
npm run dev

For more details on where this is checked look at api/src/utils/browser.ts.

πŸ„πŸ½β€β™‚οΈ Usage

If you're looking for quick examples on how to use Steel, check out the Cookbook.

Alternatively you can play with the REPL package too cd repl and npm run start

There are two main ways to interact with the Steel browser API:

  1. Using Sessions
  2. Using the Quick Actions Endpoints

In these examples, we assume your custom Steel API endpoint is http://localhost:3000.

The full REST API documentation can be found on your Steel instance at /documentation (e.g., http://localhost:3000/documentation).

Using the SDKs

If you prefer to use the our Python and Node SDKs, you can install the steel-sdk package for Node or Python.

These SDKs are built on top of the REST API and provide a more convenient way to interact with the Steel browser API. They are fully typed, and are compatible with both Steel Cloud and self-hosted Steel instances (changeable using the baseUrl option on Node and base_url on Python).

For more details on installing and using the SDKs, please see the Node SDK Reference and the Python SDK Reference.

Sessions

The /sessions endpoint lets you relaunch the browser with custom options or extensions (e.g. with a custom proxy) and also reset the browser state. Perfect for complex, stateful workflows that need fine-grained control.

Once you have a session, you can use the session ID or the root URL to interact with the browser. To do this, you will need to use Puppeteer or Playwright. You can find some examples of how to use Puppeteer and Playwright with Steel in the docs below:

Creating a Session using the Node SDK
import Steel from 'steel-sdk';

const client = new Steel({
  baseUrl: "http://localhost:3000", // Custom API Base URL override
});

(async () => {
  try {
    // Create a new browser session with custom options
    const session = await client.sessions.create({
      sessionTimeout: 1800000, // 30 minutes
      blockAds: true,
    });
    console.log("Created session with ID:", session.id);
  } catch (error) {
    console.error("Error creating session:", error);
  }
})();
Creating a Session using the Python SDK
import os
from steel import Steel

client = Steel(
    base_url="http://localhost:3000",  # Custom API Base URL override
)

try:
    # Create a new browser session with custom options
    session = client.sessions.create(
        session_timeout=1800000,  # 30 minutes
        block_ads=True,
    )
    print("Created session with ID:", session.id)
except Exception as e:
    print("Error creating session:", e)
Creating a Session using Curl
# Launch a new browser session
curl -X POST http://localhost:3000/v1/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "options": {
      "proxy": "user:pass@host:port",
      // Custom launch options
    }
  }'

Selenium Sessions

Note: This integration does not support all the features of the CDP-based browser sessions API.

For teams with existing Selenium workflows, the Steel browser provides a drop-in replacement that adds enhanced features while maintaining compatibility. You can simply use the isSelenium option to create a Selenium session:

// Using the Node SDK
const session = await client.sessions.create({ isSelenium: true });
# Using the Python SDK
session = client.sessions.create(is_selenium=True)
Using Curl
# Launch a Selenium session
curl -X POST http://localhost:3000/v1/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "options": {
      "isSelenium": true,
      // Selenium-compatible options
    }
  }'

The Selenium API is fully compatible with Selenium's WebDriver protocol, so you can use any existing Selenium clients to connect to the Steel browser. For more details on using Selenium with Steel, refer to the Selenium Docs.

Quick Actions API

The /scrape, /screenshot, and /pdf endpoints let you quickly extract clean, well-formatted data from any webpage using the running Steel server. Ideal for simple, read-only, on-demand jobs:

Scrape a Web Page

Extract the HTML content of a web page.

# Example using the Actions API
curl -X POST http://0.0.0.0:3000/v1/scrape \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "waitFor": 1000
  }'
Take a Screenshot

Take a screenshot of a web page.

# Example using the Actions API
curl -X POST http://0.0.0.0:3000/v1/screenshot \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "fullPage": true
  }' --output screenshot.png
Download a PDF

Download a PDF of a web page.

# Example using the Actions API
curl -X POST http://0.0.0.0:3000/v1/pdf \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "fullPage": true
  }' --output output.pdf

Get involved

Steel browser is an open-source project, and we welcome contributions!

  • Questions/ideas/feedback? Come hangout on Discord
  • Found a bug? Open an issue on GitHub

License

Apache 2.0


Made with ❀️ by the Steel team.