0.5.0 • Published 6 years ago

qwant-api v0.5.0

Weekly downloads
57
License
Apache-2.0
Repository
github
Last release
6 years ago

Qwant API

:information_source: About

Qwant provides an unofficial, free and limit-less search API. This library aims to provide a fully featured wrapper for it.

The unofficial documentation of Qwant's API can be found in the DOCUMENTATION.md file

:postbox: NPM

npm.io

:wrench: Installation

npm i qwant-api

:white_check_mark: Features

Qwant Feature support

webimagesnewssocialvideosmusic
:heavy_check_mark::heavy_check_mark::heavy_check_mark::heavy_check_mark::heavy_check_mark::heavy_check_mark:
  • Error handling
  • Multiple Languages

:bulb: Usage

Search:

qwant.search(<category>, { <options> }, <callback>{ /*...*/ });

Returns search results

Categories:

  • web
  • images
  • news
  • social
  • videos
  • music

Options:

OptionRequiredTypeDefaultExplanation
queryYesstringnoneThe term(s) to search
countNointeger1The amount of results
offsetNointeger0The index of the first result
languageNostringenglishThe language for the search

Example:

var qwant = require("qwant-api");

qwant.search("web", { query: "test", count: 10, offset: 1, language: "german" }, function(err, data){
    if (err) return console.log(err);
    console.log(data);
});

Languages:

qwant.getLanguages(<options>);

Returns a list of supported languages

Options:

OptionRequiredTypeDefaultExplanation
list codesNobooleanfalseList languages and language codes

Example:

var qwant = require("qwant-api");

var languages = qwant.getLanguages();

console.log(languages);
// => ['english', 'german', 'french', 'welsh', 'scottish', ... ]

var languagesAndCodes = qwant.getLanguages(true);

console.log(languagesAndCodes);
// => { english: 'en_en', german: 'de_de', french: 'fr_fr', ... }

:nut_and_bolt: Dependencies

:clipboard: TODO:

Everything.

:copyright: Copyright & Disclaimer

Copyright (c) 2018 NullDev

This is NOT an official API Wraper for Qwant.

0.5.0

6 years ago

0.4.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago