1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-23 12:31:25 +01:00

Merge pull request #679 from kvch/gh-pages

docs: time_range search param, embed
This commit is contained in:
Adam Tauber 2016-09-10 15:21:58 +02:00 committed by GitHub
commit 34039ab85f
2 changed files with 32 additions and 14 deletions

View File

@ -76,3 +76,19 @@ Sample response
],
"safe_search": 0
}
Embed search bar
----------------
The search bar can be embedded into websites. Just paste the example into the HTML of the site.
URL of the searx instance and values are customizable.
.. code:: html
<form method="post" action="https://searx.me/">
<!-- search query --> <input type="text" name="q" />
<!-- categories --> <input type="hidden" name="categories" value="general,social media" />
<!-- language --> <input type="hidden" name="lang" value="all" />
<!-- locale --> <input type="hidden" name="locale" value="en" />
<!-- date filter --> <input type="hidden" name="time_range" value="month" />
</form>

View File

@ -1,7 +1,7 @@
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.
The search supports both ``GET`` and ``POST``.
Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
@ -16,16 +16,18 @@ Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
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``) |
+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| 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``)|
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+