Disambiguation
This article refers to the front-end integration of your site with Hawksearch through API for engines based on Hawksearch version 2.0L to 4.0L. For HawkSearch 4.0 implementation, please connect with your Hawksearch representative about using the Hawksearch 4.0 Search API here Hawksearch v4.0 - Search API with the front end SDKs described here - Connectors
Table of Contents
Table of Contents |
---|
...
https://DOMAIN_URL/ENGINE_NAME/?fn=ajax&f=GetSuggestions&q=KEYWORD&hawkoutput=json
Parameter | Description | Value |
---|---|---|
fn | Indicates ajax request | ajax |
f | The function name to be called | GetSuggestions |
q | The keyword. This is the text typed by the user | user-entered alphanumeric value |
hawkoutput | Indicates the format of the response | json |
Response: Response is a JSON object sent back to the caller.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Parameter | DataType | Details |
---|---|---|
Count | Numeric | Total products available for the keyword |
ContentCount | Numeric | Total content items available for the keyword |
Categories | Array of Category Objects | Every category object is a category suggestion: |
Products | Array of Product | Based on the request parameter DisplayFullResponse, the product object has all its fields output or the standard autocomplete format |
Content | Array of Content Item Objects | Array of content item objects with Value and url properties. |
Popular | Array of Popular Searches | Every popular search term object is an object with these two properties: |
SearchWebsiteUrl | Url | Base website url for clickable links. |
TrackingVersion | Alphanumeric text of size 2 | v1 or v2 based on your engine version |
KeywordField | Alphabetic | Parameter used to denote the keyword field |
CategoryHeading | Alphanumeric | Header text for Categories |
ContentHeading | Alphanumeric | Header text for Content Items |
ProductHeading | Alphanumeric | Header text for Products |
PopularHeading | Alphanumeric | Header text for Popular Searches |
ViewAllButtonLabel | Alphanumeric | Header text for “View All” link |
Example URLs for various environments as follows:
Environment | Environment URL |
---|---|
Dev | https://dev.hawksearch.net/sites/demo/?fn=ajax&f=GetSuggestions&q=coat&hawkoutput=json |
Test | https://test.hawksearch.net/sites/demo/?fn=ajax&f=GetSuggestions&q=coat&hawkoutput=json |
Production | https://api.hawksearch.info/sites/demo/?fn=ajax&f=GetSuggestions&q=coat&hawkoutput=json Note: if you have been provided with a custom domain such as yoursite.hawksearch.com, please replace api.hawksearch.info in the above url with your custom domain URL. |
...
HTTP/Keep-Alive
In the event that you see unexpected timeout errors from the site when testing, please confirm your http web request settings for the request you make to hawksearch. In some cases, the clients reset the connection instead of leaving it in Time_Wait/Close_Wait causing IIS to log it as an interruption. In this scenario please force the request to be Http 1.0 with no keep alive and see if timeouts no longer appear.
...