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

@probeo/anyserp

v0.4.0

Published

Unified SERP API router. 11 providers — Serper, SerpAPI, Google CSE, Bing, Brave, DataForSEO, SearchAPI, ValueSERP, ScrapingDog, Bright Data, SearchCans.

Downloads

293

Readme

@probeo/anyserp

Unified SERP API router. Route search requests across Google, Bing, Brave, and more with a single API. Self-hosted, zero fees.

Install

npm install @probeo/anyserp

Quick Start

Set your API keys as environment variables:

export SERPER_API_KEY=...
export BRAVE_API_KEY=...
import { AnySerp } from "@probeo/anyserp";

const client = new AnySerp();

// Search with the first available provider
const results = await client.search("best typescript frameworks");
console.log(results.results[0].title, results.results[0].url);

Supported Providers

| Provider | Env Var | Web | Images | News | Videos | |----------|---------|-----|--------|------|--------| | Serper | SERPER_API_KEY | Yes | Yes | Yes | Yes | | SerpAPI | SERPAPI_API_KEY | Yes | Yes | Yes | Yes | | Google CSE | GOOGLE_CSE_API_KEY + GOOGLE_CSE_ENGINE_ID | Yes | Yes | No | No | | Bing | BING_API_KEY | Yes | Yes | Yes | Yes | | Brave | BRAVE_API_KEY | Yes | Yes | Yes | Yes | | DataForSEO | DATAFORSEO_LOGIN + DATAFORSEO_PASSWORD | Yes | No | Yes | No | | SearchAPI | SEARCHAPI_API_KEY | Yes | Yes | Yes | Yes | | ValueSERP | VALUESERP_API_KEY | Yes | Yes | Yes | Yes | | ScrapingDog | SCRAPINGDOG_API_KEY | Yes | Yes | Yes | No | | Bright Data | BRIGHTDATA_API_KEY | Yes | Yes | Yes | Yes | | SearchCans | SEARCHCANS_API_KEY | Yes | No | Yes | No |

Provider Routing

Specify a provider with provider/query format:

// Use a specific provider
const results = await client.search("serper/typescript frameworks");

// Or just search with the first available
const results = await client.search("typescript frameworks");

Search Options

const results = await client.search({
  query: "typescript frameworks",
  num: 20,             // number of results
  page: 2,             // page number
  country: "us",       // country code
  language: "en",      // language code
  safe: true,          // safe search
  type: "web",         // web, images, news, videos
  dateRange: "month",  // day, week, month, year
});

Fallback Routing

Try multiple providers in order. If one fails, the next is attempted:

const results = await client.searchWithFallback(
  { query: "typescript frameworks" },
  ["serper", "brave", "bing"],
);

Search All Providers

Search all configured providers and get combined results:

const allResults = await client.searchAll({
  query: "typescript frameworks",
});

for (const result of allResults) {
  console.log(`${result.provider}: ${result.results.length} results`);
}

Unified Response Format

All providers return the same SearchResponse shape:

interface SearchResponse {
  provider: string;
  query: string;
  results: SearchResult[];
  totalResults?: number;
  searchTime?: number;
  relatedSearches?: string[];
  knowledgePanel?: KnowledgePanel;
  answerBox?: AnswerBox;
}

interface SearchResult {
  position: number;
  title: string;
  url: string;
  description: string;
  domain?: string;
  datePublished?: string;
  // Image fields
  imageUrl?: string;
  imageWidth?: number;
  imageHeight?: number;
  // News fields
  source?: string;
  // Video fields
  duration?: string;
  channel?: string;
}

Configuration

Programmatic

const client = new AnySerp({
  serper: { apiKey: "..." },
  brave: { apiKey: "..." },
  google: { apiKey: "...", engineId: "..." },
  dataforseo: { login: "...", password: "..." },
  searchapi: { apiKey: "..." },
  valueserp: { apiKey: "..." },
  scrapingdog: { apiKey: "..." },
  brightdata: { apiKey: "..." },
  searchcans: { apiKey: "..." },
  defaults: {
    num: 10,
    country: "us",
    language: "en",
    safe: true,
  },
  aliases: {
    fast: "serper",
    default: "brave",
  },
});

Environment Variables

export SERPER_API_KEY=...
export SERPAPI_API_KEY=...
export GOOGLE_CSE_API_KEY=...
export GOOGLE_CSE_ENGINE_ID=...
export BING_API_KEY=...
export BRAVE_API_KEY=...
export DATAFORSEO_LOGIN=...
export DATAFORSEO_PASSWORD=...
export SEARCHAPI_API_KEY=...
export VALUESERP_API_KEY=...
export SCRAPINGDOG_API_KEY=...
export BRIGHTDATA_API_KEY=...
export SEARCHCANS_API_KEY=...

License

MIT