diff options
author | Adam Tauber <asciimoo@gmail.com> | 2016-12-10 21:38:34 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2016-12-10 21:38:34 +0100 |
commit | a764ebb4b1025e017c2e10bc9b93066cfcfffcda (patch) | |
tree | 001232c21a2dece4fff77a6ee6821b16931216e5 /searx | |
parent | c3dcebb778e718c52f013be47dd9ff141421273d (diff) | |
download | searxng-a764ebb4b1025e017c2e10bc9b93066cfcfffcda.tar.gz searxng-a764ebb4b1025e017c2e10bc9b93066cfcfffcda.zip |
[enh] extend json response with suggestions, infoboxes and answers
Diffstat (limited to 'searx')
-rw-r--r-- | searx/webapp.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 7d4936f18..096e1f269 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -470,7 +470,10 @@ def index(): if output_format == 'json': return Response(json.dumps({'query': search_query.query, 'number_of_results': number_of_results, - 'results': results}), + 'results': results, + 'answers': list(result_container.answers), + 'infoboxes': result_container.infoboxes, + 'suggestions': list(result_container.suggestions)}), mimetype='application/json') elif output_format == 'csv': csv = UnicodeWriter(cStringIO.StringIO()) |