Results structure
Constructor.io's largely schema-less result format allows for a large variety of return values, with some light structure to facilitate common use cases.
Default Data
We'll first review the data Constructor.io returns for all product search queries:
value
The primary value for the item in question - typicallyitem_name
.matched_terms
All terms within the item matching the user's query (regardless of whether misspelled).
In addition to the data always returned, Constructor.io will display any data that's been uploaded for the products in question. We'll go over a typical subset below:
Additional Data (may not be present)
url
The URL where the item can be viewed or purchased.id
An ID that identifies the item within the company.image_url
An image of the item in question.groups
The category(ies) an item belongs to.facets
The facet(s) an item is associated with.variation_id
ID of the selected (best matching) variation. All metadata of the best matching variation will also be merged into the item'sdata
object.variations
list of this item's variations.
Groups info in results response
The Search API will return information on the group(s) the item belongs to. Three pieces of information will always be returned:
display_name
The name of the group as you'd present it to users.group_id
The id of the group. Any ASCII characters can be used.path
The path ofgroup_IDs
above this group./great-grandparent/grandparent/parent/
This example captures common use-cases; please reach out to Constructor.io support if you'd like assistance in designing your search experience.