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

duck-duck-scrape

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duck-duck-scrape

A DuckDuckGo scraper for Node.js.

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
decreased by-23.98%
Maintainers
2
Weekly downloads
 
Created
Source

duck-duck-scrape

A DuckDuckGo scraper NPM module

Note: This isn't endorsed by DuckDuckGo in any way.

NPM

Installation

npm install --save duck-duck-scrape

Setup

const DuckDuckScrape = require("duck-duck-scrape");
const ddg = new DuckDuckScrape();
 1 = Safe
-1 = Moderate
-2 = Off

For non-search functions safe search is a boolean

Functions

  //Search 
  ddg.search(query<String>, safe<Integer>, locale<locale string>) // returns a Promise
  
  //Autocomplete
  ddg.query(query<String>) // returns a Promise
  
  //Image Search (unstable, not sure why)
  ddg.image(query<String>, safe<Boolean>, locale<locale string>) // returns a Promise
  
  //Video Search
  ddg.video(query<String>, safe<Boolean>, locale<locale string>) // returns a Promise
  
  //Amazon Search
  ddg.amazon(query<String>, safe<Boolean>) // returns a Promise
  
  //Twitter Search
  ddg.twitter(handle<String>) // returns a Promise

Example

ddg.autocomplete("how to convert to ").then((value) => { console.log(value[0].phrase); }); // "how to convert to pdf"

Keywords

FAQs

Package last updated on 07 Apr 2018

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