# sema-tavily 0.1.0 — API reference

Source declarations extracted without executing package code. Signatures describe declarations, not inferred runtime behavior.

## tavily/client

```sema
(tavily/client . opts)
```

Build a Tavily API client map. Options: :api-key (default: TAVILY_API_KEY env var), :base-url (default "https://api.tavily.com"), :timeout in ms (default 60000). Errors if no key is found.

[Source line 19](https://pkg.sema-lang.com/packages/sema-tavily/0.1.0/source/package.sema#L19)

## tavily/extract

```sema
(tavily/extract client urls . opts)
```

Extract cleaned content from one or more page URLs. urls is a URL string or a list of URL strings. Returns a map with :results (a list of {:url :raw_content}) and :failed_results. opts is an optional map merged into the request body: :extract_depth (default "basic"), :format ("markdown"), :include_images (#f).

[Source line 87](https://pkg.sema-lang.com/packages/sema-tavily/0.1.0/source/package.sema#L87)

## tavily/request

```sema
(tavily/request client method path body)
```

Make a raw Tavily API request. method is "GET"/"POST"/..., path an API path ("/search"), body a map (JSON-encoded) or nil. Returns the decoded JSON body ({} when empty); raises on non-2xx with method, path, status, and the API's error message.

[Source line 59](https://pkg.sema-lang.com/packages/sema-tavily/0.1.0/source/package.sema#L59)

## tavily/search

```sema
(tavily/search client query . opts)
```

Run a web search for a query string. Returns a map with :answer (when requested), :results (a list of {:title :url :content :score}), and :query. opts is an optional map merged into the request body: :search_depth (default "basic"), :max_results (default 5), :topic ("general"), :include_answer (#f), :include_raw_content (#f), :include_domains, :exclude_domains, :time_range.

[Source line 76](https://pkg.sema-lang.com/packages/sema-tavily/0.1.0/source/package.sema#L76)

---

Parser: sema-reader 1.37.0

Archive SHA-256: `1d77c18aa0ac494026762b1efe01cea23adc7244370be77c689df6e3c5fcf262`
