search_api.html 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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 &mdash; searx 0.9.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.9.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../_static/jquery.js"></script>
  19. <script type="text/javascript" src="../_static/underscore.js"></script>
  20. <script type="text/javascript" src="../_static/doctools.js"></script>
  21. <link rel="top" title="searx 0.9.0 documentation" href="../index.html" />
  22. <link rel="next" title="Plugins" href="plugins.html" />
  23. <link rel="prev" title="Engine overview" href="engine_overview.html" />
  24. <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
  25. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
  26. </head>
  27. <body role="document">
  28. <div class="document">
  29. <div class="documentwrapper">
  30. <div class="bodywrapper">
  31. <div class="body" role="main">
  32. <div class="section" id="search-api">
  33. <h1>Search API<a class="headerlink" href="#search-api" title="Permalink to this headline">¶</a></h1>
  34. <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>
  35. <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>
  36. <div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span>
  37. </pre></div>
  38. </div>
  39. <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>
  40. </pre></div>
  41. </div>
  42. <div class="section" id="parameters">
  43. <h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
  44. <table border="1" class="docutils">
  45. <colgroup>
  46. <col width="11%" />
  47. <col width="60%" />
  48. <col width="30%" />
  49. </colgroup>
  50. <thead valign="bottom">
  51. <tr class="row-odd"><th class="head">Name</th>
  52. <th class="head">Description</th>
  53. <th class="head">&nbsp;</th>
  54. </tr>
  55. </thead>
  56. <tbody valign="top">
  57. <tr class="row-even"><td><code class="docutils literal"><span class="pre">q</span></code></td>
  58. <td>The search query, see <a class="reference internal" href="../user/search_syntax.html"><span class="doc">Search syntax</span></a></td>
  59. <td>required</td>
  60. </tr>
  61. <tr class="row-odd"><td><code class="docutils literal"><span class="pre">categories</span></code></td>
  62. <td>Comma separated list, specifies the active search categories</td>
  63. <td>optional</td>
  64. </tr>
  65. <tr class="row-even"><td><code class="docutils literal"><span class="pre">engines</span></code></td>
  66. <td>Comma separated list, specifies the active search engines</td>
  67. <td>optional</td>
  68. </tr>
  69. <tr class="row-odd"><td><code class="docutils literal"><span class="pre">lang</span></code></td>
  70. <td>Code of the language</td>
  71. <td>optional (default: <code class="docutils literal"><span class="pre">all</span></code>)</td>
  72. </tr>
  73. <tr class="row-even"><td><code class="docutils literal"><span class="pre">pageno</span></code></td>
  74. <td>Search page number</td>
  75. <td>optional (default: <code class="docutils literal"><span class="pre">1</span></code>)</td>
  76. </tr>
  77. <tr class="row-odd"><td><code class="docutils literal"><span class="pre">time_range</span></code></td>
  78. <td>Time range of search</td>
  79. <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>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  89. <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
  90. <h1>Searx</h1>
  91. <ul>
  92. <li><a href="../index.html">Home</a></li>
  93. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  94. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  95. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  96. </ul>
  97. <hr />
  98. <ul>
  99. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  100. <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>
  101. <li><a href="https://gratipay.com/searx">Gratipay</a></li>
  102. </ul>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="clearer"></div>
  107. </div>
  108. <div class="footer">
  109. &copy; Copyright 2015-2016, Adam Tauber.
  110. </div>
  111. </body>
  112. </html>