search_api.rst 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. .. _search API:
  2. ==========
  3. Search API
  4. ==========
  5. The search supports both ``GET`` and ``POST``.
  6. Furthermore, two endpoints ``/`` and ``/search`` are available for querying.
  7. ``GET /``
  8. ``GET /search``
  9. Parameters
  10. ==========
  11. .. sidebar:: Further reading ..
  12. - :ref:`engines-dev`
  13. - :ref:`settings.yml`
  14. - :ref:`engines generic`
  15. ``q`` : required
  16. The search query. This string is passed to external search services. Thus,
  17. searx supports syntax of each search service. For example, ``site:github.com
  18. searx`` is a valid query for Google. However, if simply the query above is
  19. passed to any search engine which does not filter its results based on this
  20. syntax, you might not get the results you wanted.
  21. See more at :ref:`search-syntax`
  22. ``categories`` : optional
  23. Comma separated list, specifies the active search categories
  24. ``engines`` : optional
  25. Comma separated list, specifies the active search engines.
  26. ``lang`` : default ``all``
  27. Code of the language.
  28. ``pageno`` : default ``1``
  29. Search page number.
  30. ``time_range`` : optional
  31. [ ``day``, ``month``, ``year`` ]
  32. Time range of search for engines which support it. See if an engine supports
  33. time range search in the preferences page of an instance.
  34. ``format`` : optional
  35. [ ``json``, ``csv``, ``rss`` ]
  36. Output format of results.
  37. ``results_on_new_tab`` : default ``0``
  38. [ ``0``, ``1`` ]
  39. Open search results on new tab.
  40. ``image_proxy`` : default ``False``
  41. [ ``True``, ``False`` ]
  42. Proxy image results through searx.
  43. ``autocomplete`` : default *empty*
  44. [ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia`` ]
  45. Service which completes words as you type.
  46. ``safesearch`` : default ``None``
  47. [ ``0``, ``1``, ``None`` ]
  48. Filter search results of engines which support safe search. See if an engine
  49. supports safe search in the preferences page of an instance.
  50. ``theme`` : default ``oscar``
  51. [ ``oscar``, ``simple`` ]
  52. Theme of instance.
  53. Please note, available themes depend on an instance. It is possible that an
  54. instance administrator deleted, created or renamed themes on their instance.
  55. See the available options in the preferences page of the instance.
  56. ``oscar-style`` : default ``logicodev``
  57. [ ``pointhi``, ``logicodev`` ]
  58. Style of Oscar theme. It is only parsed if the theme of an instance is
  59. ``oscar``.
  60. Please note, available styles depend on an instance. It is possible that an
  61. instance administrator deleted, created or renamed styles on their
  62. instance. See the available options in the preferences page of the instance.
  63. ``enabled_plugins`` : optional
  64. List of enabled plugins.
  65. :default: ``HTTPS_rewrite``, ``Self_Informations``,
  66. ``Search_on_category_select``, ``Tracker_URL_remover``
  67. :values: [ ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
  68. ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
  69. ``Search_on_category_select`` ]
  70. ``disabled_plugins``: optional
  71. List of disabled plugins.
  72. :default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``
  73. :values: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
  74. ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
  75. ``Search_on_category_select``
  76. ``enabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
  77. List of enabled engines.
  78. ``disabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
  79. List of disabled engines.