What It Does
It's a straightforward way to bring current web data into any research, fact-checking, or content-gathering workflow.
Results are returned in your choice of plain text, Markdown, or JSON, and can be filtered by time range, region, safe-search level, and media-specific attributes (image size/color/type, video duration/resolution).
Web Search gives your AI agent the ability to query DuckDuckGo across four content types — web pages, news articles, images, and videos — without requiring any API key or authentication.
Key Features
- Four search types: web, news, images, and videos — Run targeted searches against DuckDuckGo's web index, its news feed, its image index, or its video index — all from the same script. News results include publication date and source; image results include direct image URL, thumbnail, and dimensions; video results include publisher, duration, and publication date.
- Time-range filtering — Narrow results to the past day (`d`), week (`w`), month (`m`), or year (`y`) using the `--time-range` flag. This makes it easy to surface only recent information and filter out stale content.
- Three output formats: text, Markdown, and JSON — Choose plain text for quick reading, Markdown for documentation, or JSON for programmatic processing. Results can be printed to stdout or saved directly to a file with `--output`.
- Media-specific filters — Image searches support size (`Small`, `Medium`, `Large`, `Wallpaper`), color, type (`photo`, `clipart`, `gif`, `transparent`, `line`), and layout (`Square`, `Tall`, `Wide`) filters. Video searches support duration (`short`, `medium`, `long`) and resolution (`high`, `standard`) filters.
- Region and safe-search controls — Specify a region code (e.g., `us-en`, `de-de`) to get locally relevant results, and set safe-search to `on`, `moderate`, or `off` to match your content policy requirements.
- No API key required — The skill uses the `duckduckgo-search` Python library, which interfaces with DuckDuckGo without authentication. The only setup step is `pip install duckduckgo-search`.
Use Cases
- Daily news briefing on a topic — Run a news search with `--type news --time-range d` to pull the latest articles on a subject (e.g., climate policy, a company, a technology). Save the output as Markdown for a clean, shareable briefing document.
- Fact-checking a specific claim — Search for the claim with `--time-range w --max-results 20` to retrieve recent, diverse web sources. Review the URLs and descriptions to cross-reference supporting or contradicting evidence.
- Gathering visual assets for a project — Use `--type images --image-size Large --image-type photo` to find high-quality, large photos on a topic. The results include direct image URLs and source websites for attribution.
- Building a research knowledge base — Combine web, news, and video searches on related sub-topics, saving each as a Markdown file. The resulting files form a structured, searchable knowledge base for a report or presentation.