A comprehensive package for searching the web and fetching web content programmatically, through a CLI interface, or through a Model Context Protocol (MCP) server.
Search the web using DuckDuckGo with browser automation, captcha handling, anti-detection measures, and JavaScript rendering support.
Fetch and parse content from web pages with intelligent HTML-to-Markdown conversion, metadata extraction, and comprehensive error handling.
Model Context Protocol server with both stdio and HTTP (SSE) transport support for seamless AI assistant integration.
Interactive command line interface with colorful output, resource management, and engaging user experience.
Conservative rate management with browser automation timing to respect server resources and avoid detection.
Full TypeScript support with comprehensive type definitions, enhanced interfaces, and excellent developer experience.
Install globally for CLI and MCP usage:
npm install -g @lucid-spark/ddg-web-search
Install locally in your project:
npm install @lucid-spark/ddg-web-search
Use it without installing it:
npx @lucid-spark/ddg-web-search
# Search the web with browser automation
ddg-web-search search "TypeScript tutorials"
# Fetch content with intelligent parsing
ddg-web-search fetch https://example.com
# Start interactive mode
ddg-web-search interactive
# Start MCP server (stdio transport)
ddg-web-search mcp
# Start MCP server (HTTP transport)
ddg-web-search mcp-http
# Show help
ddg-web-search help
# Start MCP server with stdio transport
ddg-web-search-mcp
# Start with HTTP transport
node dist/mcp.js --transport http --port 3001
# Add to Claude Desktop config
{
"mcpServers": {
"ddg-web-search": {
"command": "@lucid-spark/ddg-web-search-mcp",
"args": [],
"env": {}
}
}
}
import { WebSearcher, WebContentFetcher } from "@lucid-spark/ddg-web-search";
const searcher = new WebSearcher();
const fetcher = new WebContentFetcher();
// Search the web with browser automation
const results = await searcher.search("TypeScript");
// Fetch web content with intelligent parsing
const content = await fetcher.fetch("https://example.com");
// Important: cleanup browser resources
await searcher.close();
search(query: string): Promise<SearchResult[]>
Search the web using DuckDuckGo with browser automation with captcha handling
fetch(url: string): Promise<FetchResult>
Fetch and parse content with intelligent HTML-to-Markdown conversion
interactive(): Promise<void>
Start interactive command-line interface with resource management
run(): Promise<void>
Start MCP server with stdio or HTTP transport for AI assistant integration
Install the package and start searching the web in your TypeScript projects today!