Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-duckduckgo

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-duckduckgo

DuckDuckGo client for node

  • 2.0.18
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42
increased by950%
Maintainers
1
Weekly downloads
 
Created
Source

Yet another node lib for requesting Duck Duck Go.

This one has been written in typescript (2.x or above) and can be used by javascript (es2018 or above) software or by typescript software.

Examples

async function get() {
  try {
    const result = await duckIt('bart simpsons');
    console.log(result.data.AbstractText);
  } catch (err) {
    console.error('oups', err);
  }
}

API

  • duckIt uses axios and return an AxiosResponse:
const result = await duckIt('bart simpsons');
  • duckIt can be called with an options object, eahc item is optional:
    • appName: an application name, default node-duckduckgo
    • format: received format data, possible values: 'json' or 'xml', default 'json'
    • parentalFilter: parental filter activated or not, possible values 'Activated', 'Moderate' and 'Deactivated', default: 'Activated'
    • noRedirect: boolean, true to skip HTTP redirects
    • noHtml: boolean, true to remove HTML from text
    • skipDisambig: boolean, true to skip disambiguation (for information about this options see Duck Duck GO API documentation

example:

const result = await duckIt('bart simpsons', { noHtml: true, parentalFilter: 'Moderate' });

Usage

node-duckduckgo (this lib) is open sources (MIT license) but to use Duck Duck Go results you need to follow Duck Duck Go's Terms and Conditions. Please read this page before any usage.

2.x

This major release offers a completly different interface than 1.x. You may continue to use 1.X but as it won't evolve anymore, your advise to migrate to 2.X.

Keywords

FAQs

Package last updated on 16 Oct 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc