DuckDuckGo web search tool for OpenCode with deep search capabilities.
- DuckDuckGo Search: Uses DuckDuckGo for web searching (no API key required)
- Deep Search: Iterative search refinement that finds more relevant results
- Content Extraction: Extracts clean text content from web pages
- Source Deduplication: Automatically deduplicates sources by domain
- Raw JSON Output: Returns structured data for AI evaluation
pip install ddgs beautifulsoup4 requests aiohttp lxmlThe npm package name is opencode-web-deepsearch.
Add to your opencode.json:
{
"plugin": ["opencode-web-deepsearch"]
}OpenCode will automatically install the plugin from npm using Bun.
The tool is available as web-deepsearch in OpenCode.
| Argument | Type | Default | Description |
|---|---|---|---|
query |
string | required | Search query |
max_sources |
number | 3 | Maximum sources to extract |
deep_search |
boolean | true | Enable iterative search refinement |
Use the web-deepsearch tool to search for "TypeScript 5.x features"
Or with explicit arguments:
{
"query": "TypeScript 5.x new features",
"max_sources": 5,
"deep_search": true
}{
"query": "TypeScript 5.x new features",
"sources": [
{
"title": "TypeScript 5.0 - Major Changes",
"url": "https://example.com/typescript-5",
"snippet": "TypeScript 5.0 brings...",
"content": "Full extracted content...",
"domain": "example.com"
}
],
"iterations_used": 3,
"source_count": 5,
"domain_count": 3
}- Python 3.8+
ddgsbeautifulsoup4requestsaiohttplxml
# Install dependencies
pip install ddgs beautifulsoup4 requests aiohttp lxml
# Build TypeScript
npm run build
# Test Python script directly
python3 scripts/WebSearchAgent.py --query "test" --max-sources 1 --deep-search false
# Test with Docker
docker build -f Dockerfile.test -t opencode-plugin-test .
docker run -it opencode-plugin-test bash| Aspect | web-deepsearch | Standard OpenCode (Exa) |
|---|---|---|
| API Key | Not required | Optional (for higher limits) |
| Cost | Free | Limited free tier |
| Code search | Not included | Via get_code_context_exa |
| Deep search | Iterative refinement | Not available |
| Content extraction | Full page extraction | Via web_fetch_exa |
| Latency | Slower (DuckDuckGo) | Faster (Exa API) |
| Reliability | Depends on DuckDuckGo | More stable (Exa) |
- You don't have an Exa API key
- You need iterative deep search
- You want a free solution without limits
- You need code search (GitHub code search)
- You need faster results
- You have an API key and need higher limits
MIT