Installation and Setup
While it is possible to utilize the wrapper in conjunction with public searx instances these instances frequently do not permit API access (see note on output format below) and have limitations on the frequency of requests. It is recommended to opt for a self-hosted instance instead.Self Hosted Instance:
See this page for installation instructions. When you install SearxNG, the only active output format by default is the HTML format. You need to activate thejson
format to use the API. This can be done by adding the following line to the settings.yml
file:
curl -kLX GET --data-urlencode q='langchain' -d format=json http://localhost:8888
This should return a JSON object with the results.
Wrappers
Utility
To use the wrapper we need to pass the host of the SearxNG instance to the wrapper with:- the named parameter
searx_host
when creating the instance. - exporting the environment variable
SEARXNG_HOST
.