Search
Search Google programmatically and optionally scrape each result page.
Endpoint
POST /v1/search
curl -X POST https://api.browsr.dev/v1/search \
-H "Authorization: Bearer $BROWSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "browsr headless browser API",
"limit": 5,
"formats": ["markdown"]
}'
Request
| Field | Type | Default | Description |
|---|---|---|---|
query | string | required | Search query string |
limit | number | 5 | Max results (max: 20) |
formats | string[] | [] | If non-empty, each result URL is scraped in these formats |
session_id | string | — | Reuse an existing session |
When formats is empty, only search metadata is returned (no page scraping).
Response
{
"success": true,
"data": [
{
"url": "https://browsr.dev",
"title": "Browsr - Headless Browser API",
"description": "Browser automation platform built in Rust...",
"position": 1,
"content": {
"markdown": "# Browsr\n\n...",
"metadata": {
"title": "Browsr",
"sourceURL": "https://browsr.dev",
"status_code": 200
}
}
}
]
}
The content field is only present when formats is non-empty. It contains the scraped data for each result, using the same format as the Scrape response.
Examples
Search only (no scraping)
curl -X POST https://api.browsr.dev/v1/search \
-H "Authorization: Bearer $BROWSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "rust web scraping", "limit": 10}'
Search and scrape results
curl -X POST https://api.browsr.dev/v1/search \
-H "Authorization: Bearer $BROWSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "best headless browser APIs 2025",
"limit": 5,
"formats": ["markdown", "links"]
}'