Scrape
Extract content from a single URL. No session management needed — pass a URL, choose your output formats, and get back the data.
Endpoint
POST /v1/scrape
curl -X POST https://api.browsr.dev/v1/scrape \
-H "Authorization: Bearer $BROWSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"formats": ["markdown", "links", "screenshot"]
}'
Request
| Field | Type | Default | Description |
|---|---|---|---|
url | string | required | URL to scrape |
formats | string[] | ["markdown"] | Output formats |
wait_for | number | 0 | ms to wait after page load |
actions | object[] | [] | Pre-scrape actions |
json_options | object | — | AI JSON extraction options |
only_main_content | boolean | true | Strip nav/header/footer |
remove_base64_images | boolean | true | Remove inline base64 images |
Formats
| Format | Description |
|---|---|
markdown | Clean Markdown, optimized for LLMs |
html | Cleaned HTML (scripts removed) |
rawHtml | Raw unmodified HTML |
screenshot | Base64-encoded PNG |
links | Array of {href, text} |
images | Array of {src, alt} |
json | Structured JSON via AI extraction |
summary | AI-generated 2-3 sentence summary |
branding | Colors, fonts, logo, favicon |
Pre-scrape actions
Run actions before extracting content — click cookie banners, fill forms, scroll to load lazy content:
curl -X POST https://api.browsr.dev/v1/scrape \
-H "Authorization: Bearer $BROWSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/products",
"formats": ["markdown"],
"actions": [
{"type": "click", "selector": "#accept-cookies"},
{"type": "wait", "milliseconds": 1000},
{"type": "scroll", "direction": "down", "amount": 3},
{"type": "type", "selector": "#search", "text": "browsr"}
]
}'
JSON extraction
Extract structured data with a natural language prompt and optional schema:
curl -X POST https://api.browsr.dev/v1/scrape \
-H "Authorization: Bearer $BROWSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/pricing",
"formats": ["json"],
"json_options": {
"prompt": "Extract all pricing plans with name, price, and features",
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"price": {"type": "string"},
"features": {"type": "array", "items": {"type": "string"}}
}
}
}
}
}'
Response
{
"success": true,
"data": {
"markdown": "# Page Title\n\nContent...",
"links": [{"href": "https://example.com/about", "text": "About Us"}],
"screenshot": "iVBORw0KGgoAAAANS...",
"metadata": {
"title": "Page Title",
"description": "Meta description",
"sourceURL": "https://example.com",
"status_code": 200
}
}
}
Live session preview
Scrape a URL and watch the browser session in real-time: