# steel-browser
**Repository Path**: mirrors/steel-browser
## Basic Information
- **Project Name**: steel-browser
- **Description**: Steel.dev是一个开源浏览器 API,可让你轻松构建与网络交互的 AI 应用和代理
- **Primary Language**: TypeScript
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: https://www.oschina.net/p/steel-browser
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2025-03-13
- **Last Updated**: 2025-12-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
The open-source browser API for AI agents & apps.
The best way to build live web agents and browser automation tools.
## 🛠️ Getting Started
The easiest way to get started with Steel is by creating a [Steel Cloud](https://app.steel.dev) 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 (combined API + UI) | [](https://github.com/steel-dev/steel-browser/pkgs/container/steel-browser) |
| 1-click deploy to Railway | [](https://railway.app/deploy/steelbrowser) |
| 1-click deploy to Render | [](https://render.com/deploy) |
## 💻 Running Locally
### Docker
The simplest way to deploy/run a Steel browser instance locally is to run the pre-built Docker image:
```bash
# Pull and run the Docker image
docker run -p 3000:3000 -p 9223:9223 ghcr.io/steel-dev/steel-browser
```
This will start the Steel browser server on port 3000 (http://localhost:3000) and the UI at http://localhost:3000/ui. The 9223 port is used for the console debugger.
You can now create sessions, scrape pages, take screenshots, and more. Jump to the [Usage](#usage) section for some quick examples on how you can do that.
Alternatively, you can run the API and UI separately with docker compose:
```bash
docker compose up
```
For Mac Silicon users, you will need to pass this env flag to the Docker compose command to run the images on the correct platform:
```bash
DOCKER_DEFAULT_PLATFORM=linux/arm64 docker compose up
```
## Quickstart for Contributors
When developing locally, you will need to run the [`docker-compose.dev.yml`](./docker-compose.dev.yml) file instead of the default [`docker-compose.yml`](./docker-compose.yml) file so that your local changes are reflected. Doing this will build the Docker images from the [`api`](./api) and [`ui`](./ui) directories and run the server and UI on port 3000 and 5173 respectively.
```bash
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:
```bash
docker compose -f docker-compose.dev.yml up --build
```
If you run on a custom host, create a `.env` file (see `docs/DEVELOPMENT_SETUP.md` for variables) or modify the environment variables used by `docker-compose.dev.yml` to use your host.
### Node.js
Alternatively, if you have Node.js and Chrome installed, you can run both the server and the UI directly:
```bash
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:
```bash
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`](./api/src/utils/browser.ts).
## 🏄🏽♂️ Usage
> If you're looking for quick examples on how to use Steel, check out the [Cookbook](https://github.com/steel-dev/steel-cookbook).
>
> Alternatively you can play with the [REPL package](./repl/README.md) too `cd repl` and `npm run start`
There are two main ways to interact with the Steel browser API:
1. [Using Sessions](#sessions)
2. [Using the Quick Actions Endpoints](#quick-actions-api)
In these examples, we assume your custom Steel API endpoint is `http://localhost:3000`.
The full REST OpenAPI documentation can be found [on our site](https://docs.steel.dev/api-reference) and on your local Steel instance at `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](https://github.com/steel-dev/steel-node/blob/main/api.md) and the [Python SDK Reference](https://github.com/steel-dev/steel-python/blob/main/api.md).
### 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:
* [Puppeteer Integration](https://docs.steel.dev/overview/guides/connect-with-puppeteer)
* [Playwright with Node](https://docs.steel.dev/overview/guides/connect-with-playwright-node)
* [Playwright with Python](https://docs.steel.dev/overview/guides/connect-with-playwright-python)