Socket
Socket
Sign inDemoInstall

duck-duck-scrape

Package Overview
Dependencies
70
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    duck-duck-scrape

Search from DuckDuckGo and use it's spice APIs.


Version published
Weekly downloads
1.5K
decreased by-51.68%
Maintainers
1
Install size
1.16 MB
Created
Weekly downloads
 

Changelog

Source

[2.2.5] - 2023-12-04

Fixed:

  • Added request anomaly detection (#135)

Readme

Source

NPM version NPM downloads ESLint status DeepScan grade

npm install duck-duck-scrape - yarn add duck-duck-scrape

Search from DuckDuckGo and utilize its spice APIs for things such as stocks, weather, currency conversion and more!

Available Features

  • Search
    • Regular search
    • Image search
    • Video search
    • News search
  • Stocks (via Xignite)
  • Time for Location API (via timeanddate.com)
  • Currency Conversion (via XE)
  • Forecast (via Dark Sky)
  • Dictionary
    • Definition
    • Audio
    • Pronunciation
    • Hyphenation

Quickstart

JavaScript
const DDG = require('duck-duck-scrape');
const searchResults = await DDG.search('node.js', {
  safeSearch: DDG.SafeSearchType.STRICT
});

// DDG.stocks('aapl')
// DDG.currency('usd', 'eur', 1)
// DDG.dictionaryDefinition('happy')

console.log(searchResults);
/**

{
  noResults: false,
  vqd: '3-314...',
  results: [
    {
      title: 'Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript...',
      ...
      url: 'https://nodejs.org/',
      bang: {
        prefix: 'node',
        title: 'node.js docs',
        domain: 'nodejs.org'
      }
    },
    ...
  ]
}

*/
TypeScript
import { search, SafeSearchType } from 'duck-duck-scrape';
// import * as DDG from 'duck-duck-scrape';

const searchResults = await search('node.js', {
  safeSearch: SafeSearchType.STRICT
});

Keywords

FAQs

Last updated on 04 Dec 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc