Package Exports
- qwant-api
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (qwant-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Qwant API
![]()
Unofficial API wrapper for qwant
ℹ️ About
Qwant provides an unofficial, free and limit-less search API. This library aims to provide a fully featured wrapper for it.
📮 NPM
🔧 Installation
npm i qwant-api✅ Features
Qwant Feature support
| web | images | news | social |
|---|---|---|---|
| ✔️ | ✔️ | ✔️ | ✔️ |
💡 Usage
Search:
qwant.search(<category>, { <options> }, <callback>{ /*...*/ });Returns search results
Categories:
- web
- images
- news
- social
Options:
| Option | Required | Type | Default | Explanation |
|---|---|---|---|---|
query |
Yes | string | none | The term(s) to search |
count |
no | integer | 1 | The amount of results |
offset |
no | integer | 0 | The index of the first result |
Example:
var qwant = require("qwant-api");
qwant.search("web", { query: "test", count: 10, offset: 1 }, function(err, data){
if (err) return console.log(err);
console.log(data);
});Languages:
qwant.getLanguages(<options>);Returns a list of supported languages
Options:
| Option | Required | Type | Default | Explanation |
|---|---|---|---|---|
| list codes | No | boolean | false | List 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', ... }
🔩 Dependencies
📋 TODO:
Everything.
©️ Copyright & Disclaimer
Copyright (c) 2017 NullDev
This is NOT an official API Wraper for Qwant.