Skip to content

Latest commit

 

History

History
83 lines (58 loc) · 1.87 KB

File metadata and controls

83 lines (58 loc) · 1.87 KB

nobrowser

A headless browser microservice that renders web pages and returns screenshots, HTML, and Markdown via a simple HTTP API. Built with Go and Rod (Chromium automation).

What it does

Send a URL, get back:

  • A full-page screenshot (base64-encoded PNG)
  • The fully rendered HTML of the page
  • Optionally, the page content converted to Markdown

Useful for scraping JS-heavy pages, generating previews, or extracting content from sites that require JavaScript to render.

Endpoints

POST /browse

Render a URL and capture its content.

Request:

{
  "url": "https://example.com",
  "wait_time_seconds": 5,
  "format": "markdown"
}
Field Type Required Description
url string yes URL to render
wait_time_seconds number no Seconds to wait after page load (default: 5, max: 30)
format string no Set to "markdown" to include Markdown in the response

Response:

{
  "image_base64": "iVBORw0KGgoAAAAN...",
  "html_text": "<html>...</html>",
  "markdown": "# Example Domain\n...",
  "url": "https://example.com",
  "error": "...",
  "processed_at": "2026-03-25T17:30:45Z"
}

GET /health

Returns browser health status and request count.

GET /stats

Returns browser pool statistics.

GET /

Interactive test UI for manual use.

Running

Docker (recommended)

docker build -t nobrowser .
docker run -p 8080:8080 nobrowser

Local

Requires Go 1.24+ and Chromium installed on your system.

go run main.go

Server starts on http://localhost:8080.

Tech stack

  • Go 1.24
  • go-rod — Chromium browser automation
  • html-to-markdown — HTML to Markdown conversion
  • Chromium + Xvfb (in Docker)