web-search
✓Verified·Scanned 2/18/2026
Provides a DuckDuckGo Instant Answer CLI (./web-search.sh) that queries https://api.duckduckgo.com and formats instant-answer results. It performs local shell execution and outbound HTTP requests for its stated purpose; these behaviours are purpose-aligned and low risk.
from clawhub.ai·v77e910a·43.0 KB·0 installs
Scanned from 1.1.0 at 77e910a · Transparency log ↗
$ vett add clawhub.ai/hahahxx/web-search
Web Search Tool
DuckDuckGo Instant Answer API client - free web search without API keys.
API Details
-
Endpoint:
https://api.duckduckgo.com/ -
Parameters:
q- Search query (URL-encoded)format=json- JSON responseno_html=1- Plain text (no HTML)skip_disambig=0- Include disambiguation results
-
Documentation: https://duckduckgo.com/api
-
Rate Limits: None documented (be respectful)
Response Structure
{
"Abstract": "Full text summary",
"AbstractSource": "Wikipedia",
"AbstractURL": "https://...",
"Answer": "Direct answer (e.g., 4 for 2+2)",
"AnswerType": "calc",
"Definition": "Term definition",
"Heading": "Result title",
"RelatedTopics": [
{
"Text": "Topic description",
"FirstURL": "https://..."
}
]
}
Query Types That Work Well
- Calculations:
2+2,sqrt(144),10% of 500 - Definitions:
define recursion,what is AI - Conversions:
100 miles to km,50c to fahrenheit - Facts:
population of Tokyo,who won 2024 Olympics - Wikipedia:
quantum physics,French Revolution
Query Types That Don't Work Well
- Full web searches: Use DuckDuckGo URL provided in output
- Recent news: DuckDuckGo focuses on evergreen content
- Personal queries: Location-specific, user-specific data
- Real-time data: Stock prices, live scores, etc.
Character Encoding
Some abstracts have Unicode issues in basic parsing (non-ASCII characters garbled).
Install jq for cleaner output:
sudo apt-get install jq # Ubuntu/Debian
brew install jq # macOS
Error Handling
- Network timeout → Tool retries once, then reports error
- Empty response → Reports "No results found" with DuckDuckGo URL
- Invalid JSON → Falls back to basic grep parsing
- No curl/wget → Error message recommending installation