summaryrefslogtreecommitdiff
path: root/dev/engines/online/qwant.html
blob: 1e418a2ee6c37729fc7a90a7b45f6f146305ecf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<!DOCTYPE html>

<html lang="en" data-content_root="../../../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Qwant &#8212; SearXNG Documentation (2025.1.6+6dab7fe78)</title>
    <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
    <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
    <script src="../../../_static/documentation_options.js?v=ef740023"></script>
    <script src="../../../_static/doctools.js?v=9a2dae69"></script>
    <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../../_static/describe_version.js?v=fa7f30d0"></script>
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="RadioBrowser" href="radio_browser.html" />
    <link rel="prev" title="Presearch Engine" href="presearch.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="radio_browser.html" title="RadioBrowser"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="presearch.html" title="Presearch Engine"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.6+6dab7fe78)</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Qwant</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="qwant">
<span id="qwant-engine"></span><h1>Qwant<a class="headerlink" href="#qwant" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id2">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.qwant">This engine uses the Qwant API (<a class="reference external" href="https://api.qwant.com/v3">https://api.qwant.com/v3</a>) to implement Qwant
-Web, -News, -Images and -Videos.  The API is undocumented but can be reverse
engineered by reading the network log of <a class="reference external" href="https://www.qwant.com/">https://www.qwant.com/</a> queries.</p>
<p>For Qwant’s <em>web-search</em> two alternatives are implemented:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">web</span></code>: uses the <a class="reference internal" href="#searx.engines.qwant.api_url" title="searx.engines.qwant.api_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_url</span></code></a> which returns a JSON structure</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">web-lite</span></code>: uses the <a class="reference internal" href="#searx.engines.qwant.web_lite_url" title="searx.engines.qwant.web_lite_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">web_lite_url</span></code></a> which returns a HTML page</p></li>
</ul>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following additional settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.qwant.qwant_categ" title="searx.engines.qwant.qwant_categ"><code class="xref py py-obj docutils literal notranslate"><span class="pre">qwant_categ</span></code></a></p></li>
</ul>
<p>This implementation is used by different qwant engines in the <a class="reference internal" href="../../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">settings.yml</span></a>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant</span>
<span class="w">  </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">web-lite</span><span class="w">  </span><span class="c1"># alternatively use &#39;web&#39;</span>
<span class="w">  </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant news</span>
<span class="w">  </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">news</span>
<span class="w">  </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant images</span>
<span class="w">  </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span>
<span class="w">  </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant videos</span>
<span class="w">  </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span>
<span class="w">  </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.qwant.parse_web_api">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">parse_web_api</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#parse_web_api"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.parse_web_api" title="Link to this definition"></a></dt>
<dd><p>Parse results from Qwant’s API</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.qwant.parse_web_lite">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">parse_web_lite</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#parse_web_lite"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.parse_web_lite" title="Link to this definition"></a></dt>
<dd><p>Parse results from Qwant-Lite</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.qwant.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.request" title="Link to this definition"></a></dt>
<dd><p>Qwant search request</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.qwant.api_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">api_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://api.qwant.com/v3/search/'</span></em><a class="headerlink" href="#searx.engines.qwant.api_url" title="Link to this definition"></a></dt>
<dd><p>URL of Qwant’s API (JSON)</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.qwant.max_page">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">5</span></em><a class="headerlink" href="#searx.engines.qwant.max_page" title="Link to this definition"></a></dt>
<dd><p>5 pages maximum (<code class="docutils literal notranslate"><span class="pre">&amp;p=5</span></code>): Trying to do more just results in an improper
redirect</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.qwant.qwant_categ">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">qwant_categ</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.qwant.qwant_categ" title="Link to this definition"></a></dt>
<dd><p>One of <code class="docutils literal notranslate"><span class="pre">web-lite</span></code> (or <code class="docutils literal notranslate"><span class="pre">web</span></code>), <code class="docutils literal notranslate"><span class="pre">news</span></code>, <code class="docutils literal notranslate"><span class="pre">images</span></code> or <code class="docutils literal notranslate"><span class="pre">videos</span></code></p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.qwant.web_lite_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">web_lite_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://lite.qwant.com/'</span></em><a class="headerlink" href="#searx.engines.qwant.web_lite_url" title="Link to this definition"></a></dt>
<dd><p>URL of Qwant-Lite (HTML)</p>
</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
  <span id="sidebar-top"></span>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  
    
            <p class="logo"><a href="../../../index.html">
              <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/>
            </a></p>
  

<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li>
<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li>
<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li>
<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>

  <h3>Project Links</h3>
  <ul>
    <li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
  
    <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
  
    <li><a href="https://searx.space">Public instances</a>
  
    <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
  </ul><h3>Navigation</h3>
<ul>
  <li><a href="../../../index.html">Overview</a>
    <ul>
      <li><a href="../../index.html">Developer documentation</a>
        <ul>
      <li><a href="../index.html">Engine Implementations</a>
        <ul>
          <li>Previous: <a href="presearch.html" title="previous chapter">Presearch Engine</a>
          <li>Next: <a href="radio_browser.html" title="next chapter">RadioBrowser</a></ul>
      </li></ul>
      </li>
    </ul>
  </li>
</ul>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/dev/engines/online/qwant.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer" role="contentinfo">
    &#169; Copyright SearXNG team.
    </div>
  </body>
</html>