|
@@ -42,57 +42,123 @@
|
42
|
42
|
<h1>Search API<a class="headerlink" href="#search-api" title="Permalink to this headline">¶</a></h1>
|
43
|
43
|
<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>
|
44
|
44
|
<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>
|
45
|
|
-<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span>
|
|
45
|
+<p><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/</span></code></p>
|
|
46
|
+<p><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/search</span></code></p>
|
|
47
|
+<div class="section" id="parameters">
|
|
48
|
+<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
|
|
49
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">q</span>
|
46
|
50
|
</pre></div>
|
47
|
51
|
</div>
|
48
|
|
-<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>
|
|
52
|
+<p>The search query. This string is passed to external search services.
|
|
53
|
+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
|
|
54
|
+query for Google. However, if simply the query above is passed to any search engine which does not filter its
|
|
55
|
+results based on this syntax, you might not get the results you wanted.</p>
|
|
56
|
+<p>See more at <a class="reference internal" href="../user/search_syntax.html"><span class="doc">Search syntax</span></a></p>
|
|
57
|
+<p>Required.</p>
|
|
58
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">categories</span>
|
49
|
59
|
</pre></div>
|
50
|
60
|
</div>
|
51
|
|
-<div class="section" id="parameters">
|
52
|
|
-<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
|
53
|
|
-<table border="1" class="docutils">
|
54
|
|
-<colgroup>
|
55
|
|
-<col width="11%" />
|
56
|
|
-<col width="60%" />
|
57
|
|
-<col width="30%" />
|
58
|
|
-</colgroup>
|
59
|
|
-<thead valign="bottom">
|
60
|
|
-<tr class="row-odd"><th class="head">Name</th>
|
61
|
|
-<th class="head">Description</th>
|
62
|
|
-<th class="head"> </th>
|
63
|
|
-</tr>
|
64
|
|
-</thead>
|
65
|
|
-<tbody valign="top">
|
66
|
|
-<tr class="row-even"><td><code class="docutils literal"><span class="pre">q</span></code></td>
|
67
|
|
-<td>The search query, see <a class="reference internal" href="../user/search_syntax.html"><span class="doc">Search syntax</span></a></td>
|
68
|
|
-<td>required</td>
|
69
|
|
-</tr>
|
70
|
|
-<tr class="row-odd"><td><code class="docutils literal"><span class="pre">categories</span></code></td>
|
71
|
|
-<td>Comma separated list, specifies the active search categories</td>
|
72
|
|
-<td>optional</td>
|
73
|
|
-</tr>
|
74
|
|
-<tr class="row-even"><td><code class="docutils literal"><span class="pre">engines</span></code></td>
|
75
|
|
-<td>Comma separated list, specifies the active search engines</td>
|
76
|
|
-<td>optional</td>
|
77
|
|
-</tr>
|
78
|
|
-<tr class="row-odd"><td><code class="docutils literal"><span class="pre">lang</span></code></td>
|
79
|
|
-<td>Code of the language</td>
|
80
|
|
-<td>optional (default: <code class="docutils literal"><span class="pre">all</span></code>)</td>
|
81
|
|
-</tr>
|
82
|
|
-<tr class="row-even"><td><code class="docutils literal"><span class="pre">pageno</span></code></td>
|
83
|
|
-<td>Search page number</td>
|
84
|
|
-<td>optional (default: <code class="docutils literal"><span class="pre">1</span></code>)</td>
|
85
|
|
-</tr>
|
86
|
|
-<tr class="row-odd"><td><code class="docutils literal"><span class="pre">time_range</span></code></td>
|
87
|
|
-<td>Time range of search</td>
|
88
|
|
-<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>
|
89
|
|
-</tr>
|
90
|
|
-<tr class="row-even"><td><code class="docutils literal"><span class="pre">format</span></code></td>
|
91
|
|
-<td>Output format of results</td>
|
92
|
|
-<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>
|
93
|
|
-</tr>
|
94
|
|
-</tbody>
|
95
|
|
-</table>
|
|
61
|
+<p>Comma separated list, specifies the active search categories</p>
|
|
62
|
+<p>Optional.</p>
|
|
63
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">engines</span>
|
|
64
|
+</pre></div>
|
|
65
|
+</div>
|
|
66
|
+<p>Comma separated list, specifies the active search engines.</p>
|
|
67
|
+<p>Optional.</p>
|
|
68
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">lang</span>
|
|
69
|
+</pre></div>
|
|
70
|
+</div>
|
|
71
|
+<p>Code of the language.</p>
|
|
72
|
+<p>Optional.</p>
|
|
73
|
+<p>Default: <code class="docutils literal"><span class="pre">all</span></code></p>
|
|
74
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">pageno</span>
|
|
75
|
+</pre></div>
|
|
76
|
+</div>
|
|
77
|
+<p>Search page number.</p>
|
|
78
|
+<p>Optional.</p>
|
|
79
|
+<p>Default: <code class="docutils literal"><span class="pre">1</span></code></p>
|
|
80
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">time_range</span>
|
|
81
|
+</pre></div>
|
|
82
|
+</div>
|
|
83
|
+<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>
|
|
84
|
+<p>Optional.</p>
|
|
85
|
+<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>
|
|
86
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="nb">format</span>
|
|
87
|
+</pre></div>
|
|
88
|
+</div>
|
|
89
|
+<p>Output format of results.</p>
|
|
90
|
+<p>Optional.</p>
|
|
91
|
+<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>
|
|
92
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">results_on_new_tab</span>
|
|
93
|
+</pre></div>
|
|
94
|
+</div>
|
|
95
|
+<p>Open search results on new tab.</p>
|
|
96
|
+<p>Optional.</p>
|
|
97
|
+<p>Default: <code class="docutils literal"><span class="pre">0</span></code></p>
|
|
98
|
+<p>Possible: <code class="docutils literal"><span class="pre">0</span></code>, <code class="docutils literal"><span class="pre">1</span></code></p>
|
|
99
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">image_proxy</span>
|
|
100
|
+</pre></div>
|
|
101
|
+</div>
|
|
102
|
+<p>Proxy image results through searx.</p>
|
|
103
|
+<p>Optional.</p>
|
|
104
|
+<p>Default: <code class="docutils literal"><span class="pre">False</span></code></p>
|
|
105
|
+<p>Possible: <code class="docutils literal"><span class="pre">True</span></code>, <code class="docutils literal"><span class="pre">False</span></code></p>
|
|
106
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">autocomplete</span>
|
|
107
|
+</pre></div>
|
|
108
|
+</div>
|
|
109
|
+<p>Service which completes words as you type.</p>
|
|
110
|
+<p>Optional.</p>
|
|
111
|
+<p>Default: empty</p>
|
|
112
|
+<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>
|
|
113
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">safesearch</span>
|
|
114
|
+</pre></div>
|
|
115
|
+</div>
|
|
116
|
+<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>
|
|
117
|
+<p>Optional.</p>
|
|
118
|
+<p>Default: <code class="docutils literal"><span class="pre">None</span></code></p>
|
|
119
|
+<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>
|
|
120
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">theme</span>
|
|
121
|
+</pre></div>
|
|
122
|
+</div>
|
|
123
|
+<p>Theme of instance.</p>
|
|
124
|
+<p>Optional.</p>
|
|
125
|
+<p>Default: <code class="docutils literal"><span class="pre">oscar</span></code></p>
|
|
126
|
+<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>
|
|
127
|
+<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>
|
|
128
|
+<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>
|
|
129
|
+</pre></div>
|
|
130
|
+</div>
|
|
131
|
+<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>
|
|
132
|
+<p>Optional.</p>
|
|
133
|
+<p>Default: <code class="docutils literal"><span class="pre">logicodev</span></code></p>
|
|
134
|
+<p>Possible: <code class="docutils literal"><span class="pre">pointhi</span></code>, <code class="docutils literal"><span class="pre">logicodev</span></code></p>
|
|
135
|
+<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>
|
|
136
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">enabled_plugins</span>
|
|
137
|
+</pre></div>
|
|
138
|
+</div>
|
|
139
|
+<p>List of enabled plugins.</p>
|
|
140
|
+<p>Optional.</p>
|
|
141
|
+<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>
|
|
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">disabled_plugins</span>
|
|
144
|
+</pre></div>
|
|
145
|
+</div>
|
|
146
|
+<p>List of disabled plugins.</p>
|
|
147
|
+<p>Optional.</p>
|
|
148
|
+<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>
|
|
149
|
+<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>
|
|
150
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">enabled_engines</span>
|
|
151
|
+</pre></div>
|
|
152
|
+</div>
|
|
153
|
+<p>List of enabled engines.</p>
|
|
154
|
+<p>Optional.</p>
|
|
155
|
+<p>Possible: all engines</p>
|
|
156
|
+<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">disabled_engines</span>
|
|
157
|
+</pre></div>
|
|
158
|
+</div>
|
|
159
|
+<p>List of disabled engines.</p>
|
|
160
|
+<p>Optional.</p>
|
|
161
|
+<p>Possible: all engines</p>
|
96
|
162
|
</div>
|
97
|
163
|
</div>
|
98
|
164
|
|