qwant_api 0.1.1
qwant_api: ^0.1.1

Dart native
Flutter Android iOS

An unofficial api for helping using Qwant's search. This package is for helping developers to make some queries with the Qwant's engine.

qwant-api-dart #

develop : Build Status master : Build Status


Description #

This library is built to help you to make some queries using Qwant's engine.

Inspired by https://github.com/NLDev/qwant-api . Created from templates made available by Stagehand under a BSD-style

license

Installation #

Check on https://pub.dev/

#pubspec.yaml
dependencies:
    qwant_api: ^0.1.1

Import :

import 'package:qwant_api/qwant_api.dart';

Features #

WEBNEWSIMAGESVIDEOSSOCIALMUSIC
includedincludedincludedincludedincludednot included
qwantApi.searchWebqwantApi.searchNewsqwantApi.searchImagesqwantApi.searchVideosqwantApi.searchSocial

Supported languages #

enum Language {
    ENGLISH,
    GERMAN,
    FRENCH,
    WELSH,
    SCOTTISH,
    CORSICAN,
    BRETON,
    SPANISH,
    CATALAN,
    BASQUE,
    ITALIAN,
    PORTUGUESE,
    DUTCH,
    RUSSIAN,
    POLISH,
    GREEK,
    FINNISH,
    BULGARIAN,
    JAPANES,
    MALAY,
    HEBREW,
    TURKISH,
    CZECH,
    ESTONIAN,
    HUNGARIAN,
    ROMANIAN,
    DANISH,
    NORWEGIAN,
    SWEDISH,
    KOREAN,
    THAI
}

How to use it #

Example #


import 'package:qwant_api/qwant_api.dart';

void main() async {
    // Instantiate the api
    var qwantApit = QwantApi();
    // Then perform an async search
    var result1 = await qwantApit.searchWeb('test');
    var result2 = await qwantApit.searchWeb('test', count: 2, language: Language.ENGISH);
}

It will return a value of type QWSearchResult<T extends QWResult> where QWResult could be one of the following types depending on the search:

Search TypeResult's type
WEBQWWebResult
NEWSQWNewsResult
IMAGESQWImageResult
VIDEOSQWVideoResult
SOCIALQWSocialResult
ParameterRequiredTypeDescription
queryYesStringWords to search
countNointNumber of items to search (currently it seems to be limited to 50 by Qwant's API)
offsetNointIndex of the first items to fetch (for pagination)
languageNoLanguageLanguage for the search

Important notes #

According to NLDev/qwant-api, there are some limitations. After some queries a captcha should be filled.

I didn't reach this limit so no helper has been provided to catch this behavior yet.

2
likes
90
pub points
0%
popularity

An unofficial api for helping using Qwant's search. This package is for helping developers to make some queries with the Qwant's engine.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

zemoa@netc.fr

License

BSD (LICENSE)

More

Packages that depend on qwant_api