search_api.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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:`configured engines`
  15. ``q`` : required
  16. The search query. This string is passed to external search services. Thus,
  17. SearXNG supports syntax of each search service. For example, ``site:github.com
  18. SearXNG`` 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 (see
  24. :ref:`configured engines`)
  25. ``engines`` : optional
  26. Comma separated list, specifies the active search engines (see
  27. :ref:`configured engines`).
  28. ``language`` : default from :ref:`settings search`
  29. Code of the language.
  30. ``pageno`` : default ``1``
  31. Search page number.
  32. ``time_range`` : optional
  33. [ ``day``, ``month``, ``year`` ]
  34. Time range of search for engines which support it. See if an engine supports
  35. time range search in the preferences page of an instance.
  36. ``format`` : optional
  37. [ ``json``, ``csv``, ``rss`` ]
  38. Output format of results. Format needs to be activated in :ref:`settings
  39. search`.
  40. ``results_on_new_tab`` : default ``0``
  41. [ ``0``, ``1`` ]
  42. Open search results on new tab.
  43. ``image_proxy`` : default from :ref:`settings server`
  44. [ ``True``, ``False`` ]
  45. Proxy image results through SearXNG.
  46. ``autocomplete`` : default from :ref:`settings search`
  47. [ ``google``, ``dbpedia``, ``duckduckgo``, ``mwmbl``, ``startpage``,
  48. ``wikipedia``, ``stract``, ``swisscows``, ``qwant`` ]
  49. Service which completes words as you type.
  50. ``safesearch`` : default from :ref:`settings search`
  51. [ ``0``, ``1``, ``2`` ]
  52. Filter search results of engines which support safe search. See if an engine
  53. supports safe search in the preferences page of an instance.
  54. ``theme`` : default ``simple``
  55. [ ``simple`` ]
  56. Theme of instance.
  57. Please note, available themes depend on an instance. It is possible that an
  58. instance administrator deleted, created or renamed themes on their instance.
  59. See the available options in the preferences page of the instance.
  60. ``enabled_plugins`` : optional
  61. List of enabled plugins.
  62. :default:
  63. ``Hash_plugin``, ``Self_Information``,
  64. ``Tracker_URL_remover``, ``Ahmia_blacklist``
  65. :values:
  66. .. enabled by default
  67. ``Hash_plugin``, ``Self_Information``,
  68. ``Tracker_URL_remover``, ``Ahmia_blacklist``,
  69. .. disabled by default
  70. ``Hostnames_plugin``, ``Open_Access_DOI_rewrite``,
  71. ``Vim-like_hotkeys``, ``Tor_check_plugin``
  72. ``disabled_plugins``: optional
  73. List of disabled plugins.
  74. :default:
  75. ``Hostnames_plugin``, ``Open_Access_DOI_rewrite``,
  76. ``Vim-like_hotkeys``, ``Tor_check_plugin``
  77. :values:
  78. see values from ``enabled_plugins``
  79. ``enabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
  80. List of enabled engines.
  81. ``disabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
  82. List of disabled engines.