API: providers/serpapi
better-web-search-mcp / providers/serpapi
providers/serpapi#
Classes#
SerpApiProvider#
Defined in: src/providers/serpapi.ts:10
SerpApi provider stub (deferred).
SerpApi integration is not implemented yet. This stub satisfies the SearchProvider contract so the aggregation layer can include it without special-casing, but always returns no results.
Implements#
Constructors#
Constructor#
new SerpApiProvider():
SerpApiProvider
Returns#
Properties#
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
name | readonly | "serpapi" | "serpapi" | Stable provider identifier (e.g. “brave”, “tavily”, “duckduckgo”). | src/providers/serpapi.ts:11 |
Methods#
search()#
search(
_query,_opts):Promise<SearchResult[]>
Defined in: src/providers/serpapi.ts:13
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[]>