| 
									
										
										
										
											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
 | 
					
						
							| 
									
										
										
										
											2021-11-18 18:27:26 +01:00
										 |  |  |   SearXNG`` is a valid query for Google.  However, if simply the query above is
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   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
 | 
					
						
							| 
									
										
										
										
											2022-07-24 20:15:03 +02:00
										 |  |  |   Comma separated list, specifies the active search categories (see
 | 
					
						
							|  |  |  |   :ref:`configured engines`)
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-30 21:55:15 +01:00
										 |  |  | ``engines`` : optional
 | 
					
						
							| 
									
										
										
										
											2022-07-24 20:15:03 +02:00
										 |  |  |   Comma separated list, specifies the active search engines (see
 | 
					
						
							|  |  |  |   :ref:`configured engines`).
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-24 20:15:03 +02:00
										 |  |  | ``language`` : default from :ref:`settings search`
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-24 20:15:03 +02:00
										 |  |  |   Output format of results.  Format needs to be activated in :ref:`settings
 | 
					
						
							|  |  |  |   search`.
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-24 20:15:03 +02:00
										 |  |  | ``image_proxy`` : default from :ref:`settings server`
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   [  ``True``, ``False`` ]
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-18 18:27:26 +01:00
										 |  |  |   Proxy image results through SearXNG.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-24 20:15:03 +02:00
										 |  |  | ``autocomplete`` : default from :ref:`settings search`
 | 
					
						
							|  |  |  |   [ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia``,
 | 
					
						
							|  |  |  |   ``swisscows``, ``qwant`` ]
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-24 20:15:03 +02:00
										 |  |  | ``safesearch`` :  default from :ref:`settings search`
 | 
					
						
							|  |  |  |   [ ``0``, ``1``, ``2`` ]
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-30 08:01:53 +02:00
										 |  |  | ``theme`` : default ``simple``
 | 
					
						
							|  |  |  |   [ ``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
										 |  |  | ``enabled_plugins`` : optional
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   List of enabled plugins.
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-25 16:59:55 +02:00
										 |  |  |   :default: | 
					
						
							|  |  |  |      ``Hash_plugin``, ``Search_on_category_select``,
 | 
					
						
							| 
									
										
										
										
											2022-09-27 17:01:00 +02:00
										 |  |  |      ``Self_Information``, ``Tracker_URL_remover``,
 | 
					
						
							| 
									
										
										
										
											2022-07-25 16:59:55 +02:00
										 |  |  |      ``Ahmia_blacklist``
 | 
					
						
							| 
									
										
										
										
											2017-10-23 16:29:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-25 16:59:55 +02:00
										 |  |  |   :values: | 
					
						
							|  |  |  |      .. enabled by default
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      ``Hash_plugin``, ``Search_on_category_select``,
 | 
					
						
							| 
									
										
										
										
											2022-09-27 17:01:00 +02:00
										 |  |  |      ``Self_Information``, ``Tracker_URL_remover``,
 | 
					
						
							| 
									
										
										
										
											2022-07-25 16:59:55 +02:00
										 |  |  |      ``Ahmia_blacklist``,
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      .. disabled by default
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      ``Hostname_replace``, ``Open_Access_DOI_rewrite``,
 | 
					
						
							|  |  |  |      ``Vim-like_hotkeys``, ``Tor_check_plugin``
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-25 16:59:55 +02:00
										 |  |  |   :default: | 
					
						
							|  |  |  |      ``Hostname_replace``, ``Open_Access_DOI_rewrite``,
 | 
					
						
							|  |  |  |      ``Vim-like_hotkeys``, ``Tor_check_plugin``
 | 
					
						
							| 
									
										
										
										
											2022-07-24 20:15:03 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-25 16:59:55 +02:00
										 |  |  |   :values: | 
					
						
							|  |  |  |      see values from ``enabled_plugins``
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 |