npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@overclockedsenku/duckduckjs

v26.1.0

Published

A fast, modular search engine scraper for Deno and Node.js.

Readme

DuckDuckJS

DuckDuckJS is a performance-oriented, Deno-first meta-search engine library and command-line tool. It provides a unified TypeScript interface to aggregate search results from multiple providers by utilizing efficient HTML fallbacks and internal JSON APIs, bypassing the need for heavy browser automation or complex frontend execution.

The project is currently in a fast-moving beta state. Architectural changes may occur as we expand engine support and server capabilities.


Features

  • Modular Engine Architecture: A plug-and-play system for adding or swapping search providers.
  • Multi-Media Support: Native handling for Text, Image, Video, and News search results.
  • Resilient Scrape Logic: Uses optimized endpoints to minimize rate-limiting and maximize speed.
  • Zero-Config CLI: Highly typed interface with support for pretty-printed terminal output or raw JSON for piping.
  • Standalone Binaries: Cross-compiled executables for Linux, macOS, and Windows.

Quickstart

Running with Deno

For immediate use without installation, use the Deno runtime:

# Basic text search
deno run --allow-net src/cli.ts "search query"

# Search for images in a specific region
deno run --allow-net src/cli.ts "concept art" -T image -r us-en

# Search news from the past week
deno run --allow-net src/cli.ts "tech headlines" -T news -t w

Using Compiled Binaries

If you have downloaded a release binary, you can run it directly:

./duckduckjs "search query" --json

Options

  • -T, --type: text (default), image, video, news
  • -p, --page: pagination offset
  • -t, --time: time filter (d, w, m, y)
  • -r, --region: region code (default: us-en)
  • -j, --json: output raw JSON

DuckDuckJS uses a strict Object-Oriented approach. All engines extend a base class, ensuring a consistent contract for your applications.

Setup

Import the specific engine you need from the library:

import { DuckDuckGoEngine } from "./src/engines/duckduckgo.ts";
import { BraveEngine } from "./src/engines/brave.ts";

const ddg = new DuckDuckGoEngine();

// Execute a standard search
const results = await ddg.search("Deno development", {
  timeLimit: "w",
  page: 1,
});

// Access media-specific endpoints
const images = await ddg.images("mountain landscapes");

Interfaces

The library provides standardized result shapes for all engines:

  • TextResult: { type: "text", title, href, body }
  • ImageResult: { type: "image", title, image, thumbnail, url, width, height, source }
  • VideoResult: { type: "video", title, description, content, duration, publisher }
  • NewsResult: { type: "news", date, title, body, url, image, source }

Roadmap

This project is evolving from a simple scraper into a comprehensive search infrastructure tool.

  • [x] Base SearchEngine Architecture and Interfaces
  • [x] DuckDuckGo Core Implementation (Text, Images, Videos, News)
  • [x] Brave Search Engine Implementation
  • [x] Multi-platform CLI Tool
  • [ ] DuckDuckGo AI Chat (Accessing Llama/Claude endpoints)
  • [ ] Integration of Bing, Google, and Mojeek engines
  • [ ] Hono-based HTTP/REST Server wrapper
  • [ ] MCP (Model Context Protocol) Server for AI Agent tooling

Development and Branching

Development occurs on the main branch. Stable releases are branched using a Year.Patch format (e.g., 26.0.0, 26.1.0).

To contribute, ensure your code passes the built-in quality checks:

deno fmt
deno lint
deno task test:integration

Credits and Transparency

  • Inspiration: Architecturally modeled after the Python library ddgs by deedy5.
  • Author: Developed and maintained by @overclockedsenku (Raj Dave).
  • AI Disclosure: The core logic, reverse-engineering of endpoints, and architectural flow are human-authored. AI was utilized as a pair-programmer for code enhancement, documentation formatting, and JSDoc generation.

License

Licensed under the Apache License, Version 2.0. Attribution to the original author is required for any redistributed or modified versions of the software.


Disclaimer

DuckDuckJS is intended for educational and developmental purposes. Web scraping utilizes undocumented internal APIs which are subject to change without notice. Users are responsible for adhering to the terms of service and rate limits of the respective search providers.