Files
wehub-resource-sync 9b395f5cc3
E2E Headed Chrome / e2e-headed (macos-15) (push) Has been cancelled
E2E Headed Chrome / e2e-headed (ubuntu-latest) (push) Has been cancelled
E2E Headed Chrome / e2e-headed (windows-latest) (push) Has been cancelled
CI / build (macos-latest) (push) Has been cancelled
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
CI / unit-test (push) Has been cancelled
CI / bun-test (push) Has been cancelled
CI / adapter-test (push) Has been cancelled
CI / smoke-test (macos-latest) (push) Has been cancelled
CI / smoke-test (ubuntu-latest) (push) Has been cancelled
Security Audit / audit (push) Has been cancelled
Build Chrome Extension / build (push) Has been cancelled
Trigger Website Rebuild (Docs Updated) / dispatch (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:39:48 +08:00

48 lines
1.5 KiB
Markdown

# Brave Search
**Mode**: 🌐 Public · **Domain**: `search.brave.com`
## Commands
| Command | Description |
|---------|-------------|
| `opencli brave search <keyword>` | Search Brave Search and extract results from the page |
## What works today
- Uses browser mode to search `search.brave.com` and extract ranked results via DOM queries.
- Supports `--offset` for GET-based pagination. Brave returns approximately 18 results per page.
- Results include rank, title, URL, and snippet.
- `--limit` must be between 1 and 18; `--offset` must be a non-negative page offset.
## Current limitations
- Requires browser mode. Brave Search does not offer a public, no-auth search API.
- DOM structure uses Svelte-generated class names that may change with updates.
- Some results may have empty snippets depending on Brave's layout.
## Usage Examples
```bash
# Basic search
opencli brave search "machine learning"
# Limit results
opencli brave search "machine learning" --limit 5
# Pagination (second page)
opencli brave search "machine learning" --offset 1
# JSON output
opencli brave search "machine learning" -f json
```
## Prerequisites
- Requires Chrome running (Standalone mode will auto-launch) or the [Browser Bridge extension](/guide/browser-bridge).
## Notes
- Brave Search renders results server-side; all results are present in the initial HTML (no lazy loading).
- Brave also shows an AI-generated summary box as the first result. The adapter filters this out via the `.standalone` class check.