Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/NullDev/qwant-api
:crystal_ball: Unofficial API wrapper for qwant
https://github.com/NullDev/qwant-api
api api-client api-wrapper hacktoberfest hacktoberfest2022 javascript js nodejs nulldev qwant rest rest-api restful restful-api wrapper
Last synced: 3 months ago
JSON representation
:crystal_ball: Unofficial API wrapper for qwant
- Host: GitHub
- URL: https://github.com/NullDev/qwant-api
- Owner: NullDev
- License: apache-2.0
- Created: 2017-12-07T12:28:43.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-13T12:48:28.000Z (over 2 years ago)
- Last Synced: 2023-09-20T12:45:39.408Z (about 1 year ago)
- Topics: api, api-client, api-wrapper, hacktoberfest, hacktoberfest2022, javascript, js, nodejs, nulldev, qwant, rest, rest-api, restful, restful-api, wrapper
- Language: JavaScript
- Homepage: https://qwant.com
- Size: 79.1 KB
- Stars: 31
- Watchers: 6
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Qwant API
Unofficial API wrapper for qwant## :information_source: About
[Qwant](http://qwant.com) 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](https://github.com/NullDev/qwant-api/blob/master/DOCUMENTATION.md) file
## :postbox: NPM
[![](https://nodei.co/npm/qwant-api.svg?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/qwant-api)
## :wrench: Installation
```Assembly
npm i qwant-api
```
## :white_check_mark: Features
Qwant Feature support
| web | images | news | social | videos | music |
| :---: | :---: | :---: | :---: | :---: | :---: |
| :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:
```javascript
qwant.search(, { }, { /*...*/ });
```Returns search results
**Categories:**
- web
- images
- news
- social
- videos
- music**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 |
| `language ` | No | string | english | The language for the search |**Example:**
```Javascript
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:
```javascript
qwant.getLanguages();
```Returns a list of supported languages
**Options:**
| Option | Required | Type | Default | Explanation |
|--------|----------|------|---------|-------------|
| list codes | No | boolean | false | List languages and language codes |**Example:**
```Javascript
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
- [request](https://www.npmjs.com/package/request)
## :clipboard: TODO:
Everything.
## :copyright: Copyright & Disclaimer
`Copyright (c) NullDev`
This is **NOT** an official API Wraper for [Qwant](http://qwant.com).