POST
/
apis
/
ecommerce-service
/
public
/
discovery
/
v2
/
search
Execute Product Search
curl --request POST \
  --url https://{base-address}/apis/ecommerce-service/public/discovery/v2/search \
  --header 'Content-Type: application/json' \
  --data '{
  "search_term": "<string>",
  "category_id": "<string>",
  "category_name": "<string>",
  "collection_id": "<string>",
  "facets": [
    {
      "field_internal_name": "<string>",
      "value": "<string>"
    }
  ],
  "filter": [
    {
      "group": {
        "operator": "<string>",
        "rules": [
          {
            "action": "<string>",
            "field_name": "<string>",
            "value": "<string>"
          }
        ]
      }
    }
  ],
  "out_of_stock": "INCLUDE",
  "session_id": "<string>",
  "user_id": "<string>"
}'
{
  "Status": "success",
  "Data": {
    "records": [
      {
        "id": "<string>",
        "content_model_id": "<string>",
        "variant_skus": [
          "<string>"
        ],
        "images": "<string>",
        "profit_percentage": 123,
        "conversion_rate": 123,
        "click_rate": 123,
        "revenue": 123,
        "categories": [
          "<string>"
        ],
        "brand": "<string>",
        "sku": "<string>",
        "name": "<string>",
        "description": "<string>",
        "is_featured": true,
        "calculated_price": 123,
        "sku_for_analytics": [
          "<string>"
        ],
        "reviews_rating_sum": 123,
        "reviews_count": 123,
        "variants": "<string>",
        "sale_price": 123,
        "page_slug": "<string>",
        "price": 123,
        "brand_page_slug": "<string>",
        "provider_id": "<string>",
        "provider_specific_data": "<string>",
        "variant_options": "<string>",
        "retail_price": 123,
        "pin": true,
        "slot": true,
        "include": true,
        "boost": true,
        "is_merchandising": true,
        "position": 123,
        "rule_details": [
          {}
        ]
      }
    ],
    "meta": {
      "STORE_HASH": "<string>",
      "ENV_TYPE": "<string>",
      "TENANT_ID": "<string>",
      "WORKSPACE_ID": "<string>",
      "_fields_": {
        "menu_title": {
          "type": "<string>",
          "sub_type": "<string>",
          "is_array": true,
          "is_searchable": true
        },
        "menu_description": {
          "type": "<string>",
          "sub_type": "<string>",
          "is_array": true,
          "is_searchable": true
        },
        "page_title": {
          "type": "<string>",
          "sub_type": "<string>",
          "is_array": true,
          "is_searchable": true
        }
      },
      "total_count": 123,
      "is_redirects": true,
      "redirect_url": "<string>",
      "did_you_mean": "<string>"
    }
  }
}
Before calling this endpoint, make sure you’ve generated an API token and picked the correct domain. See Authentication & Base URLs.

Headers

x-customer-group-id
string

Optional customer group identifier for segment-specific responses.

x-ecomm-provider
string

E-commerce provider for contextualizing the API call (e.g., shopify, magento, etc.).

Query Parameters

fields
string
required

Comma-separated list of fields to include in the response

locale
string
required

Specifies the language or region for the response data

store_id
string

Identifier of the store within the e-commerce platform.

channel_id
string

Sales or distribution channel identifier.

location_id
string

Identifier for the regional location from the BigCommerce admin panel.

currency
string

Currency code for price displays.

include_fields_meta
boolean

Whether to include metadata about the fields in the response. If true, include metadata for each searchable field.

include_count
boolean

Flag to include count in response. When true, returns total hit count alongside items.

skip
integer

Number of items to skip for pagination offset.

limit
integer

Maximum number of items to return.

sort_order
string

Order of sorting results (asc for ascending, desc for descending)

sort_by
string

Field to sort results by (e.g. price, popularity).

by_pass_merchandising
boolean

Whether to bypass merchandising rules for search. Set to true to ignore merchandising rules in ranking.

Body

application/json

Response

200
application/json

Search results with product list and metadata.

The response is of type object.