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
});
console.log(searchResults);
TypeScript
import { search, SafeSearchType } from 'duck-duck-scrape';
const searchResults = await search('node.js', {
safeSearch: SafeSearchType.STRICT
});