Back to catalog

ddgs

by deedy5

Pending

DDGS | Dux Distributed Global Search. A metasearch library that aggregates results from diverse web search services

2,135stars
212forks
Python
Added 12/27/2025
MCP Serversapiddgsmcpmcp-servermetasearchpythonsearchwebsearch
Installation
# Add to your Claude Code skills
git clone https://github.com/deedy5/ddgs
README.md

Python >= 3.10

DDGS | Dux Distributed Global Search<a name="TOP"></a>

A metasearch library that aggregates results from diverse web search services.

Table of Contents


API Server (with MCP Integration)

  • Docker compose
git clone https://github.com/deedy5/ddgs && cd ddgs
docker-compose up --build
  • Bash
git clone https://github.com/deedy5/ddgs && cd ddgs
chmod +x start_api.sh
./start_api.sh

Available Endpoints

  • MCP Endpoints (for AI assistance):
    • http://localhost:8000/mcp - HTTP transport
    • http://localhost:8000/sse - SSE transport
  • API Docs: http://localhost:8000/docs
  • Health Check: http://localhost:8000/health

Available MCP Tools

  • search_text - Web text searches
  • search_images - Image searches
  • search_news - News searches
  • search_videos - Video searches
  • search_books - Book searches

Typical configuration

{
  "mcpServers": {
    "ddgs-search": {
      "url": "http://localhost:8000/sse",
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Go To TOP


Install

pip install -U ddgs

CLI version

ddgs --help

Go To TOP

Engines

| DDGS function | Available backends | | --------------|:-------------------| | text() | bing, brave, duckduckgo, google, grokipedia, mojeek, yandex, yahoo, wikipedia| | images() | duckduckgo | | videos() | duckduckgo | | news() | bing, duckduckgo, yahoo | | books() | annasarchive |

Go To TOP

DDGS class

DDGS class is lazy-loaded.

class DDGS:
    """Dux Distributed Global Search. A metasearch library that aggregates results from diverse web search services.

    Args:
        proxy (str, optional): proxy for the HTTP client, supports http/https/socks5 protocols.
            example: "http://user:pass@example.com:3128". Defaults to None.
        timeout (int, optional): Timeout value for the HTTP client. Defaults to 5.
        verify: (bool | str):  True to verify, False to skip, or a str path to a PEM file. Defaults to True.
    """

Here is an example of initializing the DDGS class.

from ddgs import DDGS

results = DDGS().text("python programming", max_results=5)
print(results)

Go To TOP

1. text()

def text(
    query: str,
    region: str = "us-en",
    safesearch: str = "moderate",
 ...