# Brave Search

The Brave Search API, from an independent index.

[Brave Search API](https://brave.com/search/api/) queries Brave's own web index.

- Cost is $0.005 per query by default; set yours with `FRANKENSURF_BRAVE_COST_PER_QUERY`.
- Joins after the free sources when paid tools are allowed.
- Skipped until the key is set.

## Set up

Set `FRANKENSURF_BRAVE_API_KEY`.

## Use it

Ask for this source by name. Named sources never fall back to another.

```python
from frankensurf import WebPolicy

results = await web.search("playwright python tutorial", source="brave", policy=WebPolicy(allow_paid_fallbacks=True))
```

```json
{ "tool": "search", "arguments": { "query": "playwright python tutorial", "source": "brave", "acquisition_policy": { "allow_paid_fallbacks": true } } }
```

## Details

| Property | Value |
| --- | --- |
| Source ID | `brave` |
| Cost | Paid |
| Tested | Mocks only |
| Docs | [api-dashboard.search.brave.com/app/documentation](https://api-dashboard.search.brave.com/app/documentation) |
