GET
/
apis
/
ecommerce-service
/
public
/
discovery
/
v2
/
search
/
count
Retrieve Product Hit Count via Query Parameters
curl --request GET \
  --url https://{base-address}/apis/ecommerce-service/public/discovery/v2/search/count
{
  "Status": "success",
  "Data": {
    "result": {
      "total_count": 123
    },
    "_meta_": {
      "tenant_id": "<string>",
      "workspace_id": "<string>",
      "env_type": "<string>",
      "store_hash": "<string>",
      "content_model_id": "<string>",
      "_fields_": {}
    }
  }
}
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

search_term
string

The search term for generating suggestions or results

category_id
string

Identifier for the product category to filter results.

category_name
string

Name of the product category to filter results.

collection_id
string

Identifier for a specific collection or campaign to filter results.

skip
integer

Number of items to skip for pagination offset.

limit
integer

Maximum number of items to return.

sort_order
string

Sort direction for counting logic (rarely used for pure counts).asc for ascending, desc for descending.

sort_by
string

Field name by which the results should be sorted.

facets
string

Facet fields with value to filter product by color, size or provided facets

filter
string

Logical filter expression to narrow results

by_pass_merchandising
boolean

Whether to bypass merchandising rules for count calculations

Response

200
application/json

Total count of matching products.

The response is of type object.