2019-12-30 20:56:09 +00:00
|
|
|
.. _search API:
|
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
==========
|
2015-11-17 22:13:30 +00:00
|
|
|
Search API
|
|
|
|
==========
|
|
|
|
|
2016-09-06 16:13:20 +00:00
|
|
|
The search supports both ``GET`` and ``POST``.
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2021-01-12 01:33:43 +00:00
|
|
|
Furthermore, two endpoints ``/`` and ``/search`` are available for querying.
|
2016-07-09 20:31:21 +00:00
|
|
|
|
2017-10-23 14:29:43 +00:00
|
|
|
|
|
|
|
``GET /``
|
|
|
|
|
|
|
|
``GET /search``
|
|
|
|
|
|
|
|
Parameters
|
2019-12-12 18:20:56 +00:00
|
|
|
==========
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-21 16:13:38 +00:00
|
|
|
.. sidebar:: Further reading ..
|
|
|
|
|
2019-12-30 20:56:09 +00:00
|
|
|
- :ref:`engines-dev`
|
|
|
|
- :ref:`settings.yml`
|
2021-06-04 09:29:58 +00:00
|
|
|
- :ref:`configured engines`
|
2019-12-21 16:13:38 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
``q`` : required
|
|
|
|
The search query. This string is passed to external search services. Thus,
|
2021-09-12 06:36:56 +00:00
|
|
|
SearXNG supports syntax of each search service. For example, ``site:github.com
|
2021-11-18 17:27:26 +00:00
|
|
|
SearXNG`` is a valid query for Google. However, if simply the query above is
|
2019-12-12 18:20:56 +00: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 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
See more at :ref:`search-syntax`
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
``categories`` : optional
|
2022-07-24 18:15:03 +00:00
|
|
|
Comma separated list, specifies the active search categories (see
|
|
|
|
:ref:`configured engines`)
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-30 20:55:15 +00:00
|
|
|
``engines`` : optional
|
2022-07-24 18:15:03 +00:00
|
|
|
Comma separated list, specifies the active search engines (see
|
|
|
|
:ref:`configured engines`).
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2022-07-24 18:15:03 +00:00
|
|
|
``language`` : default from :ref:`settings search`
|
2019-12-12 18:20:56 +00:00
|
|
|
Code of the language.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-30 20:55:15 +00:00
|
|
|
``pageno`` : default ``1``
|
2019-12-12 18:20:56 +00:00
|
|
|
Search page number.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-30 20:55:15 +00:00
|
|
|
``time_range`` : optional
|
2019-12-12 18:20:56 +00:00
|
|
|
[ ``day``, ``month``, ``year`` ]
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00: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 14:29:43 +00:00
|
|
|
|
2019-12-30 20:55:15 +00:00
|
|
|
``format`` : optional
|
2019-12-12 18:20:56 +00:00
|
|
|
[ ``json``, ``csv``, ``rss`` ]
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2022-07-24 18:15:03 +00:00
|
|
|
Output format of results. Format needs to be activated in :ref:`settings
|
|
|
|
search`.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-30 20:55:15 +00:00
|
|
|
``results_on_new_tab`` : default ``0``
|
2019-12-12 18:20:56 +00:00
|
|
|
[ ``0``, ``1`` ]
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
Open search results on new tab.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2022-07-24 18:15:03 +00:00
|
|
|
``image_proxy`` : default from :ref:`settings server`
|
2019-12-12 18:20:56 +00:00
|
|
|
[ ``True``, ``False`` ]
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2021-11-18 17:27:26 +00:00
|
|
|
Proxy image results through SearXNG.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2022-07-24 18:15:03 +00:00
|
|
|
``autocomplete`` : default from :ref:`settings search`
|
|
|
|
[ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia``,
|
|
|
|
``swisscows``, ``qwant`` ]
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
Service which completes words as you type.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2022-07-24 18:15:03 +00:00
|
|
|
``safesearch`` : default from :ref:`settings search`
|
|
|
|
[ ``0``, ``1``, ``2`` ]
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00: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 14:29:43 +00:00
|
|
|
|
2022-04-30 06:01:53 +00:00
|
|
|
``theme`` : default ``simple``
|
|
|
|
[ ``simple`` ]
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
Theme of instance.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
Please note, available themes depend on an instance. It is possible that an
|
2020-06-28 09:40:04 +00:00
|
|
|
instance administrator deleted, created or renamed themes on their instance.
|
2019-12-12 18:20:56 +00:00
|
|
|
See the available options in the preferences page of the instance.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-30 20:55:15 +00:00
|
|
|
``enabled_plugins`` : optional
|
2019-12-12 18:20:56 +00:00
|
|
|
List of enabled plugins.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
:default: ``HTTPS_rewrite``, ``Self_Informations``,
|
|
|
|
``Search_on_category_select``, ``Tracker_URL_remover``
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2021-09-10 10:43:33 +00:00
|
|
|
:values: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
|
2019-12-12 18:20:56 +00:00
|
|
|
``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
|
2022-07-24 18:15:03 +00:00
|
|
|
``Search_on_category_select``, ``Hostname_replace``, ``Tor_check_plugin``
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
``disabled_plugins``: optional
|
|
|
|
List of disabled plugins.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2022-07-24 18:15:03 +00:00
|
|
|
:default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``,
|
|
|
|
``Hostname_replace``, ``Tor_check_plugin``
|
|
|
|
|
2019-12-12 18:20:56 +00:00
|
|
|
:values: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
|
|
|
|
``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
|
2022-07-24 18:15:03 +00:00
|
|
|
``Search_on_category_select``, ``Hostname_replace``, ``Tor_check_plugin``
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-30 20:55:15 +00:00
|
|
|
``enabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
|
2019-12-12 18:20:56 +00:00
|
|
|
List of enabled engines.
|
2017-10-23 14:29:43 +00:00
|
|
|
|
2019-12-30 20:55:15 +00:00
|
|
|
``disabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
|
2019-12-12 18:20:56 +00:00
|
|
|
List of disabled engines.
|
2017-10-23 14:29:43 +00:00
|
|
|
|