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!
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'
}
},
...
]
}
*/
import { search, SafeSearchType } from 'duck-duck-scrape';
// import * as DDG from 'duck-duck-scrape';
const searchResults = await search('node.js', {
safeSearch: SafeSearchType.STRICT
});
The query to search
The region to search as
The options of the HTTP request
Autocomplete terms
Search something.
The query to search with
The options of the search
The options of the HTTP request
Search results
Search images.
The query to search with
The options of the search
The options of the HTTP request
Search results
Search news articles.
The query to search with
The options of the search
The options of the HTTP request
Search results
Search videos.
The query to search with
The options of the search
The options of the HTTP request
Search results
Get the currency conversion between two currencies. Data provided by XE.
The currency to convert from
The currency to convert to
The amount of currency to convert
The options for the HTTP request
The currency result
Get audio of the word being said. Data provided by Wordnik.
The word to define
The options for the HTTP request
The dictionary audio result
Get definitions of a word. Data provided by Wordnik.
The word to define
The options for the HTTP request
The dictionary definition result
Get word syllables. Data provided by Wordnik.
The word to define
The options for the HTTP request
The dictionary hyphenation result
Get text pronunciations of a word. Data provided by Wordnik.
The word to define
The options for the HTTP request
The dictionary pronunciation result
Get DNS records of a domain. Data provided by ViewDNS.info.
The type of DNS record to retrieve
The options for the HTTP request
The dns result
Get information on an emoji. Data provided by Emojipedia.
The emoji to use
The options for the HTTP request
The emojipedia result
Expand a shortened link. Data provided by Unshorten.me.
The URL to unshorten
The options for the HTTP request
The expandUrl result
Get the forecast of a location. Returns null
if there are no results.
Data provided by Dark Sky and other sources.
The query to search with
The locale to give the summaries in
The options for the HTTP request
The forecast result
Search statistics. Data provided by Statista.
The query to search with
The options for the HTTP request
The statista result
Get the stocks of a symbol. Data provided by Xignite.
What symbol to get stats from
The options for the HTTP request
The stocks result
Get synonyms and antonyms of a word. Data provided by Big Huge Thesaurus.
The word to define
The options for the HTTP request
The thesaurus result
Search the time of locations with a query. Data provided by TimeAndDate.com.
The query to search with
The options of the HTTP request
The time result
Get the VQD of a search query.
The query to search
The type(?) of search
The options of the HTTP request
The VQD
Generated using TypeDoc
Get auto-complete terms from a query.