ask-search-web-api

Query 71 search engines in parallel and merge results into one ranked list.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-search-web-api-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ask-search-web-api
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/skills/ask-search-web-api
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-search-web-api-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires grab-url, linkedom, @huggingface/transformers, hono.

What problem does it solve? Aggregating results from dozens of search engines, deduplicating them, and ranking them consistently is tedious to build from scratch, and individual scraper-based engines silently break or get skipped without visibility. This Skill guides you through the search-web-api package so you can run meta-searches, diagnose failing engines, and wire search into agents, Workers, or an MCP server. ## Core Features & Use Cases - Meta-search across 71 engines: Query engines across 13 categories (general, academic, it, news, images, videos, and more) in parallel, with automatic deduplication and weighted scoring via the ResultContainer. - Engine and category selection: Restrict searches by exact engine names or categories, inspect the engine catalogue, and check per-engine health status when results go missing. - Autocomplete and fallbacks: Use autocomplete backends (Google, DuckDuckGo, Brave, and others), a local transformers.js next-word model, or hosted fallbacks via Tavily and public SearXNG instances. - Use Case: You are building a research agent that needs academic sources. Call search.search(query, 1, undefined, ["academic"]) to fan out to arXiv, PubMed, Semantic Scholar, and Google Scholar, then receive one merged, score-ranked result list. ## Quick Start Ask the assistant to search the academic category for a topic like "attention is all you need" using the search-web-api package and return the top merged results.

Frequently Asked Questions about ask-search-web-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search multiple engines at once with search-web-api?

Create a Search instance and call search.search(query, pageno) to fan out to every registered engine in parallel. Pass engine names or categories as the third and fourth arguments to restrict the search scope.

How do I add a new search engine adapter to search-web-api?

Create a file in src/sources/<category>/ exporting an EngineFunction that fetches results, parses HTML with linkedom, and returns an array of EngineResult objects. Then register it in search-engines-registry-list.ts by adding its name, function, and categories to ALL_ENGINES.

Why does a search engine return nothing without an error?

Per-engine failures are caught, logged to console.error, recorded in the health tracker, and silently dropped from results. Check search.getEngineStatus(name) or getAllEngineStatuses() to see whether the engine was disabled after repeated failures.

Does search-web-api work on Cloudflare Workers?

Yes, but adapters must parse HTML with linkedom rather than jsdom, which does not run on Workers. The package ships TypeScript source with no build step, so consumers must transpile it or run under bun.

Why is passing categories to search() having no effect?

The engineNames argument takes precedence over categories, so if both are passed the categories are ignored. Also verify engine names match the exact lowercase ALL_ENGINES keys, since typos silently filter to an empty set.