ContentSearch resource (Shop API 23.1)


Http Method Resource Description
GET /content_search Provides keyword and refinement search functionality for content assets. The search result contains only content that is online and assigned to a folder.

Search content

Provides keyword and refinement search functionality for content assets. The search result contains only content that is online and assigned to a folder.


GET http://hostname:port/dw/shop/v23_1/content_search?q={String}&refine={String}&sort={String}&start={Integer}&count={Integer}&locale={String}


json, xml


Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document


Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of instances per request. Default value is 25. maxIntegerValue=200, minIntegerValue=1
locale String The locale context.  
q String The query phrase to search for. maxLength=50
refine String Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=foo=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementType=type1|type2|type3. The following system refinement attribute ids are supported:
  • fdid: Allows to refine per single content folder id. Multiple folder ids are not supported.
sort String Parameter that represents a sorting attribute/value(s) pair. Sorting attribute id and value are separated by '='. The value describes the sort direction. Possible values are 'asc' and 'desc', for ascending or descending sort direction. I.e. sort=c_myAttribute=desc. Precondition: You have to select your sorting attributes in Business Manager > YourSite > Search Indexes > Content Index > Sorting Attributes.  
start Integer The result set index to return the first instance for. Default value is 0. minIntegerValue=0


This Resource supports server-side customization.

Extension Point Method Detail

beforeGET () : Status

The function is called before the request will be processed.

a non-null Status ends the hook execution

modifyGETResponse (doc : ContentSearchResult ) : Status

The function is called after the request has been processed.

doc - the document
a non-null Status ends the hook execution


GET /dw/shop/v23_1/content_search?q=about&refine=fdid=about-us HTTP/1.1
Accept: application/json

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=900,must-revalidate
Content-Length: 11318

  "_v" : "23.1",
  "count" : 4,
  "hits" : [ {
    "description" : "Welcome to Salesforce Commerce Cloud. At Salesforce Commerce Cloud we recognize all good success starts with people ...",
    "id" : "jobs-landing",
    "name" : "Jobs Landing Page",
    "c_body" : "<div><h1>Careers at Salesforce Commerce Cloud</h1><hr /><p>Welcome to Salesforce Commerce Cloud ... "
  }, {
    "description" : "It all started with a series of observations: eCommerce merchandising and marketing innovation is what generates the revenue ...",
    "id" : "about-us",
    "name" : "About Us",
    "c_body" : "<h1">About Us</h1><h2>It all started with a series of observations ...",
    "c_customCSSFile" : ""
  }, {
    "description" : "Interested in getting more information about Salesforce Commerce Cloud and our On-Demand eCommerce solution? Here is information on office locations ...",
    "id" : "contact-us-details",
    "name" : "Contact Us Details",
    "c_body" : "<h5>Connect with Salesforce Commerce Cloud</h5><div><p>Interested in getting more information ..."
  }, {
    "description" : "With Salesforce Commerce Cloud ecommerce, they're spending more time leading with merchandising and marketing. They're in complete control over their site ...",
    "id" : "history",
    "name" : "Our Story",
    "c_body" : "<p><strong>It all started with a series of observations:</strong></p><ul><li>eCommerce merchandising ..."
  } ],
  "query" : "about",
  "refinements" : [ {
    "attribute_id" : "fdid",
    "label" : "About Us",
    "values" : [ {
      "hit_count" : 4,
      "label" : "About Salesforce Commerce Cloud",
      "value" : "about-us",
      "values" : [ {
        "hit_count" : 1,
        "label" : "Our Story",
        "value" : "our-story"
      }, {
        "hit_count" : 0,
        "label" : "Our Team",
        "value" : "our-team"
      }, {
        "hit_count" : 0,
        "label" : "As Seen In",
        "value" : "as-seen-in"
      }, {
        "hit_count" : 1,
        "label" : "Contact Us",
        "value" : "contact-us-new"
      }, {
        "hit_count" : 1,
        "label" : "Join Us",
        "value" : "employment"
      } ]
    }, {
      "hit_count" : 0,
      "label" : "Customer Service",
      "value" : "customer-service"
    } ]
  } ],
  "selected_refinements" : {
    "fdid" : "about-us"
  "start" : 0,
  "total" : 4
X OCAPI versions 15.x and 16.x will be retired on March 31, 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.