---
title: Search results page
slug: product-recommendations/docs/search-results-page
docTags: 
createdAt: 2026-07-30T20:41:31.415Z
---

You can track the search results page by providing the search term used and the reference codes of the *returned* products. Ensure the reference codes match the codes supplied in the product catalog feed.

| Name          |                             |          | Description and usage                                                                                                                                                                                                                                                                          |
| ------------- | --------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| searchResults |                             |          | **Note:** From version 1.3 of the Server-to-Server API, the request payload for search tracking has changed in order to track more accurate information. See [Migration notes (v1.2 to v1.3)](/epiui/CMS/~/link/36aa46e996784a28b64daf6a2ea90c2d.aspx).                                        |
|               | term                        |          | \[String]<br />The search term used.                                                                                                                                                                                                                                                           |
|               | personalisationAttributesId |          | \[Optional] \[String]<br />The unique identifier of the set of recommendations attributes generated by the recommendations request.<br />Currently for use with Personalized Search & Navigation only. Use this ID in tracking requests to identify the set of recommendations attributes.     |
|               | totalNumberOfResults        |          | \[Int]<br />The number of search results.                                                                                                                                                                                                                                                      |
|               | pageNumber                  |          | \[Optional] \[Int]<br />The number of the current page.                                                                                                                                                                                                                                        |
|               | resultsOnPage               |          | \[Optional] \[Int]<br />The number of search results on the page.<br />If not provided, the value defaults to the total number of results.                                                                                                                                                     |
|               | topResults                  |          | The product codes of the top 3 search results.<br />An array of 3 elements containing a refCode property that indicates the reference codes of the top products returned by the search term.                                                                                                   |
|               |                             | refCode  | The product ID returned in the search results.<br />The refCode provided here must exactly match the refCode (guid) specified in the product catalog feed.<br />**Note**: If you have a custom feed, contact Optimizely to find out which field from the feed is used as a product identifier. |
|               | filters                     |          | \[Optional]<br />A list of filters on the page. See examples in the code sample below<br />An array of elements containing the following parameters.                                                                                                                                           |
|               |                             | filter   | \[String]<br />The attribute name of the filter.                                                                                                                                                                                                                                               |
|               |                             | operator | \[Optional]<br />The operation between the filter and the value.<br />\[String]<br />- IN  = include<br />- EX  = exclude<br />- BW  = between for ranges<br />- GT  = greater than<br />- LT  = less than                                                                                     |
|               |                             | values   | List\[String]<br />The attribute values of the filter.                                                                                                                                                                                                                                         |

Search results page tracking request example.

```csharp
{  
      "type"          : "searchresults",
      "ip"            :  "10.42.37.139",
      "session"       : "123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l",
      "cuid"          : "09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O",
      "site"          : "retailer",
      "clientToken"   : "1234abcd5678",
      "channel"       : "web",
      "lang"          : "en-gb",
      "currentURI"    : "www.retailer.com/search.html?term=bags",
      "previousURI"   : "www.retailer.com/home.html",
      "userAgent"     : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
      "searchResults" : {
                          "term"                        : "bags",
                          "personalisationAttributesId" : "abcd1234",
                          "totalNumberOfResults"        : 50,
                          "pageNumber"                  : 1,
                          "resultsOnPage"               : 18,
                          "filters"                     : [ {
                                                              "filter"   : "colour",
                                                              "operator" : "IN",
                                                              "values"   : ["red","orange","yellow"]
                                                            }, 
                                                            {
                                                              "filter"   : "price",
                                                              "operator" : "BW",
                                                              "values"   : ["0","50"]
                                                            }, 
                                                            {
                                                              "filter"   : "size",
                                                              "operator" : "IN",
                                                              "values"   : ["XS","S"]
                                                            }
                                                          ],            
                          "topResults"                  : [ 
                                                            {"refCode" : "RC1"},
                                                            {"refCode" : "RC2"},
                                                            {"refCode" : "RC3"}
                                                          ]
                        }
    }
```
