Search
Clear search
Close search
Google apps
Main menu

How to serve JSON on the GSA on 7.6

For maximum flexibility, Google Search Appliance provides search results in XML format. Using the Google XML results, you can use your own XML parser to customize the display for your search users.

Additionally, GSA has a built-in XSLT (eXtensible Stylesheet Language Transformation) server, and can generate custom HTML using your XSL stylesheet.

Starting from version 7.6, GSA can serve results in JSON format. You can use the following steps in order to get results in JSON:

  1. Navigate to "Search > Search Features > Front Ends" and create a new frontend "json" (enter "json" into "Front End Name" textbox and click "Create").  
  2. On the "Search > Search Features > Front Ends" page click Edit near "json" frontend
  3. Click "Edit underlying XSLT code"
  4. Click "Choose File", select "json_stylesheet.en.xslt" and click "Import". After that click Save.
  5. Change "HTTP Response Content-Type Header" from "text/html" to "json/application" and click Save.
  6. Change "HTTP Response Access-Control-Allow-Origin Header" to your content server hostname/ip (or enter "*" symbol to allow all the hosts) and click Save.
  7. Perform a search query with "proxystylesheet=json" option and see expected results in json format in the downloaded file.
Was this article helpful?
How can we improve it?