search_api.rst 2.8KB

123456789101112131415161718192021222324252627282930313233
  1. Search API
  2. ==========
  3. The search supports both ``GET`` and ``POST``.
  4. Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
  5. .. code:: sh
  6. GET /
  7. .. code:: sh
  8. GET /search
  9. Parameters
  10. ``````````
  11. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
  12. | Name | Description | |
  13. +==================+====================================================================================================+==================================================+
  14. | ``q`` | The search query, see :doc:`/user/search_syntax` | required |
  15. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
  16. | ``categories`` | Comma separated list, specifies the active search categories | optional |
  17. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
  18. | ``engines`` | Comma separated list, specifies the active search engines | optional |
  19. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
  20. | ``lang`` | Code of the language | optional (default: ``all``) |
  21. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
  22. | ``pageno`` | Search page number | optional (default: ``1``) |
  23. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
  24. | ``time_range`` | Time range of search | optional (possible: ``day``, ``month``, ``year``)|
  25. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+