diff options
Diffstat (limited to 'docs/dev/search_api.rst')
-rw-r--r-- | docs/dev/search_api.rst | 226 |
1 files changed, 67 insertions, 159 deletions
diff --git a/docs/dev/search_api.rst b/docs/dev/search_api.rst index ea3b0501a..158cab7c5 100644 --- a/docs/dev/search_api.rst +++ b/docs/dev/search_api.rst @@ -1,3 +1,4 @@ +========== Search API ========== @@ -11,194 +12,101 @@ Furthermore, two enpoints ``/`` and ``/search`` are available for querying. ``GET /search`` Parameters -~~~~~~~~~~ - -.. code:: sh - - q - -The search query. This string is passed to external search services. -Thus, searx supports syntax of each search service. For example, ``site:github.com 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. - - -See more at :doc:`/user/search_syntax` - -Required. - -.. code:: sh - - categories - -Comma separated list, specifies the active search categories - -Optional. - -.. code:: sh - - engines - -Comma separated list, specifies the active search engines. - -Optional. - -.. code:: sh - - lang - -Code of the language. - -Optional. - -Default: ``all`` - -.. code:: sh - - pageno - -Search page number. - -Optional. - -Default: ``1`` - -.. code:: sh - - time_range - -Time range of search for engines which support it. See if an engine supports time range search in the preferences page of an instance. - -Optional. - -Possible: ``day``, ``month``, ``year`` - -.. code:: sh - - format - -Output format of results. - -Optional. - -Possible: ``json``, ``csv``, ``rss`` - -.. code:: sh - - results_on_new_tab - -Open search results on new tab. - -Optional. - -Default: ``0`` - -Possible: ``0``, ``1`` - -.. code:: sh - - image_proxy - -Proxy image results through searx. - -Optional. - -Default: ``False`` - -Possible: ``True``, ``False`` - -.. code:: sh - - autocomplete - -Service which completes words as you type. - -Optional. - -Default: empty - -Possible: ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia`` - -.. code:: sh - - safesearch - -Filter search results of engines which support safe search. See if an engine supports safe search in the preferences page of an instance. - -Optional. - -Default: ``None`` - -Possible: ``0``, ``1``, ``None`` - -.. code:: sh - - theme - -Theme of instance. - -Optional. +========== -Default: ``oscar`` +``q`` : required + The search query. This string is passed to external search services. Thus, + searx supports syntax of each search service. For example, ``site:github.com + 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. -Possible: ``oscar``, ``simple``, ``legacy``, ``pix-art``, ``courgette`` + See more at :ref:`search-syntax` -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. +``categories`` : optional + Comma separated list, specifies the active search categories -.. code:: sh +``engines``: optional + Comma separated list, specifies the active search engines. - oscar-style +``lang``: default ``all`` + Code of the language. -Style of Oscar theme. It is only parsed if the theme of an instance is ``oscar``. +``pageno``: default ``1`` + Search page number. -Optional. +``time_range``: optional + [ ``day``, ``month``, ``year`` ] -Default: ``logicodev`` + Time range of search for engines which support it. See if an engine supports + time range search in the preferences page of an instance. -Possible: ``pointhi``, ``logicodev`` +``format``: optional + [ ``json``, ``csv``, ``rss`` ] -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. + Output format of results. -.. code:: sh +``results_on_new_tab``: default ``0`` + [ ``0``, ``1`` ] - enabled_plugins + Open search results on new tab. -List of enabled plugins. +``image_proxy``: default ``False`` + [ ``True``, ``False`` ] -Optional. + Proxy image results through searx. -Default: ``HTTPS_rewrite``, ``Self_Informations``, ``Search_on_category_select``, ``Tracker_URL_remover`` +``autocomplete``: default *empty* + [ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia`` ] -Possible: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``, ``Search_on_category_select`` + Service which completes words as you type. -.. code:: sh +``safesearch``: default ``None`` + [ ``0``, ``1``, ``None`` ] - disabled_plugins + Filter search results of engines which support safe search. See if an engine + supports safe search in the preferences page of an instance. -List of disabled plugins. +``theme``: default ``oscar`` + [ ``oscar``, ``simple``, ``legacy``, ``pix-art``, ``courgette`` ] -Optional. + Theme of instance. -Default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys`` + 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. -Possible: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``, ``Search_on_category_select`` +``oscar-style``: default ``logicodev`` + [ ``pointhi``, ``logicodev`` ] -.. code:: sh + Style of Oscar theme. It is only parsed if the theme of an instance is + ``oscar``. - enabled_engines + 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. -List of enabled engines. +``enabled_plugins``: optional + List of enabled plugins. -Optional. + :default: ``HTTPS_rewrite``, ``Self_Informations``, + ``Search_on_category_select``, ``Tracker_URL_remover`` -Possible: all engines + :values: [ ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``, + ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``, + ``Search_on_category_select`` ] -.. code:: sh +``disabled_plugins``: optional + List of disabled plugins. - disabled_engines + :default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys`` + :values: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``, + ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``, + ``Search_on_category_select`` -List of disabled engines. +``enabled_engines``: optional : *all* :origin:`engines <searx/engines>` + List of enabled engines. -Optional. +``disabled_engines``: optional : *all* :origin:`engines <searx/engines>` + List of disabled engines. -Possible: all engines |