| 
									
										
										
										
											2019-12-30 21:56:09 +01:00
										 |  |  | .. _search API:
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | ==========
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | Search API
 | 
					
						
							|  |  |  | ==========
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-06 18:13:20 +02:00
										 |  |  | The search supports both ``GET`` and ``POST``.
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-12 02:33:43 +01:00
										 |  |  | Furthermore, two endpoints ``/`` and ``/search`` are available for querying.
 | 
					
						
							| 
									
										
										
										
											2016-07-09 22:31:21 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | ``GET /``
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ``GET /search``
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Parameters
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | ==========
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-21 17:13:38 +01:00
										 |  |  | .. sidebar:: Further reading ..
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:56:09 +01:00
										 |  |  |    - :ref:`engines-dev`
 | 
					
						
							|  |  |  |    - :ref:`settings.yml`
 | 
					
						
							| 
									
										
										
										
											2021-06-04 11:29:58 +02:00
										 |  |  |    - :ref:`configured engines`
 | 
					
						
							| 
									
										
										
										
											2019-12-21 17:13:38 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | ``q`` : required
 | 
					
						
							|  |  |  |   The search query.  This string is passed to external search services.  Thus,
 | 
					
						
							| 
									
										
										
										
											2021-09-12 08:36:56 +02:00
										 |  |  |   SearXNG supports syntax of each search service.  For example, ``site:github.com
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   searx`` is a valid query for Google.  However, if simply the query above is
 | 
					
						
							|  |  |  |   passed to any search engine which does not filter its results based on this
 | 
					
						
							|  |  |  |   syntax, you might not get the results you wanted.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   See more at :ref:`search-syntax`
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | ``categories`` : optional
 | 
					
						
							|  |  |  |   Comma separated list, specifies the active search categories
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``engines`` : optional
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Comma separated list, specifies the active search engines.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``lang`` : default ``all``
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Code of the language.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``pageno`` : default ``1``
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Search page number.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``time_range`` : optional
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   [ ``day``, ``month``, ``year`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Time range of search for engines which support it.  See if an engine supports
 | 
					
						
							|  |  |  |   time range search in the preferences page of an instance.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``format`` : optional
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   [ ``json``, ``csv``, ``rss`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Output format of results.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``results_on_new_tab`` : default ``0``
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   [ ``0``, ``1`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Open search results on new tab.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``image_proxy`` : default ``False``
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   [  ``True``, ``False`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Proxy image results through searx.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``autocomplete`` : default *empty*
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   [ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Service which completes words as you type.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``safesearch`` :  default ``None``
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   [ ``0``, ``1``, ``None`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Filter search results of engines which support safe search.  See if an engine
 | 
					
						
							|  |  |  |   supports safe search in the preferences page of an instance.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``theme`` : default ``oscar``
 | 
					
						
							| 
									
										
										
										
											2020-12-01 10:18:57 +01:00
										 |  |  |   [ ``oscar``, ``simple`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Theme of instance.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Please note, available themes depend on an instance.  It is possible that an
 | 
					
						
							| 
									
										
										
										
											2020-06-28 11:40:04 +02:00
										 |  |  |   instance administrator deleted, created or renamed themes on their instance.
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   See the available options in the preferences page of the instance.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``oscar-style`` : default ``logicodev``
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   [ ``pointhi``, ``logicodev`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Style of Oscar theme.  It is only parsed if the theme of an instance is
 | 
					
						
							|  |  |  |   ``oscar``.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   Please note, available styles depend on an instance.  It is possible that an
 | 
					
						
							| 
									
										
										
										
											2020-06-28 11:40:04 +02:00
										 |  |  |   instance administrator deleted, created or renamed styles on their
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   instance. See the available options in the preferences page of the instance.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``enabled_plugins`` : optional
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   List of enabled plugins.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   :default: ``HTTPS_rewrite``, ``Self_Informations``,
 | 
					
						
							|  |  |  |     ``Search_on_category_select``, ``Tracker_URL_remover``
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-10 12:43:33 +02:00
										 |  |  |   :values: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |     ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
 | 
					
						
							| 
									
										
										
										
											2021-09-10 12:43:33 +02:00
										 |  |  |     ``Search_on_category_select``, ``Hostname_replace``
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | ``disabled_plugins``: optional
 | 
					
						
							|  |  |  |   List of disabled plugins.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-10 12:43:33 +02:00
										 |  |  |   :default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``, ``Hostname_replace``
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   :values: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
 | 
					
						
							|  |  |  |     ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
 | 
					
						
							| 
									
										
										
										
											2021-09-10 12:43:33 +02:00
										 |  |  |     ``Search_on_category_select``, ``Hostname_replace``
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``enabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   List of enabled engines.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``disabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   List of disabled engines.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 |