api.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. .. _adminapi:
  2. ==================
  3. Administration API
  4. ==================
  5. Get configuration data
  6. ======================
  7. .. code:: http
  8. GET /config HTTP/1.1
  9. Sample response
  10. ---------------
  11. .. code:: json
  12. {
  13. "autocomplete": "",
  14. "categories": [
  15. "map",
  16. "it",
  17. "images",
  18. ],
  19. "default_locale": "",
  20. "default_theme": "oscar",
  21. "engines": [
  22. {
  23. "categories": [
  24. "map"
  25. ],
  26. "enabled": true,
  27. "name": "openstreetmap",
  28. "shortcut": "osm"
  29. },
  30. {
  31. "categories": [
  32. "it"
  33. ],
  34. "enabled": true,
  35. "name": "arch linux wiki",
  36. "shortcut": "al"
  37. },
  38. {
  39. "categories": [
  40. "images"
  41. ],
  42. "enabled": true,
  43. "name": "google images",
  44. "shortcut": "goi"
  45. },
  46. {
  47. "categories": [
  48. "it"
  49. ],
  50. "enabled": false,
  51. "name": "bitbucket",
  52. "shortcut": "bb"
  53. },
  54. ],
  55. "instance_name": "searx",
  56. "locales": {
  57. "de": "Deutsch (German)",
  58. "en": "English",
  59. "eo": "Esperanto (Esperanto)",
  60. },
  61. "plugins": [
  62. {
  63. "enabled": true,
  64. "name": "HTTPS rewrite"
  65. },
  66. {
  67. "enabled": false,
  68. "name": "Vim-like hotkeys"
  69. }
  70. ],
  71. "safe_search": 0
  72. }
  73. Embed search bar
  74. ================
  75. The search bar can be embedded into websites. Just paste the example into the
  76. HTML of the site. URL of the searx instance and values are customizable.
  77. .. code:: html
  78. <form method="post" action="https://searx.me/">
  79. <!-- search --> <input type="text" name="q" />
  80. <!-- categories --> <input type="hidden" name="categories" value="general,social media" />
  81. <!-- language --> <input type="hidden" name="lang" value="all" />
  82. <!-- locale --> <input type="hidden" name="locale" value="en" />
  83. <!-- date filter --> <input type="hidden" name="time_range" value="month" />
  84. </form>