Source declarations and literal docstrings from this release. Package code was not executed.
tavily/client
(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.
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).
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.
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.