Ponysearch/docs/dev/search_api.rst
2016-07-09 22:31:21 +02:00

31 lines
2.3 KiB
ReStructuredText

Search API
==========
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.
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``) |
+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+