Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

@hammerhead/duckduckgosearch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hammerhead/duckduckgosearch

A DuckDuckGo search wrapper with text, images, videos, news, instant answers and related queries.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

🦆🔍 @hammerhead/duckduckgosearch

A simple Node.js wrapper for DuckDuckGo that supports text, images, videos, news, instant answers, and related searches.
Built with fetch + cheerio. No official API key required.

✨ Features

  • 📄 Text search with pagination
  • 🖼️ Image search with pagination
  • 🎬 Video search
  • 📰 News search with pagination
  • ⚡ Instant answers via DuckDuckGo's API
  • 🔗 Related searches

📦 Installation

pnpm add @hammerhead/duckduckgosearch
# or
npm install @hammerhead/duckduckgosearch

Usage

import DuckDuckGoSearch from "@hammerhead/duckduckgosearch";

const ddg = await DuckDuckGoSearch();

// 🔍 Text Search
const textResults = await ddg.text("nodejs", 2); // 2 pages
console.log(textResults);

// 🖼️ Image Search
const images = await ddg.images("cats", { page: 1, maxResults: 10 });
console.log(images);

// 🎬 Video Search
const videos = await ddg.videos("javascript tutorial", 5);
console.log(videos);

// 📰 News Search
const news = await ddg.news("AI technology", { page: 1, limit: 5 });
console.log(news);

// ⚡ Instant Answer
const instant = await ddg.instant("What is Node.js?");
console.log(instant);

// 🔗 Related Searches
const related = await ddg.related("open source");
console.log(related);

FAQs

Package last updated on 07 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts