API: providers/tavily
better-web-search-mcp / providers/tavily
providers/tavily#
Classes#
TavilyProvider#
Defined in: src/providers/tavily.ts:26
Tavily Search provider (optional).
Requires TAVILY_API_KEY in the environment. When the key is missing or
the request fails, it returns an empty array and logs a warning rather
than throwing.
Implements#
Constructors#
Constructor#
new TavilyProvider():
TavilyProvider
Returns#
Properties#
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
name | readonly | "tavily" | "tavily" | Stable provider identifier (e.g. “brave”, “tavily”, “duckduckgo”). | src/providers/tavily.ts:27 |
Methods#
search()#
search(
query,opts):Promise<SearchResult[]>
Defined in: src/providers/tavily.ts:29
Run a search and return normalized results.
Implementations MUST NOT throw on provider errors (missing key, HTTP 401/429, timeout). They return an empty array and log a warning instead, so one failing provider never breaks the aggregate search.
Parameters#
| Parameter | Type |
|---|---|
query | string |
opts | SearchOptions |
Returns#
Promise<SearchResult[]>