Skip to content

联网搜索请求失败 #289

Discussion options

You must be logged in to vote

通常情况下,searxNG不允许API调用,也就是说输出格式是HTML格式,你需要修改settings.yml来开启。
如果你使用docker部署,检查环境变量里是否有
SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
如果有,请映射该配置文件到宿主机合适目录并在.yml中添加- json

search:
    formats:
         - html
         - json

重启后你可以使用curl -kLX GET --data-urlencode q='searxNG' -d format=json http://你的域名来检查是否返回JSON 。

Replies: 9 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@spongxin
Comment options

Answer selected by zmh-program
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
5 participants
Converted from issue

This discussion was converted from issue #282 on November 23, 2024 18:43.