summaryrefslogtreecommitdiff
path: root/docs/dev/search_api.rst
blob: 331bc4eb9cdbdc127c1146fde23ab9f9daa8de32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Search API
==========

The search supports both ``GET`` and ``POST``.

Furthermore, two enpoints ``/`` and ``/search`` are available for querying.

.. code:: sh

    GET /

.. code:: sh

    GET /search

Parameters
``````````

+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| Name             | Description                                                                                        |                                                  |
+==================+====================================================================================================+==================================================+
| ``q``            | The search query, see :doc:`/user/search_syntax`                                                   | required                                         |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``categories``   | Comma separated list, specifies the active search categories                                       | optional                                         |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``engines``      | Comma separated list, specifies the active search engines                                          | optional                                         |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``lang``         | Code of the language                                                                               | optional (default: ``all``)                      |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``pageno``       | Search page number                                                                                 | optional (default: ``1``)                        |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``time_range``   | Time range of search                                                                               | optional (possible: ``day``, ``month``, ``year``)|
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``format``       | Output format of results                                                                           | optional (possible: ``json``, ``csv``, ``rss``)  |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+