123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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>Search 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="Plugins" href="plugins.html" />
  17. <link rel="prev" title="Engine overview" href="engine_overview.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="search-api">
  26. <h1>Search API<a class="headerlink" href="#search-api" title="Permalink to this headline">¶</a></h1>
  27. <p>The search supports both <code class="docutils literal notranslate"><span class="pre">GET</span></code> and <code class="docutils literal notranslate"><span class="pre">POST</span></code>.</p>
  28. <p>Furthermore, two enpoints <code class="docutils literal notranslate"><span class="pre">/</span></code> and <code class="docutils literal notranslate"><span class="pre">/search</span></code> are available for querying.</p>
  29. <p><code class="docutils literal notranslate"><span class="pre">GET</span> <span class="pre">/</span></code></p>
  30. <p><code class="docutils literal notranslate"><span class="pre">GET</span> <span class="pre">/search</span></code></p>
  31. <div class="section" id="parameters">
  32. <h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
  33. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">q</span>
  34. </pre></div>
  35. </div>
  36. <p>The search query. This string is passed to external search services.
  37. Thus, searx supports syntax of each search service. For example, <code class="docutils literal notranslate"><span class="pre">site:github.com</span> <span class="pre">searx</span></code> is a valid
  38. query for Google. However, if simply the query above is passed to any search engine which does not filter its
  39. results based on this syntax, you might not get the results you wanted.</p>
  40. <p>See more at <a class="reference internal" href="../user/search_syntax.html"><span class="doc">Search syntax</span></a></p>
  41. <p>Required.</p>
  42. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">categories</span>
  43. </pre></div>
  44. </div>
  45. <p>Comma separated list, specifies the active search categories</p>
  46. <p>Optional.</p>
  47. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">engines</span>
  48. </pre></div>
  49. </div>
  50. <p>Comma separated list, specifies the active search engines.</p>
  51. <p>Optional.</p>
  52. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">lang</span>
  53. </pre></div>
  54. </div>
  55. <p>Code of the language.</p>
  56. <p>Optional.</p>
  57. <p>Default: <code class="docutils literal notranslate"><span class="pre">all</span></code></p>
  58. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pageno</span>
  59. </pre></div>
  60. </div>
  61. <p>Search page number.</p>
  62. <p>Optional.</p>
  63. <p>Default: <code class="docutils literal notranslate"><span class="pre">1</span></code></p>
  64. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">time_range</span>
  65. </pre></div>
  66. </div>
  67. <p>Time range of search for engines which support it. See if an engine supports time range search in the preferences page of an instance.</p>
  68. <p>Optional.</p>
  69. <p>Possible: <code class="docutils literal notranslate"><span class="pre">day</span></code>, <code class="docutils literal notranslate"><span class="pre">month</span></code>, <code class="docutils literal notranslate"><span class="pre">year</span></code></p>
  70. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">format</span>
  71. </pre></div>
  72. </div>
  73. <p>Output format of results.</p>
  74. <p>Optional.</p>
  75. <p>Possible: <code class="docutils literal notranslate"><span class="pre">json</span></code>, <code class="docutils literal notranslate"><span class="pre">csv</span></code>, <code class="docutils literal notranslate"><span class="pre">rss</span></code></p>
  76. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">results_on_new_tab</span>
  77. </pre></div>
  78. </div>
  79. <p>Open search results on new tab.</p>
  80. <p>Optional.</p>
  81. <p>Default: <code class="docutils literal notranslate"><span class="pre">0</span></code></p>
  82. <p>Possible: <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">1</span></code></p>
  83. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">image_proxy</span>
  84. </pre></div>
  85. </div>
  86. <p>Proxy image results through searx.</p>
  87. <p>Optional.</p>
  88. <p>Default: <code class="docutils literal notranslate"><span class="pre">False</span></code></p>
  89. <p>Possible: <code class="docutils literal notranslate"><span class="pre">True</span></code>, <code class="docutils literal notranslate"><span class="pre">False</span></code></p>
  90. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">autocomplete</span>
  91. </pre></div>
  92. </div>
  93. <p>Service which completes words as you type.</p>
  94. <p>Optional.</p>
  95. <p>Default: empty</p>
  96. <p>Possible: <code class="docutils literal notranslate"><span class="pre">google</span></code>, <code class="docutils literal notranslate"><span class="pre">dbpedia</span></code>, <code class="docutils literal notranslate"><span class="pre">duckduckgo</span></code>, <code class="docutils literal notranslate"><span class="pre">startpage</span></code>, <code class="docutils literal notranslate"><span class="pre">wikipedia</span></code></p>
  97. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">safesearch</span>
  98. </pre></div>
  99. </div>
  100. <p>Filter search results of engines which support safe search. See if an engine supports safe search in the preferences page of an instance.</p>
  101. <p>Optional.</p>
  102. <p>Default: <code class="docutils literal notranslate"><span class="pre">None</span></code></p>
  103. <p>Possible: <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">1</span></code>, <code class="docutils literal notranslate"><span class="pre">None</span></code></p>
  104. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">theme</span>
  105. </pre></div>
  106. </div>
  107. <p>Theme of instance.</p>
  108. <p>Optional.</p>
  109. <p>Default: <code class="docutils literal notranslate"><span class="pre">oscar</span></code></p>
  110. <p>Possible: <code class="docutils literal notranslate"><span class="pre">oscar</span></code>, <code class="docutils literal notranslate"><span class="pre">simple</span></code>, <code class="docutils literal notranslate"><span class="pre">legacy</span></code>, <code class="docutils literal notranslate"><span class="pre">pix-art</span></code>, <code class="docutils literal notranslate"><span class="pre">courgette</span></code></p>
  111. <p>Please note, available themes depend on an instance. It is possible that an instance administrator deleted, created or renamed themes on his/her instance. See the available options in the preferences page of the instance.</p>
  112. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">oscar</span><span class="o">-</span><span class="n">style</span>
  113. </pre></div>
  114. </div>
  115. <p>Style of Oscar theme. It is only parsed if the theme of an instance is <code class="docutils literal notranslate"><span class="pre">oscar</span></code>.</p>
  116. <p>Optional.</p>
  117. <p>Default: <code class="docutils literal notranslate"><span class="pre">logicodev</span></code></p>
  118. <p>Possible: <code class="docutils literal notranslate"><span class="pre">pointhi</span></code>, <code class="docutils literal notranslate"><span class="pre">logicodev</span></code></p>
  119. <p>Please note, available styles depend on an instance. It is possible that an instance administrator deleted, created or renamed styles on his/her instance. See the available options in the preferences page of the instance.</p>
  120. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">enabled_plugins</span>
  121. </pre></div>
  122. </div>
  123. <p>List of enabled plugins.</p>
  124. <p>Optional.</p>
  125. <p>Default: <code class="docutils literal notranslate"><span class="pre">HTTPS_rewrite</span></code>, <code class="docutils literal notranslate"><span class="pre">Self_Informations</span></code>, <code class="docutils literal notranslate"><span class="pre">Search_on_category_select</span></code>, <code class="docutils literal notranslate"><span class="pre">Tracker_URL_remover</span></code></p>
  126. <p>Possible: <code class="docutils literal notranslate"><span class="pre">DOAI_rewrite</span></code>, <code class="docutils literal notranslate"><span class="pre">HTTPS_rewrite</span></code>, <code class="docutils literal notranslate"><span class="pre">Infinite_scroll</span></code>, <code class="docutils literal notranslate"><span class="pre">Vim-like_hotkeys</span></code>, <code class="docutils literal notranslate"><span class="pre">Self_Informations</span></code>, <code class="docutils literal notranslate"><span class="pre">Tracker_URL_remover</span></code>, <code class="docutils literal notranslate"><span class="pre">Search_on_category_select</span></code></p>
  127. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">disabled_plugins</span>
  128. </pre></div>
  129. </div>
  130. <p>List of disabled plugins.</p>
  131. <p>Optional.</p>
  132. <p>Default: <code class="docutils literal notranslate"><span class="pre">DOAI_rewrite</span></code>, <code class="docutils literal notranslate"><span class="pre">Infinite_scroll</span></code>, <code class="docutils literal notranslate"><span class="pre">Vim-like_hotkeys</span></code></p>
  133. <p>Possible: <code class="docutils literal notranslate"><span class="pre">DOAI_rewrite</span></code>, <code class="docutils literal notranslate"><span class="pre">HTTPS_rewrite</span></code>, <code class="docutils literal notranslate"><span class="pre">Infinite_scroll</span></code>, <code class="docutils literal notranslate"><span class="pre">Vim-like_hotkeys</span></code>, <code class="docutils literal notranslate"><span class="pre">Self_Informations</span></code>, <code class="docutils literal notranslate"><span class="pre">Tracker_URL_remover</span></code>, <code class="docutils literal notranslate"><span class="pre">Search_on_category_select</span></code></p>
  134. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">enabled_engines</span>
  135. </pre></div>
  136. </div>
  137. <p>List of enabled engines.</p>
  138. <p>Optional.</p>
  139. <p>Possible: all engines</p>
  140. <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">disabled_engines</span>
  141. </pre></div>
  142. </div>
  143. <p>List of disabled engines.</p>
  144. <p>Optional.</p>
  145. <p>Possible: all engines</p>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  152. <div class="sphinxsidebarwrapper">
  153. <h3><a href="../index.html">Table Of Contents</a></h3>
  154. <ul>
  155. <li><a class="reference internal" href="#">Search API</a><ul>
  156. <li><a class="reference internal" href="#parameters">Parameters</a></li>
  157. </ul>
  158. </li>
  159. </ul>
  160. <div class="sidebar_container body">
  161. <h1>Searx</h1>
  162. <ul>
  163. <li><a href="../index.html">Home</a></li>
  164. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  165. <li><a href="../blog/blog.html">Blog</a></li>
  166. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  167. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  168. </ul>
  169. <hr />
  170. <ul>
  171. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  172. </ul>
  173. </div>
  174. <div role="note" aria-label="source link">
  175. <h3>This Page</h3>
  176. <ul class="this-page-menu">
  177. <li><a href="../_sources/dev/search_api.rst.txt"
  178. rel="nofollow">Show Source</a></li>
  179. </ul>
  180. </div>
  181. <div id="searchbox" style="display: none" role="search">
  182. <h3>Quick search</h3>
  183. <div class="searchformwrapper">
  184. <form class="search" action="../search.html" method="get">
  185. <input type="text" name="q" />
  186. <input type="submit" value="Go" />
  187. <input type="hidden" name="check_keywords" value="yes" />
  188. <input type="hidden" name="area" value="default" />
  189. </form>
  190. </div>
  191. </div>
  192. <script type="text/javascript">$('#searchbox').show(0);</script>
  193. </div>
  194. </div>
  195. <div class="clearer"></div>
  196. </div>
  197. <div class="footer">
  198. &copy; Copyright 2015-2017, Adam Tauber.
  199. </div>
  200. </body>
  201. </html>