web-search
Retrieves live web search results via DuckDuckGo.
Install
mkdir -p .claude/skills/web-search && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/285" && unzip -o skill.zip -d .claude/skills/web-search && rm skill.zipInstalls to .claude/skills/web-search
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.Key capabilities
- →Perform web, news, image, and video searches
- →Filter results by time range, region, and safe search
- →Output results in text, markdown, or JSON formats
- →Save search results directly to files
- →Apply image-specific filters like size, color, and layout
How it works
It interfaces with the DuckDuckGo search API to retrieve and format web data based on user-defined parameters. It processes queries through a Python script that handles filtering, formatting, and file output.
Inputs & outputs
When to use web-search
- →Research current programming library versions
- →Find recent news on technical topics
- →Fact-check data from web sources
About this skill
Web Search
Overview
Search the web using DuckDuckGo's API to find information across web pages, news articles, images, and videos. Returns results in multiple formats (text, markdown, JSON) with filtering options for time range, region, and safe search.
When to Use This Skill
Use this skill when users request:
- Web searches for information or resources
- Finding current or recent information online
- Looking up news articles about specific topics
- Searching for images by description or topic
- Finding videos on specific subjects
- Research requiring current web data
- Fact-checking or verification using web sources
- Gathering URLs and resources on a topic
Prerequisites
Install the required dependency:
pip install duckduckgo-search
This library provides a simple Python interface to DuckDuckGo's search API without requiring API keys or authentication.
Core Capabilities
1. Basic Web Search
Search for web pages and information:
python scripts/search.py "<query>"
Example:
python scripts/search.py "python asyncio tutorial"
Returns the top 10 web results with titles, URLs, and descriptions in a clean text format.
2. Limiting Results
Control the number of results returned:
python scripts/search.py "<query>" --max-results <N>
Example:
python scripts/search.py "machine learning frameworks" --max-results 20
Useful for:
- Getting more comprehensive results (increase limit)
- Quick lookups with fewer results (decrease limit)
- Balancing detail vs. processing time
3. Time Range Filtering
Filter results by recency:
python scripts/search.py "<query>" --time-range <d|w|m|y>
Time range options:
d- Past dayw- Past weekm- Past monthy- Past year
Example:
python scripts/search.py "artificial intelligence news" --time-range w
Great for:
- Finding recent news or updates
- Filtering out outdated content
- Tracking recent developments
4. News Search
Search specifically for news articles:
python scripts/search.py "<query>" --type news
Example:
python scripts/search.py "climate change" --type news --time-range w --max-results 15
News results include:
- Article title
- Source publication
- Publication date
- URL
- Article summary/description
5. Image Search
Search for images:
python scripts/search.py "<query>" --type images
Example:
python scripts/search.py "sunset over mountains" --type images --max-results 20
Image filtering options:
Size filters:
python scripts/search.py "landscape photos" --type images --image-size Large
Options: Small, Medium, Large, Wallpaper
Color filters:
python scripts/search.py "abstract art" --type images --image-color Blue
Options: color, Monochrome, Red, Orange, Yellow, Green, Blue, Purple, Pink, Brown, Black, Gray, Teal, White
Type filters:
python scripts/search.py "icons" --type images --image-type transparent
Options: photo, clipart, gif, transparent, line
Layout filters:
python scripts/search.py "wallpapers" --type images --image-layout Wide
Options: Square, Tall, Wide
Image results include:
- Image title
- Image URL (direct link to image)
- Thumbnail URL
- Source website
- Dimensions (width x height)
6. Video Search
Search for videos:
python scripts/search.py "<query>" --type videos
Example:
python scripts/search.py "python tutorial" --type videos --max-results 15
Video filtering options:
Duration filters:
python scripts/search.py "cooking recipes" --type videos --video-duration short
Options: short, medium, long
Resolution filters:
python scripts/search.py "documentary" --type videos --video-resolution high
Options: high, standard
Video results include:
- Video title
- Publisher/channel
- Duration
- Publication date
- Video URL
- Description
7. Region-Specific Search
Search with region-specific results:
python scripts/search.py "<query>" --region <region-code>
Common region codes:
us-en- United States (English)uk-en- United Kingdom (English)ca-en- Canada (English)au-en- Australia (English)de-de- Germany (German)fr-fr- France (French)wt-wt- Worldwide (default)
Example:
python scripts/search.py "local news" --region us-en --type news
8. Safe Search Control
Control safe search filtering:
python scripts/search.py "<query>" --safe-search <on|moderate|off>
Options:
on- Strict filteringmoderate- Balanced filtering (default)off- No filtering
Example:
python scripts/search.py "medical information" --safe-search on
9. Output Formats
Choose how results are formatted:
Text format (default):
python scripts/search.py "quantum computing"
Clean, readable plain text with numbered results.
Markdown format:
python scripts/search.py "quantum computing" --format markdown
Formatted markdown with headers, bold text, and links.
JSON format:
python scripts/search.py "quantum computing" --format json
Structured JSON data for programmatic processing.
10. Saving Results to File
Save search results to a file:
python scripts/search.py "<query>" --output <file-path>
Example:
python scripts/search.py "artificial intelligence" --output ai_results.txt
python scripts/search.py "AI news" --type news --format markdown --output ai_news.md
python scripts/search.py "AI research" --format json --output ai_data.json
The file format is determined by the --format flag, not the file extension.
Output Format Examples
Text Format
1. Page Title Here
URL: https://example.com/page
Brief description of the page content...
2. Another Result
URL: https://example.com/another
Another description...
Markdown Format
## 1. Page Title Here
**URL:** https://example.com/page
Brief description of the page content...
## 2. Another Result
**URL:** https://example.com/another
Another description...
JSON Format
[
{
"title": "Page Title Here",
"href": "https://example.com/page",
"body": "Brief description of the page content..."
},
{
"title": "Another Result",
"href": "https://example.com/another",
"body": "Another description..."
}
]
Common Usage Patterns
Research on a Topic
Gather comprehensive information about a subject:
# Get overview from web
python scripts/search.py "machine learning basics" --max-results 15 --output ml_web.txt
# Get recent news
python scripts/search.py "machine learning" --type news --time-range m --output ml_news.txt
# Find tutorial videos
python scripts/search.py "machine learning tutorial" --type videos --max-results 10 --output ml_videos.txt
Current Events Monitoring
Track news on specific topics:
python scripts/search.py "climate summit" --type news --time-range d --format markdown --output daily_climate_news.md
Finding Visual Resources
Search for images with specific criteria:
python scripts/search.py "data visualization examples" --type images --image-type photo --image-size Large --max-results 25 --output viz_images.txt
Fact-Checking
Verify information with recent sources:
python scripts/search.py "specific claim to verify" --time-range w --max-results 20
Academic Research
Find resources on scholarly topics:
python scripts/search.py "quantum entanglement research" --time-range y --max-results 30 --output quantum_research.txt
Market Research
Gather information about products or companies:
python scripts/search.py "electric vehicle market 2025" --max-results 20 --format markdown --output ev_market.md
python scripts/search.py "EV news" --type news --time-range m --output ev_news.txt
Implementation Approach
When users request web searches:
-
Identify search intent:
- What type of content (web, news, images, videos)?
- How recent should results be?
- How many results are needed?
- Any filtering requirements?
-
Configure search parameters:
- Choose appropriate search type (
--type) - Set time range if currency matters (
--time-range) - Adjust result count (
--max-results) - Apply filters (image size, video duration, etc.)
- Choose appropriate search type (
-
Select output format:
- Text for quick reading
- Markdown for documentation
- JSON for further processing
-
Execute search:
- Run the search command
- Save to file if results need to be preserved
- Print to stdout for immediate review
-
Process results:
- Read saved files if needed
- Extract URLs or specific information
- Combine results from multiple searches
Quick Reference
Command structure:
python scripts/search.py "<query>" [options]
Essential options:
-t, --type- Search type (web, news, images, videos)-n, --max-results- Maximum results (default: 10)--time-range- Time filter (d, w, m, y)-r, --region- Region code (e.g., us-en, uk-en)--safe-search- Safe search level (on, moderate, off)-f, --format- Output format (text, markdown, json)-o, --output- Save to file
Image-specific options:
--image-size- Size filter (Small, Medium, Large, Wallpaper)--image-color- Color filter--image-type- Type filter (photo, clipart, gif, transparent, line)--image-layout- Layout filter (Square, Tall, Wide)
Video-specific options:
--video-duration- Duration filter (short, medium, long)--video-resolution- Resolution filter (high, standard)
Get full help:
python scripts/search.py --help
Best Practices
- Be specific - Use clear, specific s
Content truncated.
When not to use it
- →When advanced search operators like site: or filetype: are required
- →When high-volume automated scraping is needed
Prerequisites
Limitations
- →Results quality depends on DuckDuckGo index
- →No support for advanced Google-style search operators
- →Potential for rate limiting on high-frequency requests
How it compares
It provides a programmatic, filterable interface to search results compared to manual browser-based searching.
Compared to similar skills
web-search side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| web-search (this skill) | 33 | 9mo | Review | Beginner |
| perplexity | 14 | 6mo | No flags | Beginner |
| perplexity-search | 13 | 7mo | Review | Intermediate |
| exa-search | 9 | 8mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
perplexity
davila7
Web search and research using Perplexity AI. Use when user says "search", "find", "look up", "ask", "research", or "what's the latest" for generic queries. NOT for library/framework docs (use Context7) or workspace questions.
perplexity-search
davila7
Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model's knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.
exa-search
benjaminjackson
Search the web for content matching a query with AI-powered semantic search. Use for finding relevant web pages, research papers, news articles, code repositories, or any web content by meaning rather than just keywords.
skill-gemini-google-maps-tool
dnvriend
Query Gemini with Google Maps grounding
exa-research
benjaminjackson
Use when the user mentions Exa research OR when the workflow benefits from complex, multi-step research and other exa-ai approaches are not yielding satisfactory results.
websearch-quick
thomasholknielsen
Fast, targeted single-pass search strategy for simple factual lookups. 1-iteration workflow with authoritative source verification and minimal citations. Use for version lookups, documentation finding, simple definitions, existence checks. Keywords: what version, find docs, link to, what is, does X support.