brave

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package brave is web search on the Brave Search API: its own index of the web, $5 per 1,000 searches with $5 free each month (checked 2026-09-26). The default search adapter for the web_search built-in tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebSearch

type WebSearch struct {
	APIKey string
	// Country is the two-letter country the results are for, like "us".
	Country string
	// SearchLang is the language of the results, like "en".
	SearchLang string
	BaseURL    string
	HTTP       *http.Client
}

WebSearch is a ports.Search on Brave.

func New

func New(apiKey string) (*WebSearch, error)

New is a Brave search with an API key.

func (*WebSearch) Name

func (b *WebSearch) Name() string

func (*WebSearch) Search

func (b *WebSearch) Search(ctx context.Context, query string, opts ports.SearchOptions) ([]ports.SearchHit, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL