Skip to main content

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

FieldTypeDefaultDescription
urlstringrequiredURL to scrape
formatsstring[]["markdown"]Output formats
wait_fornumber0ms to wait after page load
actionsobject[][]Pre-scrape actions
json_optionsobjectAI JSON extraction options
only_main_contentbooleantrueStrip nav/header/footer
remove_base64_imagesbooleantrueRemove inline base64 images

Formats

FormatDescription
markdownClean Markdown, optimized for LLMs
htmlCleaned HTML (scripts removed)
rawHtmlRaw unmodified HTML
screenshotBase64-encoded PNG
linksArray of {href, text}
imagesArray of {src, alt}
jsonStructured JSON via AI extraction
summaryAI-generated 2-3 sentence summary
brandingColors, 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: