Skip to content

Add serpdive provider - #7

Open
edendalexis wants to merge 2 commits into
code-yeongyu:mainfrom
edendalexis:add-serpdive-provider
Open

Add serpdive provider#7
edendalexis wants to merge 2 commits into
code-yeongyu:mainfrom
edendalexis:add-serpdive-provider

Conversation

@edendalexis

@edendalexis edendalexis commented Jul 22, 2026

Copy link
Copy Markdown

What

Adds serpdive as a provider, mirroring the tavily module. SERPdive returns extracted, answer-ready page content per result instead of snippets, so the snippet field carries real page content. On a public 1,000-question benchmark it won 60.7% of decided quality duels against Tavily's default (basic) search while returning 20.2% fewer tokens (1,001 vs 1,255 per query on average) at the same speed; Tavily's advanced tier was not tested. Free tier, no card.

Full disclosure: I built SERPdive — close freely if you'd rather keep the provider list as is, no hard feelings.

How

  • providers/serpdive.ts: bearer auth, POST body { query, max_results } with max_results clamped to the API cap of 10; domain filters fold into the query via appendDomainFilters (the API has no domain parameters); results[].contentsnippet
  • registered in types.ts, provider-endpoints.ts (https://api.serpdive.com/v1/search), providers.ts, config.ts provider list, package.json keywords, README provider bullet
  • tests: baseUrl-override loop entry, buildRequest (bearer + body + domain-filter folding + cap), normalizeResponse

Testing

npm run check (tsgo + biome) clean, npm test 110/110.


Summary by cubic

Add serpdive as a web search provider that returns extracted page content in snippet for more answer-ready results. Wired into config, endpoints, providers, tests, and docs (README notes the API key has a free tier).

  • New Features
    • Request: POST to https://api.serpdive.com/v1/search with bearer auth; body { query, max_results } (clamped to 10), no model sent; domain filters appended to the query.
    • Normalize: map results[].title/url/content to the common result shape; contentsnippet.
    • Wiring & docs: registered in types, provider-endpoints, providers, and config; README updated to note free-tier key; package.json keyword added; tests for request building and response normalization.

Written for commit 6e3d869. Summary will update on new commits.

Review in cubic

Mirrors the tavily provider module: bearer auth, POST body with query and
max_results (capped at the API's 10), results[].content as snippet. Domain
filters fold into the query via appendDomainFilters. Registered in types,
default endpoints, provider modules, config validation, and tests.
@edendalexis

Copy link
Copy Markdown
Author

Update while this is open: SERPdive now has a free tier, which changes the calculus for this integration.

model: "krill" is free and unlimited under fair use — no card, no credits to spend, no trial clock. It returns about 700 tokens per search (roughly half what the usual alternatives send), one request at a time, at low priority. The paid models are unchanged.

Why it matters here: the usual objection to adding a search provider is that reviewers and users need a paid key just to try it. That objection is gone — anyone can run this integration end to end for free, including whoever reviews this PR.

Nothing in this PR needs to change for that: the default stays mako, and krill is opt-in via the existing model parameter. Happy to add a line to the docs here if you'd like the free tier called out explicitly.

The provider list tells the reader what each provider requires — the
duckduckgo entry already notes it needs no key. SERPdive's now says its key has
a free tier: unlimited under fair use, no card. No behaviour change; this
provider sends no model and keeps using the API default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant