qwant_api 0.1.0 copy "qwant_api: ^0.1.0" to clipboard
qwant_api: ^0.1.0 copied to clipboard

outdated

Unofficial api for helping using qwant's search

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/

Features #

WEB NEWS IMAGES VIDEOS SOCIAL MUSIC
included included included included included not included
qwantApi.searchWeb qwantApi.searchNews qwantApi.searchImages qwantApi.searchVideos qwantApi.searchSocial

Supported languages #

enum Language {
    ENGISH,
    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 Type Result's type
WEB QWWebResult
NEWS QWNewsResult
IMAGES QWImageResult
VIDEOS QWVideoResult
SOCIAL QWSocialResult
Parameter Required Type Description
query Yes String Words to search
count No int Number of items to search (currently it seems to be limited to 50 by Qwant's API)
offset No int Index of the first items to fetch (for pagination)
language No Language Language 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
0
pub points
0%
popularity

Publisher

unverified uploader

Unofficial api for helping using qwant's search

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on qwant_api