api.html 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>Administration API &#8212; searx 0.12.0 documentation</title>
  8. <link rel="stylesheet" href="../_static/style.css" type="text/css" />
  9. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  10. <script type="text/javascript" src="../_static/documentation_options.js"></script>
  11. <script type="text/javascript" src="../_static/jquery.js"></script>
  12. <script type="text/javascript" src="../_static/underscore.js"></script>
  13. <script type="text/javascript" src="../_static/doctools.js"></script>
  14. <link rel="index" title="Index" href="../genindex.html" />
  15. <link rel="search" title="Search" href="../search.html" />
  16. <link rel="next" title="How to protect an instance" href="filtron.html" />
  17. <link rel="prev" title="Installation" href="../dev/install/installation.html" />
  18. <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
  19. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
  20. </head><body>
  21. <div class="document">
  22. <div class="documentwrapper">
  23. <div class="bodywrapper">
  24. <div class="body" role="main">
  25. <div class="section" id="administration-api">
  26. <span id="adminapi"></span><h1>Administration API<a class="headerlink" href="#administration-api" title="Permalink to this headline">¶</a></h1>
  27. <div class="section" id="get-configuration-data">
  28. <h2>Get configuration data<a class="headerlink" href="#get-configuration-data" title="Permalink to this headline">¶</a></h2>
  29. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span><span class="n">config</span>
  30. </pre></div>
  31. </div>
  32. <div class="section" id="sample-response">
  33. <h3>Sample response<a class="headerlink" href="#sample-response" title="Permalink to this headline">¶</a></h3>
  34. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  35. <span class="s2">&quot;autocomplete&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
  36. <span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
  37. <span class="s2">&quot;map&quot;</span><span class="p">,</span>
  38. <span class="s2">&quot;it&quot;</span><span class="p">,</span>
  39. <span class="s2">&quot;images&quot;</span><span class="p">,</span>
  40. <span class="p">],</span>
  41. <span class="s2">&quot;default_locale&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
  42. <span class="s2">&quot;default_theme&quot;</span><span class="p">:</span> <span class="s2">&quot;oscar&quot;</span><span class="p">,</span>
  43. <span class="s2">&quot;engines&quot;</span><span class="p">:</span> <span class="p">[</span>
  44. <span class="p">{</span>
  45. <span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
  46. <span class="s2">&quot;map&quot;</span>
  47. <span class="p">],</span>
  48. <span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
  49. <span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;openstreetmap&quot;</span><span class="p">,</span>
  50. <span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;osm&quot;</span>
  51. <span class="p">},</span>
  52. <span class="p">{</span>
  53. <span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
  54. <span class="s2">&quot;it&quot;</span>
  55. <span class="p">],</span>
  56. <span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
  57. <span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;arch linux wiki&quot;</span><span class="p">,</span>
  58. <span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;al&quot;</span>
  59. <span class="p">},</span>
  60. <span class="p">{</span>
  61. <span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
  62. <span class="s2">&quot;images&quot;</span>
  63. <span class="p">],</span>
  64. <span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
  65. <span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;google images&quot;</span><span class="p">,</span>
  66. <span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;goi&quot;</span>
  67. <span class="p">},</span>
  68. <span class="p">{</span>
  69. <span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
  70. <span class="s2">&quot;it&quot;</span>
  71. <span class="p">],</span>
  72. <span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
  73. <span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;bitbucket&quot;</span><span class="p">,</span>
  74. <span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;bb&quot;</span>
  75. <span class="p">},</span>
  76. <span class="p">],</span>
  77. <span class="s2">&quot;instance_name&quot;</span><span class="p">:</span> <span class="s2">&quot;searx&quot;</span><span class="p">,</span>
  78. <span class="s2">&quot;locales&quot;</span><span class="p">:</span> <span class="p">{</span>
  79. <span class="s2">&quot;de&quot;</span><span class="p">:</span> <span class="s2">&quot;Deutsch (German)&quot;</span><span class="p">,</span>
  80. <span class="s2">&quot;en&quot;</span><span class="p">:</span> <span class="s2">&quot;English&quot;</span><span class="p">,</span>
  81. <span class="s2">&quot;eo&quot;</span><span class="p">:</span> <span class="s2">&quot;Esperanto (Esperanto)&quot;</span><span class="p">,</span>
  82. <span class="p">},</span>
  83. <span class="s2">&quot;plugins&quot;</span><span class="p">:</span> <span class="p">[</span>
  84. <span class="p">{</span>
  85. <span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
  86. <span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;HTTPS rewrite&quot;</span>
  87. <span class="p">},</span>
  88. <span class="p">{</span>
  89. <span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
  90. <span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;Vim-like hotkeys&quot;</span>
  91. <span class="p">}</span>
  92. <span class="p">],</span>
  93. <span class="s2">&quot;safe_search&quot;</span><span class="p">:</span> <span class="mi">0</span>
  94. <span class="p">}</span>
  95. </pre></div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="section" id="embed-search-bar">
  101. <h1>Embed search bar<a class="headerlink" href="#embed-search-bar" title="Permalink to this headline">¶</a></h1>
  102. <p>The search bar can be embedded into websites. Just paste the example into the HTML of the site.
  103. URL of the searx instance and values are customizable.</p>
  104. <div class="code html highlight-default notranslate"><div class="highlight"><pre><span></span>&lt;form method=&quot;post&quot; action=&quot;https://searx.me/&quot;&gt;
  105. &lt;!-- search query --&gt; &lt;input type=&quot;text&quot; name=&quot;q&quot; /&gt;
  106. &lt;!-- categories --&gt; &lt;input type=&quot;hidden&quot; name=&quot;categories&quot; value=&quot;general,social media&quot; /&gt;
  107. &lt;!-- language --&gt; &lt;input type=&quot;hidden&quot; name=&quot;lang&quot; value=&quot;all&quot; /&gt;
  108. &lt;!-- locale --&gt; &lt;input type=&quot;hidden&quot; name=&quot;locale&quot; value=&quot;en&quot; /&gt;
  109. &lt;!-- date filter --&gt; &lt;input type=&quot;hidden&quot; name=&quot;time_range&quot; value=&quot;month&quot; /&gt;
  110. &lt;/form&gt;
  111. </pre></div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  118. <div class="sphinxsidebarwrapper">
  119. <h3><a href="../index.html">Table Of Contents</a></h3>
  120. <ul>
  121. <li><a class="reference internal" href="#">Administration API</a><ul>
  122. <li><a class="reference internal" href="#get-configuration-data">Get configuration data</a><ul>
  123. <li><a class="reference internal" href="#sample-response">Sample response</a></li>
  124. </ul>
  125. </li>
  126. </ul>
  127. </li>
  128. <li><a class="reference internal" href="#embed-search-bar">Embed search bar</a></li>
  129. </ul>
  130. <div class="sidebar_container body">
  131. <h1>Searx</h1>
  132. <ul>
  133. <li><a href="../index.html">Home</a></li>
  134. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  135. <li><a href="../blog/blog.html">Blog</a></li>
  136. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  137. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  138. </ul>
  139. <hr />
  140. <ul>
  141. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  142. </ul>
  143. </div>
  144. <div role="note" aria-label="source link">
  145. <h3>This Page</h3>
  146. <ul class="this-page-menu">
  147. <li><a href="../_sources/admin/api.rst.txt"
  148. rel="nofollow">Show Source</a></li>
  149. </ul>
  150. </div>
  151. <div id="searchbox" style="display: none" role="search">
  152. <h3>Quick search</h3>
  153. <div class="searchformwrapper">
  154. <form class="search" action="../search.html" method="get">
  155. <input type="text" name="q" />
  156. <input type="submit" value="Go" />
  157. <input type="hidden" name="check_keywords" value="yes" />
  158. <input type="hidden" name="area" value="default" />
  159. </form>
  160. </div>
  161. </div>
  162. <script type="text/javascript">$('#searchbox').show(0);</script>
  163. </div>
  164. </div>
  165. <div class="clearer"></div>
  166. </div>
  167. <div class="footer">
  168. &copy; Copyright 2015-2017, Adam Tauber.
  169. </div>
  170. </body>
  171. </html>