xiaohongshu
xiaohongshu
browserless
Browserless cloud browser automation service. Run headless Chrome at scale for scraping, screenshots, and PDF generation. Use for cloud browser automation, scalable scraping, or headless Chrome as a service. Triggers on browserless, headless chrome, browser service, cloud scraping, screenshot api...
Full skill instructions
Complete guide for Browserless - headless Chrome as a service.
| Feature | Description |
|---|---|
| REST API | HTTP endpoints for screenshots, PDFs, scraping |
| WebSocket | Puppeteer/Playwright connection |
| Screenshots | Page captures at scale |
| Document generation | |
| Scraping | Data extraction |
| Functions | Custom script execution |
/screenshot - Capture screenshots
/pdf - Generate PDFs
/content - Get page HTML
/scrape - Extract data
/function - Run custom code
docker run -d \
-p 3000:3000 \
-e "TOKEN=your-token" \
-e "CONCURRENT=10" \
-e "QUEUED=10" \
--name browserless \
ghcr.io/browserless/chromium
services:
browserless:
image: ghcr.io/browserless/chromium
ports:
- "3000:3000"
environment:
- TOKEN=your-secure-token
- CONCURRENT=10
- QUEUED=50
- TIMEOUT=60000
- MAX_PAYLOAD_SIZE=5mb
- HEALTH_CHECK=true
restart: unless-stopped
deploy:
resources:
limits:
memory: 4G
Sign up at browserless.io
Get API token
Use: wss://chrome.browserless.io?token=YOUR_TOKEN
# Basic screenshot
curl -X POST "http://localhost:3000/screenshot?token=your-token" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' \
-o screenshot.png
# With options
curl -X POST "http://localhost:3000/screenshot?token=your-token" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"options": {
"fullPage": true,
"type": "png",
"quality": 80
},
"viewport": {
"width": 1920,
"height": 1080
},
"waitForSelector": "#content"
}' \
-o screenshot.png
curl -X POST "http://localhost:3000/pdf?token=your-token" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"options": {
"format": "A4",
"printBackground": true,
"margin": {
"top": "1cm",
"right": "1cm",
"bottom": "1cm",
"left": "1cm"
}
}
}' \
-o document.pdf
curl -X POST "http://localhost:3000/scrape?token=your-token" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"elements": [
{"selector": "h1", "name": "title"},
{"selector": ".price", "name": "price"},
{"selector": "img", "name": "images", "attr": "src"}
]
}'
const puppeteer = require("puppeteer");
(async () => {
const browser = await puppeteer.connect({
browserWSEndpoint: "ws://localhost:3000?token=your-token",
});
const page = await browser.newPage();
await page.goto("https://example.com");
const title = await page.title();
console.log("Title:", title);
await browser.close();
})();
const { chromium } = require("playwright");
(async () => {
const browser = await chromium.connectOverCDP(
"ws://localhost:3000?token=your-token"
);
const context = await browser.newContext();
const page = await context.newPage();
await page.goto("https://example.com");
const title = await page.title();
console.log("Title:", title);
await browser.close();
})();
async function takeScreenshot(url) {
const response = await fetch(
"http://localhost:3000/screenshot?token=your-token",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
url,
options: { fullPage: true },
}),
}
);
return Buffer.from(await response.arrayBuffer());
}
async function scrapeData(url, elements) {
const response = await fetch(
"http://localhost:3000/scrape?token=your-token",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url, elements }),
}
);
return await response.json();
}
from playwright.async_api import async_playwright
import asyncio
async def main():
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp(
'ws://localhost:3000?token=your-token'
)
page = await browser.new_page()
await page.goto('https://example.com')
title = await page.title()
print(f'Title: {title}')
await browser.close()
asyncio.run(main())
import requests
def screenshot(url, options=None):
response = requests.post(
'http://localhost:3000/screenshot',
params={'token': 'your-token'},
json={
'url': url,
'options': options or {'fullPage': True}
}
)
return response.content
def scrape(url, elements):
response = requests.post(
'http://localhost:3000/scrape',
params={'token': 'your-token'},
json={'url': url, 'elements': elements}
)
return response.json()
# Usage
screenshot_data = screenshot('https://example.com')
with open('screenshot.png', 'wb') as f:
f.write(screenshot_data)
// POST /function
{
"code": `
export default async ({ page }) => {
await page.goto('https://example.com');
await page.waitForSelector('.loaded');
const data = await page.evaluate(() => {
return {
title: document.title,
items: Array.from(document.querySelectorAll('.item'))
.map(el => ({
name: el.querySelector('.name').textContent,
price: el.querySelector('.price').textContent
}))
};
});
return { data, type: 'application/json' };
}
`
}
{
"url": "https://example.com",
"viewport": {
"width": 375,
"height": 812,
"deviceScaleFactor": 2,
"isMobile": true,
"hasTouch": true
}
}
{
"url": "https://example.com",
"waitForSelector": "#content",
"waitForTimeout": 2000,
"waitForEvent": "networkidle0",
"waitForFunction": "window.loaded === true"
}
{
"url": "https://example.com",
"authenticate": {
"username": "user",
"password": "pass"
},
"cookies": [
{
"name": "session",
"value": "abc123",
"domain": "example.com"
}
]
}
services:
browserless:
image: ghcr.io/browserless/chromium
ports:
- "3000:3000"
environment:
- TOKEN=your-secure-token
- CONCURRENT=10
- QUEUED=50
- TIMEOUT=60000
- CONNECTION_TIMEOUT=30000
- MAX_PAYLOAD_SIZE=10mb
- ENABLE_CORS=true
- HEALTH_CHECK=true
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
deploy:
resources:
limits:
cpus: "2"
memory: 4G
# Health check
curl http://localhost:3000/
# Queue stats
curl http://localhost:3000/stats
# Prometheus metrics
curl http://localhost:3000/metrics
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience