DuckDuckGo Scaper for NodeJS
Requires Node >=4.0.0.
npm install ddg-scraperconst ddg = require('ddg-scraper')
ddg.search({
q: 'Albert Einstein',
max: 5
}, (err, urls) => {
if (!err) {
console.log(urls)
}
})opts - Object
q- String (required): Your search querymax- 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.