web-search-routing

Routes web searches between DuckDuckGo and Exa based on query type and quota constraints.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill web-search-routing-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-search-routing
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/productivity/web-search-routing
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill web-search-routing-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ddgs, exa-py, and includes references (resource) components.

What problem does it solve? Choosing the wrong web search backend wastes paid API quota or returns insufficient content. This Skill defines clear routing rules so quick lookups use free DuckDuckGo search while full-page content extraction uses Exa only when needed. ## Core Features & Use Cases - Backend Routing Rules: Directs quick fact lookups, news, and URL discovery to DuckDuckGo (free, unlimited) and full-page content extraction to Exa (20,000 requests/month quota). - Two-Step Search-Extract Workflow: Searches with DuckDuckGo first to find relevant URLs, then extracts content only from promising results to conserve Exa quota. - Programmatic Provider Access: Documents Python import paths for the ddgs package, the Hermes Exa plugin, and the raw exa_py SDK, including credential sourcing from .env files. - Fallback Techniques: Provides JSON-LD structured data extraction for JavaScript-rendered SPA pages where curl returns empty shells. - Use Case: When researching a topic, run a free DuckDuckGo search to collect candidate URLs, then extract full article text from only the two most relevant pages via Exa, staying well within monthly quota. ## Quick Start Use the web search routing skill to find recent articles about a topic with DuckDuckGo and extract the full text of the most relevant result with Exa.

Frequently Asked Questions about web-search-routing

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

FAQPage Schema
When should I use DuckDuckGo vs Exa for web search?

Use DuckDuckGo (ddgs) for quick fact lookups, news headlines, and URL discovery since it is free and unlimited. Use Exa only when you need full page content or structured data extraction, since it consumes a 20,000 request monthly quota.

How do I search the web with Python using ddgs?

Install the ddgs package with pip, then use 'from ddgs import DDGS' and call DDGS().text(query, max_results=5). Results are dicts with title, href, and body keys. Note that ddgs supports search only, not content extraction.

How do I extract full page content from a URL with Exa?

Use the ExaWebSearchProvider from the Hermes plugin or the raw exa_py SDK with your EXA_API_KEY. Call extract with a list of URLs to receive full page text, typically 5,000 to 20,000 characters per page.

Why does curl return empty content for some websites?

Single-page applications built with Angular, React, or Vue render content via JavaScript, so curl only retrieves an empty HTML shell. Extract the embedded JSON-LD structured data from script tags instead, which contains the full dataset as pure JSON.

What happens when the Exa monthly quota runs out?

When Exa quota is exhausted, set web.extract_backend to an empty value and use browser_navigate for page reading instead. The quota resets monthly and can be monitored at the Exa dashboard.

Why does ddgs stop working after many searches?

DDGS is a scraper rather than an official API, so it can be rate-limited after roughly 50 searches per minute. Add a one-second sleep between calls when running bulk search workloads.