npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

searchsuite

v0.1.3

Published

A type-safe TypeScript SDK for Baidu, Doubao, Tavily, Exa, and Serper search.

Readme

SearchSuite

English

CI Node.js >=24 ESM only License: MIT

用一套类型安全的 API 接入百度、豆包、Tavily、Exa 和 Serper 搜索及网页内容获取。

SearchSuite 是独立于框架的 TypeScript SDK。调用方只需要选择 Provider, 再使用搜索或内容获取接口:

import { SearchSuite } from 'searchsuite'

const client = new SearchSuite()
const response = await client.search({
  provider: 'tavily',
  query: 'Recent advances in AI agent search',
  maxResults: 5,
})

const page = await client.fetch({
  provider: 'tavily',
  url: 'https://example.com/article',
})

特性

  • 根据 Provider 推断 providerOptions 和响应类型。
  • 统一结果、用量、延迟、warning 和稳定的错误类型。
  • 使用原生 fetch、AbortSignal;仅支持 ESM,零运行时依赖。
  • Provider Adapter 保持轻量,不隐藏重试、回退、路由或缓存逻辑。
  • 提供 Provider-backed 的 fetch() 内容获取接口,并导出与 dsh-web 兼容的 WebFetchProvider 契约。

环境要求

  • Node.js 24 或更高版本
  • ESM 项目;不支持 CommonJS 和 require()

安装

从 npm 安装 SearchSuite:

npm install searchsuite

快速开始

在服务端环境中设置 Provider 凭据,然后调用 SDK:

import { SearchSuite } from 'searchsuite'

// searchsuite 会读取配置的 TAVILY_API_KEY
const client = new SearchSuite()
const response = await client.search({
  provider: 'tavily',
  query: 'Recent advances in AI agent search',
  maxResults: 5,
})

for (const result of response.results) {
  console.log(result.title, result.url)
}

SearchSuite 会在 Provider 首次使用时读取环境变量,但不会自行加载 .env 文件; 本地开发可使用 Node.js --env-file=.env,生产环境请使用部署平台的密钥配置。 不要将凭据暴露到浏览器 bundle 或提交到代码仓库。

支持的 Provider

| Provider | 默认搜索模式 | 环境变量 | | --- | --- | --- | | Baidu | baidu:web, baidu:ai | BAIDU_API_KEY 或 QIANFAN_API_KEY | | Doubao | doubao:custom, doubao:global | DOUBAO_API_KEY 或 DOUBAO_SEARCH_API_KEY | | Tavily | tavily:basic, tavily:advanced, tavily:fast, tavily:ultra-fast | TAVILY_API_KEY | | Exa | exa:auto, exa:keyword, exa:neural | EXA_API_KEY | | Serper | serper:google | SERPER_API_KEY |

切换 Provider 只需更换 provider:

const response = await client.search({
  provider: 'exa',
  query: 'Recent advances in AI agent search',
})

显式 Provider 配置优先于环境变量,环境变量优先于 Provider 默认值。有关能力、 限制、选项和标准化字段,请参阅 Provider 指南。

文档

贡献与安全

开发和评审规范见 CONTRIBUTING.md,问题反馈见 SUPPORT.md,安全漏洞请按 SECURITY.md 的私密流程报告。 不要在 Issue 或 Pull Request 中包含 API Key、Authorization Header、.env 文件或 未经脱敏的 Provider 数据。

许可证

SearchSuite 使用 MIT License。