search_api.txt 3.1KB

1234567891011121314151617181920212223242526272829303132333435
  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. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
  26. | ``format`` | Output format of results | optional (possible: ``json``, ``csv``, ``rss``) |
  27. +------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+