# qwant-api

> Unofficial API Wrapper for QWANT

Latest version **0.5.0** (published 2018-10-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install qwant-api
pnpm add qwant-api
yarn add qwant-api
bun add qwant-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2018-10-09 |
| First published | 2017-12-07 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 21.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 44 |
| Author | NullDev |
| Maintainers | null_dev |
| Keywords | qwant, wrapper, API, REST, unofficial |

## Links

- npm: https://www.npmjs.com/package/qwant-api
- Repository: https://github.com/NLDev/qwant-api
- Homepage: https://github.com/NLDev/qwant-api#readme
- Issues: https://github.com/NLDev/qwant-api/issues
- npm.io page: https://npm.io/package/qwant-api

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.83.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.5.0 (latest) — 2018-10-09
- 0.4.1 — 2018-03-30
- 0.3.0 — 2017-12-07
- 0.2.0 — 2017-12-07
- 0.1.1 — 2017-12-07
- 0.1.0 — 2017-12-07

## README

# Qwant API

<p align="center">
<img height="150" width="auto" src="https://www.qwant.com/favicon.png" /><br>
Unofficial API wrapper for qwant
</p>

## :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/NLDev/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)

<hr>

## :wrench: Installation

```Assembly
npm i qwant-api
```

<hr>

## :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

<hr>

## :bulb: Usage

### Search:


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

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(<options>);
```

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', ... }

```

<hr>

## :nut_and_bolt: Dependencies

- [request](https://www.npmjs.com/package/request)

<hr>

## :clipboard: TODO:

Everything.

<hr>

## :copyright: Copyright & Disclaimer

`Copyright (c) 2018 NullDev`

This is **NOT** an official API Wraper for [Qwant](http://qwant.com).

---
_Source: https://npm.io/package/qwant-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
