on master help sign in
better API docs && more features in list
18a8e60Noemi Vanyi
docs/admin/api.rstnew file+78
@@ -0,0 +1,78 @@
1+.. _adminapi:
2+
3+Administration API
4+------------------
5+
6+Get configuration data
7+~~~~~~~~~~~~~~~~~~~~~~
8+
9+.. code:: sh
10+
11+ GET /config
12+
13+Sample response
14+```````````````
15+
16+.. code:: sh
17+
18+ {
19+ "autocomplete": "",
20+ "categories": [
21+ "map",
22+ "it",
23+ "images",
24+ ],
25+ "default_locale": "",
26+ "default_theme": "oscar",
27+ "engines": [
28+ {
29+ "categories": [
30+ "map"
31+ ],
32+ "enabled": true,
33+ "name": "openstreetmap",
34+ "shortcut": "osm"
35+ },
36+ {
37+ "categories": [
38+ "it"
39+ ],
40+ "enabled": true,
41+ "name": "arch linux wiki",
42+ "shortcut": "al"
43+ },
44+ {
45+ "categories": [
46+ "images"
47+ ],
48+ "enabled": true,
49+ "name": "google images",
50+ "shortcut": "goi"
51+ },
52+ {
53+ "categories": [
54+ "it"
55+ ],
56+ "enabled": false,
57+ "name": "bitbucket",
58+ "shortcut": "bb"
59+ },
60+ ],
61+ "instance_name": "searx",
62+ "locales": {
63+ "de": "Deutsch (German)",
64+ "en": "English",
65+ "eo": "Esperanto (Esperanto)",
66+ },
67+ "plugins": [
68+ {
69+ "enabled": true,
70+ "name": "HTTPS rewrite"
71+ },
72+ {
73+ "enabled": false,
74+ "name": "Vim-like hotkeys"
75+ }
76+ ],
77+ "safe_search": 0
78+ }
docs/dev/plugins.rst+17−17
@@ -1,11 +1,11 @@
1Plugins
1Plugins
2-------
2-------
3
3
4−Plugins can extend/replace functionality of various components inside
4+Plugins can extend or replace functionality of various components of
5searx.
5searx.
6
6
7−example\_plugin.py
7+Example plugin
8−~~~~~~~~~~~~~~~~~~
8+~~~~~~~~~~~~~~
9
9
10.. code:: python
10.. code:: python
11
11
@@ -24,22 +24,22 @@ example\_plugin.py
24 ctx['search'].suggestions.add('example')
24 ctx['search'].suggestions.add('example')
25 return True
25 return True
26
26
27−Currently implemented plugin entry points (a.k.a hooks)
27+Plugin entry points
28−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28+~~~~~~~~~~~~~~~~~~~
29
29
30−- Pre search hook (``pre_search``)
30+Entry points (hooks) define when a plugin runs. Right now only three hooks are implemented. So feel free to implement a hook if it fits the behaviour of your plugin.
31−- Post search hook (``post_search``)
32−- Result hook (``on_result``) (is called if a new result is added (see
33− https\_rewrite plugin))
34
31
35−Feel free to add more hooks to the code if it is required by a plugin.
32+Pre search hook
33+```````````````
36
34
37−TODO
35+Runs BEFORE the search request. Function to implement: ``pre_search``
38−~~~~
39
36
40−- Better documentation
37+Post search hook
41−- More hooks
38+````````````````
42−- search hook (is called while searx is requesting results (for
43− example: things like math-solver), the different hooks are running
44− parallel)
45
39
40+Runs AFTER the search request. Function to implement: ``post_search``
41+
42+Result hook
43+```````````
44+
45+Runs when a new result is added to the result list. Function to implement: ``on_result``
docs/dev/search_api.rst+13−6
@@ -1,13 +1,20 @@
1Search API
1Search API
2==========
2==========
3
3
4−Search API endpoints: ``/``, ``/search``
4+The search supports both ``GET`` and ``POST``. However, using ``GET`` the parameters of the request remain hidden. So it is advised to use ``GET`` for querying.
5−^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
5
7−Endpoints have equivalent functionality.
6+Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
7+
8+.. code:: sh
9+
10+ GET /
11+
12+.. code:: sh
13+
14+ GET /search
8
15
9Parameters
16Parameters
10−^^^^^^^^^^
17+``````````
11
18
12+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
19+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
13| Name | Description | |
20| Name | Description | |
@@ -18,7 +25,7 @@ Parameters
18+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
25+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
19| ``engines`` | Comma separated list, specifies the active search engines | optional |
26| ``engines`` | Comma separated list, specifies the active search engines | optional |
20+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
27+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
28+| ``lang`` | Code of the language | optional (default: ``all``) |
29++------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
21| ``pageno`` | Search page number | optional (default: ``1``) |
30| ``pageno`` | Search page number | optional (default: ``1``) |
22+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
31+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
23−
24−Both ``GET`` and ``POST`` methods are supported.
docs/index.rst+15−6
@@ -1,7 +1,7 @@
1−Privacy-respecting free metasearch engine
1+Welcome to searx
2−=========================================
2+================
3
3
4−Searx is a free software internet metasearch engine which aggregates results from other search engines, while not storing information about its users. Searx does not track or profile its users, nor does it share its users' data with third parties. Additionally, searx can be used over Tor for online anonymity.
4+Searx is a free software internet metasearch engine which aggregates results from more than 70 engines, while not storing information about its users. Searx does not track or profile its users, nor does it share its users' data with third parties. Additionally, searx can be used over Tor for online anonymity.
5
5
6
6
7Features
7Features
@@ -15,16 +15,26 @@ Features
15 - Does not collect its users data
15 - Does not collect its users data
16 - Offers secure, encrypted connections (HTTPS/SSL)
16 - Offers secure, encrypted connections (HTTPS/SSL)
17 - Hosted by organisations, such as La Quadrature du Net, which promote digital rights
17 - Hosted by organisations, such as La Quadrature du Net, which promote digital rights
18+ - About 70 supported search engines
19+ - Easy intergration with any search engine
18
20
19
21
20−Further reading
22+User documentation
21−---------------
23+------------------
22
24
23.. toctree::
25.. toctree::
24 :maxdepth: 1
26 :maxdepth: 1
25
27
26 user/search_syntax
28 user/search_syntax
27
29
30+Administrator documentation
31+---------------------------
32+
33+.. toctree::
34+ :maxdepth: 1
35+
36+ dev/install/installation
37+ admin/api
28
38
29Developer documentation
39Developer documentation
30-----------------------
40-----------------------
@@ -34,7 +44,6 @@ Developer documentation
34
44
35 dev/quickstart
45 dev/quickstart
36 dev/contribution_guide
46 dev/contribution_guide
37− dev/install/installation
38 dev/engine_overview
47 dev/engine_overview
39 dev/search_api
48 dev/search_api
40 dev/plugins
49 dev/plugins