duckduckgo-search
Search for words, documents, images, news, maps and text translation using the DuckDuckGo.com search engine.
What it is and what it does
duckduckgo_search is a Python wrapper that queries DuckDuckGo.com to retrieve search results without requiring an API key. It supports text search, image search, video search, and news retrieval across multiple regions and with configurable filters like safe search and time limits. The package includes both a Python API (DDGS class) and a command-line interface, making it usable in scripts or as a standalone tool.
The library depends on click for CLI functionality, primp for HTTP requests, and lxml for parsing HTML responses. It handles proxy configuration (HTTP, HTTPS, and SOCKS5), custom headers, and timeouts. The package is classified as Production/Stable and actively maintained, though the description includes a deprecation notice.
Use it for:
- Scrape web search results for research, data collection, or content aggregation without API authentication.
- Build a multi-region search tool that queries DuckDuckGo across different locales and languages.
- Download images or videos in bulk by searching and filtering through DuckDuckGo's index.
- Integrate news search into a monitoring or alerting application to track topics across time periods.
- Create a command-line search utility for quick lookups from the terminal with filtering options.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Retrieves search results from DuckDuckGo for text, images, videos, and news without requiring an API key.
Yes, but with caution: the package works well for one-off searches and prototyping. The description includes a deprecation notice recommending migration to a renamed package. Install only if you have an existing dependency or need to maintain legacy code. No known security vulnerabilities.
Install
duckduckgo-search on PyPI
pip
pip install duckduckgo-searchuv
uv add duckduckgo-searchpoetry
poetry add duckduckgo-searchInstalling duckduckgo-search
Before you install
Low install friction with three lightweight runtime dependencies (click, primp, lxml). Active maintenance with recent commits and 2892 repository stars.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions.
Quickstart
pip install duckduckgo_search
from duckduckgo_search import DDGS
results = DDGS().text("python programming", max_results=5)
print(results)
Requires Python 3.9 or later. DuckDuckGo may rate-limit or block requests; proxy support is available but rotating proxies are recommended for sustained use.
Verify before relying
- Whether the package continues to work reliably given the official deprecation notice and redirect to a renamed package.
- Current rate-limiting behavior and whether DuckDuckGo actively blocks or throttles this library's requests.
- Stability and maintenance timeline for this package versus its renamed successor.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — click, primp, lxml |
| Maintenance | actively maintained — 404 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,500,588/month — #2,086 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: duckduckgo_search-8.1.1-py3-none-any.whl
Keywords: python, duckduckgo
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
ddgsAggregates web search results from multiple…
permissive · top 5,000 on PyPI
duckduckgo-mcp-serverProvides web search and content fetching…
permissive · top 15,000 on PyPI
duckduckgo-mcpThis package is deprecated; install web-forager…
permissive · top 15,000 on PyPI
gnewsGNews searches Google News RSS feeds and…
permissive · top 15,000 on PyPI
googlenewsdecoderDecodes Google News redirect URLs to their…
permissive · top 15,000 on PyPI
eventregistryQuery news articles and events from Event…
permissive · top 15,000 on PyPI
web-foragerWeb Forager is a search-and-fetch toolkit for…
permissive · top 15,000 on PyPI
trendspyFetch and analyze Google Trends data including…
permissive · top 15,000 on PyPI
brave-search-python-clientA Python client library for the Brave Search…
permissive · top 15,000 on PyPI
play-scraperScrapes application metadata and listings from…
permissive · top 15,000 on PyPI