search_api.html 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span>
  39. </pre></div>
  40. </div>
  41. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span><span class="n">search</span>
  42. </pre></div>
  43. </div>
  44. <div class="section" id="parameters">
  45. <h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
  46. <table border="1" class="docutils">
  47. <colgroup>
  48. <col width="11%" />
  49. <col width="60%" />
  50. <col width="30%" />
  51. </colgroup>
  52. <thead valign="bottom">
  53. <tr class="row-odd"><th class="head">Name</th>
  54. <th class="head">Description</th>
  55. <th class="head">&#160;</th>
  56. </tr>
  57. </thead>
  58. <tbody valign="top">
  59. <tr class="row-even"><td><code class="docutils literal"><span class="pre">q</span></code></td>
  60. <td>The search query, see <a class="reference internal" href="../user/search_syntax.html"><span class="doc">Search syntax</span></a></td>
  61. <td>required</td>
  62. </tr>
  63. <tr class="row-odd"><td><code class="docutils literal"><span class="pre">categories</span></code></td>
  64. <td>Comma separated list, specifies the active search categories</td>
  65. <td>optional</td>
  66. </tr>
  67. <tr class="row-even"><td><code class="docutils literal"><span class="pre">engines</span></code></td>
  68. <td>Comma separated list, specifies the active search engines</td>
  69. <td>optional</td>
  70. </tr>
  71. <tr class="row-odd"><td><code class="docutils literal"><span class="pre">lang</span></code></td>
  72. <td>Code of the language</td>
  73. <td>optional (default: <code class="docutils literal"><span class="pre">all</span></code>)</td>
  74. </tr>
  75. <tr class="row-even"><td><code class="docutils literal"><span class="pre">pageno</span></code></td>
  76. <td>Search page number</td>
  77. <td>optional (default: <code class="docutils literal"><span class="pre">1</span></code>)</td>
  78. </tr>
  79. <tr class="row-odd"><td><code class="docutils literal"><span class="pre">time_range</span></code></td>
  80. <td>Time range of search</td>
  81. <td>optional (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>)</td>
  82. </tr>
  83. <tr class="row-even"><td><code class="docutils literal"><span class="pre">format</span></code></td>
  84. <td>Output format of results</td>
  85. <td>optional (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>)</td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  95. <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
  96. <h1>Searx</h1>
  97. <ul>
  98. <li><a href="../index.html">Home</a></li>
  99. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  100. <li><a href="../blog/blog.html">Blog</a></li>
  101. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  102. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  103. </ul>
  104. <hr />
  105. <ul>
  106. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  107. <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>
  108. <li><a href="https://gratipay.com/searx">Gratipay</a></li>
  109. </ul>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="clearer"></div>
  114. </div>
  115. <div class="footer">
  116. &copy; Copyright 2015-2017, Adam Tauber.
  117. </div>
  118. </body>
  119. </html>