exa

package
v0.57.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package exa integrates Exa's Search and Contents APIs with the provider-neutral web contracts.

A Client implements both web.Searcher and web.Fetcher. Search requests use POST /search; page fetching uses POST /contents. Exa transport DTOs, search tuning, and response normalization remain private to this package. Fetch supports Markdown and HTML. Plain text is rejected because Exa's non-HTML extraction returns Markdown. Fetch requests fresh content so the requested rendering options take effect.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, config Config) (*Client, error)

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, request *web.FetchRequest) (*web.FetchResponse, error)

func (*Client) Search

func (c *Client) Search(ctx context.Context, request *web.SearchRequest) (*web.SearchResponse, error)

type Config

type Config struct {
	APIKey  string
	BaseURL string
	// HTTPClient remains host-owned. Requests and redirects are restricted to
	// BaseURL's origin, including when the host redirect policy changes a request.
	HTTPClient *http.Client
}

Config configures a Client. APIKey is required; an empty BaseURL selects Exa's public endpoint and a nil HTTPClient selects a default client.

Jump to

Keyboard shortcuts

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