123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Search API &#8212; searx 0.12.0 documentation</title>
  7. <link rel="stylesheet" href="../_static/style.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '0.12.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true,
  16. SOURCELINK_SUFFIX: '.txt'
  17. };
  18. </script>
  19. <script type="text/javascript" src="../_static/jquery.js"></script>
  20. <script type="text/javascript" src="../_static/underscore.js"></script>
  21. <script type="text/javascript" src="../_static/doctools.js"></script>
  22. <link rel="index" title="Index" href="../genindex.html" />
  23. <link rel="search" title="Search" href="../search.html" />
  24. <link rel="next" title="Plugins" href="plugins.html" />
  25. <link rel="prev" title="Engine overview" href="engine_overview.html" />
  26. <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
  27. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
  28. </head>
  29. <body>
  30. <div class="document">
  31. <div class="documentwrapper">
  32. <div class="bodywrapper">
  33. <div class="body" role="main">
  34. <div class="section" id="search-api">
  35. <h1>Search API<a class="headerlink" href="#search-api" title="Permalink to this headline">¶</a></h1>
  36. <p>The search supports both <code class="docutils literal"><span class="pre">GET</span></code> and <code class="docutils literal"><span class="pre">POST</span></code>.</p>
  37. <p>Furthermore, two enpoints <code class="docutils literal"><span class="pre">/</span></code> and <code class="docutils literal"><span class="pre">/search</span></code> are available for querying.</p>
  38. <p><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/</span></code></p>
  39. <p><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/search</span></code></p>
  40. <div class="section" id="parameters">
  41. <h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
  42. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">q</span>
  43. </pre></div>
  44. </div>
  45. <p>The search query. This string is passed to external search services.
  46. Thus, searx supports syntax of each search service. For example, <code class="docutils literal"><span class="pre">site:github.com</span> <span class="pre">searx</span></code> is a valid
  47. query for Google. However, if simply the query above is passed to any search engine which does not filter its
  48. results based on this syntax, you might not get the results you wanted.</p>
  49. <p>See more at <a class="reference internal" href="../user/search_syntax.html"><span class="doc">Search syntax</span></a></p>
  50. <p>Required.</p>
  51. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">categories</span>
  52. </pre></div>
  53. </div>
  54. <p>Comma separated list, specifies the active search categories</p>
  55. <p>Optional.</p>
  56. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">engines</span>
  57. </pre></div>
  58. </div>
  59. <p>Comma separated list, specifies the active search engines.</p>
  60. <p>Optional.</p>
  61. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">lang</span>
  62. </pre></div>
  63. </div>
  64. <p>Code of the language.</p>
  65. <p>Optional.</p>
  66. <p>Default: <code class="docutils literal"><span class="pre">all</span></code></p>
  67. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">pageno</span>
  68. </pre></div>
  69. </div>
  70. <p>Search page number.</p>
  71. <p>Optional.</p>
  72. <p>Default: <code class="docutils literal"><span class="pre">1</span></code></p>
  73. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">time_range</span>
  74. </pre></div>
  75. </div>
  76. <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>
  77. <p>Optional.</p>
  78. <p>Possible: <code class="docutils literal"><span class="pre">day</span></code>, <code class="docutils literal"><span class="pre">month</span></code>, <code class="docutils literal"><span class="pre">year</span></code></p>
  79. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="nb">format</span>
  80. </pre></div>
  81. </div>
  82. <p>Output format of results.</p>
  83. <p>Optional.</p>
  84. <p>Possible: <code class="docutils literal"><span class="pre">json</span></code>, <code class="docutils literal"><span class="pre">csv</span></code>, <code class="docutils literal"><span class="pre">rss</span></code></p>
  85. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">results_on_new_tab</span>
  86. </pre></div>
  87. </div>
  88. <p>Open search results on new tab.</p>
  89. <p>Optional.</p>
  90. <p>Default: <code class="docutils literal"><span class="pre">0</span></code></p>
  91. <p>Possible: <code class="docutils literal"><span class="pre">0</span></code>, <code class="docutils literal"><span class="pre">1</span></code></p>
  92. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">image_proxy</span>
  93. </pre></div>
  94. </div>
  95. <p>Proxy image results through searx.</p>
  96. <p>Optional.</p>
  97. <p>Default: <code class="docutils literal"><span class="pre">False</span></code></p>
  98. <p>Possible: <code class="docutils literal"><span class="pre">True</span></code>, <code class="docutils literal"><span class="pre">False</span></code></p>
  99. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">autocomplete</span>
  100. </pre></div>
  101. </div>
  102. <p>Service which completes words as you type.</p>
  103. <p>Optional.</p>
  104. <p>Default: empty</p>
  105. <p>Possible: <code class="docutils literal"><span class="pre">google</span></code>, <code class="docutils literal"><span class="pre">dbpedia</span></code>, <code class="docutils literal"><span class="pre">duckduckgo</span></code>, <code class="docutils literal"><span class="pre">startpage</span></code>, <code class="docutils literal"><span class="pre">wikipedia</span></code></p>
  106. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">safesearch</span>
  107. </pre></div>
  108. </div>
  109. <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>
  110. <p>Optional.</p>
  111. <p>Default: <code class="docutils literal"><span class="pre">None</span></code></p>
  112. <p>Possible: <code class="docutils literal"><span class="pre">0</span></code>, <code class="docutils literal"><span class="pre">1</span></code>, <code class="docutils literal"><span class="pre">None</span></code></p>
  113. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">theme</span>
  114. </pre></div>
  115. </div>
  116. <p>Theme of instance.</p>
  117. <p>Optional.</p>
  118. <p>Default: <code class="docutils literal"><span class="pre">oscar</span></code></p>
  119. <p>Possible: <code class="docutils literal"><span class="pre">oscar</span></code>, <code class="docutils literal"><span class="pre">simple</span></code>, <code class="docutils literal"><span class="pre">legacy</span></code>, <code class="docutils literal"><span class="pre">pix-art</span></code>, <code class="docutils literal"><span class="pre">courgette</span></code></p>
  120. <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>
  121. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">oscar</span><span class="o">-</span><span class="n">style</span>
  122. </pre></div>
  123. </div>
  124. <p>Style of Oscar theme. It is only parsed if the theme of an instance is <code class="docutils literal"><span class="pre">oscar</span></code>.</p>
  125. <p>Optional.</p>
  126. <p>Default: <code class="docutils literal"><span class="pre">logicodev</span></code></p>
  127. <p>Possible: <code class="docutils literal"><span class="pre">pointhi</span></code>, <code class="docutils literal"><span class="pre">logicodev</span></code></p>
  128. <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>
  129. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">enabled_plugins</span>
  130. </pre></div>
  131. </div>
  132. <p>List of enabled plugins.</p>
  133. <p>Optional.</p>
  134. <p>Default: <code class="docutils literal"><span class="pre">HTTPS_rewrite</span></code>, <code class="docutils literal"><span class="pre">Self_Informations</span></code>, <code class="docutils literal"><span class="pre">Search_on_category_select</span></code>, <code class="docutils literal"><span class="pre">Tracker_URL_remover</span></code></p>
  135. <p>Possible: <code class="docutils literal"><span class="pre">DOAI_rewrite</span></code>, <code class="docutils literal"><span class="pre">HTTPS_rewrite</span></code>, <code class="docutils literal"><span class="pre">Infinite_scroll</span></code>, <code class="docutils literal"><span class="pre">Vim-like_hotkeys</span></code>, <code class="docutils literal"><span class="pre">Self_Informations</span></code>, <code class="docutils literal"><span class="pre">Tracker_URL_remover</span></code>, <code class="docutils literal"><span class="pre">Search_on_category_select</span></code></p>
  136. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">disabled_plugins</span>
  137. </pre></div>
  138. </div>
  139. <p>List of disabled plugins.</p>
  140. <p>Optional.</p>
  141. <p>Default: <code class="docutils literal"><span class="pre">DOAI_rewrite</span></code>, <code class="docutils literal"><span class="pre">Infinite_scroll</span></code>, <code class="docutils literal"><span class="pre">Vim-like_hotkeys</span></code></p>
  142. <p>Possible: <code class="docutils literal"><span class="pre">DOAI_rewrite</span></code>, <code class="docutils literal"><span class="pre">HTTPS_rewrite</span></code>, <code class="docutils literal"><span class="pre">Infinite_scroll</span></code>, <code class="docutils literal"><span class="pre">Vim-like_hotkeys</span></code>, <code class="docutils literal"><span class="pre">Self_Informations</span></code>, <code class="docutils literal"><span class="pre">Tracker_URL_remover</span></code>, <code class="docutils literal"><span class="pre">Search_on_category_select</span></code></p>
  143. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">enabled_engines</span>
  144. </pre></div>
  145. </div>
  146. <p>List of enabled engines.</p>
  147. <p>Optional.</p>
  148. <p>Possible: all engines</p>
  149. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">disabled_engines</span>
  150. </pre></div>
  151. </div>
  152. <p>List of disabled engines.</p>
  153. <p>Optional.</p>
  154. <p>Possible: all engines</p>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. </div>
  160. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  161. <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
  162. <h1>Searx</h1>
  163. <ul>
  164. <li><a href="../index.html">Home</a></li>
  165. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  166. <li><a href="../blog/blog.html">Blog</a></li>
  167. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  168. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  169. </ul>
  170. <hr />
  171. <ul>
  172. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  173. <li><a href="https://flattr.com/submit/auto?user_id=asciimoo&url=https://github.com/asciimoo/searx&title=searx&language=&tags=github&category=software">Flattr</a></li>
  174. <li><a href="https://gratipay.com/searx">Gratipay</a></li>
  175. </ul>
  176. </div>
  177. </div>
  178. </div>
  179. <div class="clearer"></div>
  180. </div>
  181. <div class="footer">
  182. &copy; Copyright 2015-2017, Adam Tauber.
  183. </div>
  184. </body>
  185. </html>