search_api.rst 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. Search API
  2. ==========
  3. The search supports both ``GET`` and ``POST``.
  4. Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
  5. ``GET /``
  6. ``GET /search``
  7. Parameters
  8. ~~~~~~~~~~
  9. .. code:: sh
  10. q
  11. The search query. This string is passed to external search services.
  12. Thus, searx supports syntax of each search service. For example, ``site:github.com searx`` is a valid
  13. query for Google. However, if simply the query above is passed to any search engine which does not filter its
  14. results based on this syntax, you might not get the results you wanted.
  15. See more at :doc:`/user/search_syntax`
  16. Required.
  17. .. code:: sh
  18. categories
  19. Comma separated list, specifies the active search categories
  20. Optional.
  21. .. code:: sh
  22. engines
  23. Comma separated list, specifies the active search engines.
  24. Optional.
  25. .. code:: sh
  26. lang
  27. Code of the language.
  28. Optional.
  29. Default: ``all``
  30. .. code:: sh
  31. pageno
  32. Search page number.
  33. Optional.
  34. Default: ``1``
  35. .. code:: sh
  36. time_range
  37. Time range of search for engines which support it. See if an engine supports time range search in the preferences page of an instance.
  38. Optional.
  39. Possible: ``day``, ``month``, ``year``
  40. .. code:: sh
  41. format
  42. Output format of results.
  43. Optional.
  44. Possible: ``json``, ``csv``, ``rss``
  45. .. code:: sh
  46. results_on_new_tab
  47. Open search results on new tab.
  48. Optional.
  49. Default: ``0``
  50. Possible: ``0``, ``1``
  51. .. code:: sh
  52. image_proxy
  53. Proxy image results through searx.
  54. Optional.
  55. Default: ``False``
  56. Possible: ``True``, ``False``
  57. .. code:: sh
  58. autocomplete
  59. Service which completes words as you type.
  60. Optional.
  61. Default: empty
  62. Possible: ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia``
  63. .. code:: sh
  64. safesearch
  65. Filter search results of engines which support safe search. See if an engine supports safe search in the preferences page of an instance.
  66. Optional.
  67. Default: ``None``
  68. Possible: ``0``, ``1``, ``None``
  69. .. code:: sh
  70. theme
  71. Theme of instance.
  72. Optional.
  73. Default: ``oscar``
  74. Possible: ``oscar``, ``simple``, ``legacy``, ``pix-art``, ``courgette``
  75. 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.
  76. .. code:: sh
  77. oscar-style
  78. Style of Oscar theme. It is only parsed if the theme of an instance is ``oscar``.
  79. Optional.
  80. Default: ``logicodev``
  81. Possible: ``pointhi``, ``logicodev``
  82. 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.
  83. .. code:: sh
  84. enabled_plugins
  85. List of enabled plugins.
  86. Optional.
  87. Default: ``HTTPS_rewrite``, ``Self_Informations``, ``Search_on_category_select``, ``Tracker_URL_remover``
  88. Possible: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``, ``Search_on_category_select``
  89. .. code:: sh
  90. disabled_plugins
  91. List of disabled plugins.
  92. Optional.
  93. Default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``
  94. Possible: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``, ``Search_on_category_select``
  95. .. code:: sh
  96. enabled_engines
  97. List of enabled engines.
  98. Optional.
  99. Possible: all engines
  100. .. code:: sh
  101. disabled_engines
  102. List of disabled engines.
  103. Optional.
  104. Possible: all engines