websearch

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderBrave = "brave"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultItem

type ResultItem struct {
	Title   string `json:"title"`
	URL     string `json:"url"`
	Snippet string `json:"snippet,omitempty"`
}

type SearchRequest

type SearchRequest struct {
	Query string
	Count int
}

func (SearchRequest) Normalize

func (r SearchRequest) Normalize() SearchRequest

type SearchResult

type SearchResult struct {
	Provider string       `json:"provider"`
	Query    string       `json:"query"`
	Results  []ResultItem `json:"results"`
	Sources  []ResultItem `json:"sources,omitempty"`
}
func Search(ctx context.Context, provider string, apiKey string, req SearchRequest) (SearchResult, error)

Jump to

Keyboard shortcuts

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