1.0.2 • Published 7 years ago

ddg-scraper v1.0.2

Weekly downloads
18
License
MIT
Repository
github
Last release
7 years ago

DuckDuckGo Scaper for NodeJS

Requires Node >=4.0.0.

Installation

npm install ddg-scraper

Example

const ddg = require('ddg-scraper')

ddg.search({
  q: 'Albert Einstein',
  max: 5
}, (err, urls) => {
  if (!err) {
    console.log(urls)
  }
})

Usage

Functions

ddg.search(opts, callback)

opts - Object

  • q - String (required): Your search query
  • max - Integer (optional): Maximum number of results
  • See https://duckduckgo.com/params for more optional params

callback - Function (required) : Called with (err, info) once the request has completed. err contains an error, if any, and info is an array of string urls.

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago