---
schema_version: "1"
id: 21e5835bbb3a854dcc42060f2c79727eaa791e8868054dd63ba8662dedfc0574
title: Shop Content Search (deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/references/generated-api-specs/ocapi-shop-content-search.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-shop-content-search
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6c6c64e92cb2609f7bc5c967f8d2ff02a3b44de2ec469513700b6a95a448c88a
products:
  - B2C Commerce
  - Salesforce APIs
---
Shop Content Search (deprecated)

# Shop Content Search (deprecated)

The Shop API endpoints enable developers to build full shopper-experience applications such as storefronts. They are designed for high-scale usage, and include a number of areas such as Baskets & Orders, Customers, Products and Pricing. Shop API endpoints are typically read-only APIs, with the exception of baskets and orders.

**Version:** 25.6

## Servers

*   `https://{host}/s/{siteId}/dw/shop/v25_6`

Protocols: https.

## Security

*   `customers_auth` (basic) User authentication either for a registered or a guest customer (selectable in request body). Access via Base64 encoded customer:password string as 'Authorization: Basic' header.
*   `oauth2_application` (oauth2) Authentication flow with client ID and password with account manager.
    *   OAuth flow application (tokenUrl: https://account.demandware.com:443/dwsso/oauth2/access\_token)
    *   Scope x-info: Scopes are NOT supported. This is just a dummy, because the 'scopes' field is required.
*   `client_id` (apiKey) Add client ID for application identification. Alternative as 'client\_id' query parameter.
    *   API key in header: x-dw-client-id

## Operations

### GET Search content

`GET /content_search`

Operation ID: `Search content`. Tags: content\_search. Security: client\_id; customers\_auth.

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

#### Parameters

*   `q` (query, string) The query phrase to search for.  
    Maximum length: 50.
*   `refine` (query, array of 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` (query, array of 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` (query, integer (int32)) The result set index to return the first instance for. Default value is 0.  
    Minimum: 0.
*   `count` (query, integer (int32)) The maximum number of instances per request. Default value is 25.  
    Minimum: 1. Maximum: 200.
*   `locale` (query, string) The locale context.

#### Responses

*   **default**
    
    Media type: `application/json, text/xml`. Schema: `content_search_result`.
    

## Schemas

### content\_search\_result

Document representing a content search result.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of object_)
*   `hits` (_array of content_) The sorted array of search hits. Can be empty.
*   `next` (_string_) The URL of the next result page.
*   `previous` (_string_) The URL of the previous result page.
*   `query` (_string_) The query String that was searched for.
*   `refinements` (_array of content\_search\_refinement_) The sorted array of search refinements. Can be empty.
*   `selected_refinements` (_object_) Map of selected refinement attribute id/value(s) pairs. The sorting order is the same like in request URL.
    
    Additional properties: `string`.
    
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The total number of documents.

_Example_

```
{
  "count": 4,
  "hits": [
    {
      "description": "Welcome to B2C Commerce. At B2C Commerce we recognize all good success starts with people ...",
      "id": "jobs-landing",
      "name": "Jobs Landing Page",
      "c_body": "&lt;div&gt;&lt;h1&gt;Careers at B2C Commerce&lt;/h1&gt;&lt;hr /&gt;&lt;p&gt;Welcome to B2C Commerce ... "
    },
    {
      "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": "&lt;h1\"&gt;About Us&lt;/h1&gt;&lt;h2&gt;It all started with a series of observations ...",
      "c_customCSSFile": "http://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1365077029384/css/aboutus.css"
    },
    {
      "description": "Interested in getting more information about B2C Commerce and our On-Demand eCommerce solution? Here is information on office locations ...",
      "id": "contact-us-details",
      "name": "Contact Us Details",
      "c_body": "&lt;h5&gt;Connect with B2C Commerce&lt;/h5&gt;&lt;div&gt;&lt;p&gt;Interested in getting more information ..."
    },
    {
      "description": "With B2C Commerce 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": "&lt;p&gt;&lt;strong&gt;It all started with a series of observations:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;eCommerce merchandising ..."
    }
  ],
  "query": "about",
  "refinements": [
    {
      "attribute_id": "fdid",
      "label": "About Us",
      "values": [
        {
          "hit_count": 4,
          "label": "About B2C Commerce",
          "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
}
```

### content

Document representing a content asset.

*   `description` (_string_) The localized content asset description.
*   `id` (_string_, required) The id of the content asset.  
    Minimum length: 1. Maximum length: 256.
*   `name` (_string_) The localized content asset name.
*   `page_description` (_string_) The localized content asset page description.
*   `page_keywords` (_string_) The localized content asset page description.
*   `page_title` (_string_) The localized content asset page title.

_Example_

```
{
  "description": "It all started with a series of observations...",
  "id": "about-us",
  "name": "About Us",
  "c_body": "&lt;h1&gt;About Us&lt;/h1&gt;&lt;h2&gt;It all started with a series of observations ...",
  "c_customCSSFile": "http://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1365077029384/css/aboutus.css"
}
```

### content\_search\_refinement

Document representing a search refinement attribute.

*   `attribute_id` (_string_, required) The id of the search refinement attribute. In the case of an attribute refinement, this is the attribute id. Custom attributes are marked by the prefix "c\_".
*   `label` (_string_) The localized label of the refinement.
*   `values` (_array of content\_search\_refinement\_value_) The sorted array of refinement values. The array can be empty.

### content\_search\_refinement\_value

Document representing a search refinement value.

*   `description` (_string_) The localized description of the refinement value.
*   `hit_count` (_integer (int32)_) The number of search hits (0 or more) when selecting the refinement value.
*   `label` (_string_) The localized label of the refinement value.
*   `presentation_id` (_string_) The optional presentation id associated with the refinement value. The presentation id can be used, for example, to associate an id with an HTML widget.
*   `value` (_string_) The refinement value. In the case of an attribute refinement, this is the bucket, the attribute value, or a value range. In the case of a content folder refinement, this is the folder id.
*   `values` (_array of content\_search\_refinement\_value_) The array of hierarchical refinement values. This array can be empty.

### cause

*   `cause` (_cause_)
*   `message` (_string_)
*   `type` (_string_)

### fault

Document representing a fault message that is returned whenever the HTTP status code is greater than or equal to 400 (which indicates an error).

*   `arguments` (_object_)
    
    A map that provides fault arguments.
    
    Data can be used to provide error messages on the client side.
    
    Additional properties: `object`.
    
*   `cause` (_cause_)
*   `display_message_pattern` (_string_) The localized display message pattern, if the request parameter display\_locale was given
*   `message` (_string_) The message text of the java exception.
*   `stack_trace` (_string_)
*   `type` (_string_) The name of the java exception.