Browserless browse

From bidewio/better-openclaw · View interactive version

Browserless browse is an AI agent skill from the GitHub repository bidewio/better-openclaw. Capture screenshots, scrape web content, and generate PDFs using the headless Chrome instance at {{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}}.

How to use this skill

Skill file

Browserless Browse Skill

Headless Chrome (Browserless) is available at http://{{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}} within the Docker network.

Taking a Screenshot

Capture a full-page or viewport screenshot of any URL:

# Viewport screenshot
curl -X POST "http://{{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}}/screenshot" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "options": {
      "type": "png",
      "fullPage": false
    }
  }' \
  -o /data/output/screenshot.png

# Full-page screenshot
curl -X POST "http://{{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}}/screenshot" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "options": {
      "type": "png",
      "fullPage": true
    }
  }' \
  -o /data/output/full_page.png

Generating a PDF

Render a web page to PDF:

curl -X POST "http://{{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}}/pdf" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "options": {
      "format": "A4",
      "printBackground": true,
      "margin": { "top": "1cm", "bottom": "1cm", "left": "1cm", "right": "1cm" }
    }
  }' \
  -o /data/output/page.pdf

Scraping Page Content

Extract text content or HTML from a page:

# Get page content via the /content endpoint
curl -X POST "http://{{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}}/content" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com"
  }'

Running Custom JavaScript

Execute arbitrary JavaScript on a loaded page and retrieve the result:

curl -X POST "http://{{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}}/function" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "module.exports = async ({ page }) => { await page.goto(\"https://example.com\"); const title = await page.title(); const links = await page.$$eval(\"a\", els => els.map(e => ({ text: e.textContent, href: e.href }))); return { title, links }; }"
  }'

Waiting for Dynamic Content

Handle SPAs and dynamic pages by waiting for selectors:

curl -X POST "http://{{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}}/screenshot" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/dashboard",
    "waitForSelector": { "selector": "#main-content", "timeout": 10000 },
    "options": { "type": "png", "fullPage": true }
  }' \
  -o /data/output/dashboard.png

Setting Viewport and User Agent

curl -X POST "http://{{BROWSERLESS_HOST}}:{{BROWSERLESS_PORT}}/screenshot" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "viewport": { "width": 1920, "height": 1080 },
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) OpenClaw/1.0",
    "options": { "type": "png" }
  }' \
  -o /data/output/desktop_view.png

Output Patterns

Tips for AI Agents

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.