Versions in this module Expand all Collapse all v0 v0.14.1 Aug 29, 2026 v0.14.0 Aug 12, 2026 v0.13.1 Aug 12, 2026 v0.13.0 Aug 11, 2026 Changes in this version + const DefaultExaEndpoint + const DefaultMaxBodyBytes + const DefaultReaderEndpoint + const DefaultRenderMaxConcurrency + const DefaultRenderMaxNetworkBytes + const DefaultRenderMaxRequests + const DefaultRenderTimeout + const DefaultSearchEndpoint + const DefaultSearchLimit + const DefaultTimeout + const DefaultUserAgent + const ErrorCodeAuthentication + const ErrorCodeBrowserUnavailable + const ErrorCodeCanceled + const ErrorCodeExtraction + const ErrorCodeInvalidArgument + const ErrorCodeInvalidJSON + const ErrorCodeInvalidURL + const ErrorCodeMissingAPIKey + const ErrorCodeNoInput + const ErrorCodeNotHTML + const ErrorCodePrivateNetwork + const ErrorCodeProviderResponse + const ErrorCodeRateLimited + const ErrorCodeReaderFallback + const ErrorCodeRenderBudget + const ErrorCodeRenderFailed + const ErrorCodeRequestTimeout + const ErrorCodeResponseTooLarge + const ErrorCodeUnsupportedReader + const ErrorCodeUnsupportedSearch + const ErrorCodeUpstreamHTTP + const MaxSearchLimit + const ProjectionFormatMarkdown + const ReaderModeAuto + const ReaderModeDefuddle + const ReaderModeJina + const RenderModeAlways + const RenderModeAuto + const RenderModeNever + const RenderWaitLoad + const RenderWaitNetworkIdle + var ErrNotHTML = errors.New("response is not HTML") + var ErrTooLarge = errors.New("response body exceeds configured limit") + var ErrUnsupportedReader = errors.New("unsupported reader") + func ContentLineCount(content string) int + func NewCodedError(err error, code, suggestion string) error + func NormalizeProjectionFormat(format string) string + func ProjectionFormatIsMarkdown(format string) bool + func TruncationMarker(projection ContentProjection) string + type Client struct + func NewClient(cfg ClientConfig) *Client + func (c *Client) Do(ctx context.Context, method, rawURL string, headers http.Header, body []byte) (httpResponse, error) + func (c *Client) Get(ctx context.Context, rawURL string, headers http.Header) (httpResponse, error) + type ClientConfig struct + AllowPrivateNetworks bool + MaxBodyBytes int64 + Timeout time.Duration + UserAgent string + type CodedError struct + Code string + Err error + Suggestion string + func (e *CodedError) Error() string + func (e *CodedError) Unwrap() error + type Config struct + AllowPrivateNetworks bool + BraveAPIKey string + ChromePath string + ExaAPIKey string + ExaSearchEndpoint string + JinaAPIKey string + MaxBodyBytes int64 + ReaderEndpoint string + ReaderMode string + RenderMaxConcurrency int + RenderMaxHTMLBytes int64 + RenderMaxNetworkBytes int64 + RenderMaxRequests int + RenderTimeout time.Duration + SearchEndpoint string + SearchProvider string + Timeout time.Duration + URLCacheDir string + URLCacheTTL time.Duration + UserAgent string + type ContentProjection struct + Content string + Format string + NextStartLine int + OutputBytes int + OutputLines int + StartLine int + TotalBytes int + TotalLines int + Truncated bool + TruncatedBy string + func ProjectContent(content string, limits OutputLimits) ContentProjection + func ProjectFetchContent(content, format string, startLine int, limits OutputLimits) (ContentProjection, error) + type Document struct + Author string + Content string + ContentType string + Description string + Domain string + Extractor string + Favicon string + FinalURL string + Image string + Language string + Published string + Rendered bool + Site string + Source string + StatusCode int + Title string + URL string + Warnings []string + WordCount int + type FetchRequest struct + Raw bool + Reader string + Render string + RenderWait string + URL string + type HTTPError struct + Body string + Status string + StatusCode int + URL string + func (e *HTTPError) Error() string + type OutputLimits struct + MaxBytes int + MaxLines int + func NewOutputLimits(maxBytes, maxLines int) (OutputLimits, error) + type SearchRequest struct + Category string + HighlightSentences int + IncludeDomains []string + IncludeHighlights bool + Limit int + Query string + StartPublishedDate string + func ParseSearchRequest(args map[string]any) (SearchRequest, error) + type SearchResponse struct + Provider string + Query string + Results []SearchResult + type SearchResult struct + Description string + Highlights []string + PublishedAt string + Title string + URL string + type Service struct + func NewService(cfg Config) *Service + func (s *Service) Close(ctx context.Context) error + func (s *Service) Fetch(ctx context.Context, req FetchRequest) (Document, error) + func (s *Service) Search(ctx context.Context, req SearchRequest) (SearchResponse, error)