searx/admin/api.html

200 lines
13 KiB
HTML
Raw Normal View History

2019-12-30 18:31:17 +01:00
<!DOCTYPE html>
2016-07-09 22:32:57 +02:00
2020-06-19 11:15:15 +02:00
<html>
2016-07-09 22:32:57 +02:00
<head>
2019-12-30 18:31:17 +01:00
<meta charset="utf-8" />
2020-09-30 10:35:05 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2019-12-30 18:31:17 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Administration API &#8212; Searx Documentation (Searx-1.0.0.tex)</title>
2016-07-09 22:32:57 +02:00
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
2020-02-15 10:08:58 +01:00
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
2016-11-04 21:56:14 +01:00
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
2019-12-30 18:31:17 +01:00
<link rel="next" title="Architecture" href="architecture.html" />
2020-01-06 15:33:58 +01:00
<link rel="prev" title="settings.yml" href="settings.html" />
2019-12-30 18:31:17 +01:00
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
2016-07-09 22:32:57 +02:00
2019-12-30 18:31:17 +01:00
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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>
2019-12-30 18:31:17 +01:00
<li class="right" >
<a href="architecture.html" title="Architecture"
accesskey="N">next</a> |</li>
<li class="right" >
2020-01-06 15:33:58 +01:00
<a href="settings.html" title="settings.yml"
2019-12-30 18:31:17 +01:00
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li>
2020-09-30 10:35:05 +02:00
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Administration API</a></li>
2019-12-30 18:31:17 +01:00
</ul>
</div>
2016-07-09 22:32:57 +02:00
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="administration-api">
2016-07-09 22:32:57 +02:00
<span id="adminapi"></span><h1>Administration API<a class="headerlink" href="#administration-api" title="Permalink to this headline"></a></h1>
<div class="section" id="get-configuration-data">
2016-07-09 22:32:57 +02:00
<h2>Get configuration data<a class="headerlink" href="#get-configuration-data" title="Permalink to this headline"></a></h2>
2019-12-30 18:31:17 +01:00
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">GET</span> <span class="nn">/config</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
2016-07-09 22:32:57 +02:00
</pre></div>
</div>
<div class="section" id="sample-response">
2016-07-09 22:32:57 +02:00
<h3>Sample response<a class="headerlink" href="#sample-response" title="Permalink to this headline"></a></h3>
2019-12-30 18:31:17 +01:00
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;autocomplete&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
2016-11-04 21:56:14 +01:00
<span class="s2">&quot;map&quot;</span><span class="p">,</span>
<span class="s2">&quot;it&quot;</span><span class="p">,</span>
<span class="s2">&quot;images&quot;</span><span class="p">,</span>
2016-07-09 22:32:57 +02:00
<span class="p">],</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;default_locale&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="nt">&quot;default_theme&quot;</span><span class="p">:</span> <span class="s2">&quot;oscar&quot;</span><span class="p">,</span>
<span class="nt">&quot;engines&quot;</span><span class="p">:</span> <span class="p">[</span>
2016-07-09 22:32:57 +02:00
<span class="p">{</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
2016-11-04 21:56:14 +01:00
<span class="s2">&quot;map&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">],</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;openstreetmap&quot;</span><span class="p">,</span>
<span class="nt">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;osm&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">},</span>
<span class="p">{</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
2016-11-04 21:56:14 +01:00
<span class="s2">&quot;it&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">],</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;arch linux wiki&quot;</span><span class="p">,</span>
<span class="nt">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;al&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">},</span>
<span class="p">{</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
2016-11-04 21:56:14 +01:00
<span class="s2">&quot;images&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">],</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;google images&quot;</span><span class="p">,</span>
<span class="nt">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;goi&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">},</span>
<span class="p">{</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
2016-11-04 21:56:14 +01:00
<span class="s2">&quot;it&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">],</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;bitbucket&quot;</span><span class="p">,</span>
<span class="nt">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;bb&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">},</span>
<span class="p">],</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;instance_name&quot;</span><span class="p">:</span> <span class="s2">&quot;searx&quot;</span><span class="p">,</span>
<span class="nt">&quot;locales&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;de&quot;</span><span class="p">:</span> <span class="s2">&quot;Deutsch (German)&quot;</span><span class="p">,</span>
<span class="nt">&quot;en&quot;</span><span class="p">:</span> <span class="s2">&quot;English&quot;</span><span class="p">,</span>
<span class="nt">&quot;eo&quot;</span><span class="p">:</span> <span class="s2">&quot;Esperanto (Esperanto)&quot;</span><span class="p">,</span>
2016-07-09 22:32:57 +02:00
<span class="p">},</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;plugins&quot;</span><span class="p">:</span> <span class="p">[</span>
2016-07-09 22:32:57 +02:00
<span class="p">{</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;HTTPS rewrite&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">},</span>
<span class="p">{</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;Vim-like hotkeys&quot;</span>
2016-07-09 22:32:57 +02:00
<span class="p">}</span>
<span class="p">],</span>
2019-12-30 18:31:17 +01:00
<span class="nt">&quot;safe_search&quot;</span><span class="p">:</span> <span class="mi">0</span>
2016-07-09 22:32:57 +02:00
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="embed-search-bar">
2019-12-30 18:31:17 +01:00
<h2>Embed search bar<a class="headerlink" href="#embed-search-bar" title="Permalink to this headline"></a></h2>
<p>The search bar can be embedded into websites. Just paste the example into the
HTML of the site. URL of the searx instance and values are customizable.</p>
<div class="highlight-html notranslate"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">form</span> <span class="na">method</span><span class="o">=</span><span class="s">&quot;post&quot;</span> <span class="na">action</span><span class="o">=</span><span class="s">&quot;https://searx.me/&quot;</span><span class="p">&gt;</span>
<span class="c">&lt;!-- search --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;q&quot;</span> <span class="p">/&gt;</span>
<span class="c">&lt;!-- categories --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;categories&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;general,social media&quot;</span> <span class="p">/&gt;</span>
<span class="c">&lt;!-- language --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;lang&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;all&quot;</span> <span class="p">/&gt;</span>
<span class="c">&lt;!-- locale --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;locale&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;en&quot;</span> <span class="p">/&gt;</span>
<span class="c">&lt;!-- date filter --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;time_range&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;month&quot;</span> <span class="p">/&gt;</span>
<span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span>
2016-09-06 18:22:37 +02:00
</pre></div>
</div>
</div>
</div>
2016-07-09 22:32:57 +02:00
2020-09-30 10:35:05 +02:00
<div class="clearer"></div>
2016-07-09 22:32:57 +02:00
</div>
</div>
</div>
2019-12-30 18:31:17 +01:00
<span id="sidebar-top"></span>
2016-07-09 22:32:57 +02:00
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
2019-12-30 18:31:17 +01:00
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
2020-09-30 10:35:05 +02:00
<li><a href="https://github.com/searx/searx">Source</a>
2019-12-30 18:31:17 +01:00
2020-09-30 10:35:05 +02:00
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
2019-12-30 18:31:17 +01:00
<li><a href="https://searx.space">Public instances</a>
2019-12-30 18:31:17 +01:00
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
<li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
2019-12-30 18:31:17 +01:00
</ul><h3>Navigation</h3>
2016-07-09 22:32:57 +02:00
<ul>
2019-12-30 18:31:17 +01:00
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
2020-01-06 15:33:58 +01:00
<li>Previous: <a href="settings.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a>
2019-12-30 18:31:17 +01:00
<li>Next: <a href="architecture.html" title="next chapter">Architecture</a></ul>
</li>
</ul>
</li>
2016-07-09 22:32:57 +02:00
</ul>
2019-12-30 18:31:17 +01:00
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
2016-07-09 22:32:57 +02:00
</div>
2020-02-15 10:08:58 +01:00
<script>$('#searchbox').show(0);</script>
2016-07-09 22:32:57 +02:00
</div>
</div>
<div class="clearer"></div>
</div>
2019-12-30 18:31:17 +01:00
<div class="footer" role="contentinfo">
2020-02-20 19:32:55 +01:00
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.5.3.
2016-07-09 22:32:57 +02:00
</div>
2020-02-15 10:08:58 +01:00
<script src="../_static/version_warning_offset.js"></script>
2019-12-30 18:31:17 +01:00
2016-07-09 22:32:57 +02:00
</body>
</html>