Browse Results

Constructor.io's browse returns easy-to-process JSON responses (similar to search endpoint), including both data on what was requested and the response for your query.

The response format is as follows:

Result structure overview#

{
"request": {
...
},
"response": {
"features": [
...
],
"facets": [
...
],
"collection": {
...
},
"groups": [
...
],
"sort_options": [
...
],
"results": [
...
],
"total_num_results": 454
}
}

Sections

Constructor.io defaults to provide browse results only for the Products section of a customer's browse index.

Groups, facets, features, sort_options, results

There are five arrays returned in the results, and a summary of the total count of results total_num_results. When requesting a collection, a collection object is also returned.

  • facets Summary of all the facets associated with the items returned by items in the result set.
  • collection Information on browsed collection. Present only for browse collection request /browse/collection_id/<collection_id>
  • features State of features for Affinity Engine, Searchandizing, Personalization and Learn To Rank
  • groups Summary of all the groups associated with the items returned by the browse request, information about these groups and the count of items within each group.
  • sort_options Available options for determining the order of items in the results array.
  • results The actual results Constructor.io returned for the browse request.

Browse: Request object#

To simplify the interpretation of results and pairing a given request with the relevant response, the browse endpoint will 'parrot back' the request that was understood by the browse service in the request object.

Values with a default (ie. page, num_results_per_page, section) will always be returned. Otherwise, only the provided parameters will be returned within the request data.

We intentionally omit the following parameters from the response request object for privacy reasons: key, c, i, ui, s, _dt

Example: For the query /browse/group_id/food?key=[your API key]&num_results_per_page=75&filter['animal_type']=bird we might get the following request info:

{
"request": {
"browse_filter_name": "group_id",
"browse_filter_value": "food",
"page": 1,
"num_results_per_page": 75,
"term": "",
"section": "Products",
"sort_by": "relevance",
"sort_order": "descending",
"fmt_options": {
"groups_max_depth": 1,
"groups_start": "current"
},
"filters": {
"animal_type": ["bird"]
},
"filter_match_types": {
"animal_type": "any"
},
"features": {
"auto_generated_refined_query_rules": true,
"manual_searchandizing": true,
"personalization": true,
"query_items": true
}
}
}