Nationwide Polamorous Matrimony

    duck-duck-scrape
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.0 • Public • Published

    NPM version NPM downloads ESLint status DeepScan grade

    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
    });
    
    // 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'
          }
        },
        ...
      ]
    }
    
    */

    TypeScript

    import { search, SafeSearchType } from 'duck-duck-scrape';
    // import * as DDG from 'duck-duck-scrape';
    
    const searchResults = await search('node.js', {
      safeSearch: SafeSearchType.STRICT
    });

    Install

    npm i duck-duck-scrape

    DownloadsWeekly Downloads

    76,668

    Version

    2.2.0

    License

    MIT

    Unpacked Size

    153 kB

    Total Files

    65

    Last publish

    Collaborators

    • snazzah