GET
/
apis
/
ecommerce-service
/
public
/
discovery
/
v2
/
auto-suggest
Fetch Auto-Suggest via Query Parameters
curl --request GET \
  --url https://{base-address}/apis/ecommerce-service/public/discovery/v2/auto-suggest
{
  "Status": "success",
  "Data": {
    "categories": [
      {
        "name": "<string>",
        "page_slug": "<string>",
        "product_count": 123
      }
    ],
    "auto_suggester": [
      "<string>"
    ],
    "popular_searches": [
      "<string>"
    ],
    "redirect_url": "<string>",
    "products": [
      {
        "sku": "<string>",
        "matched_sku": "<string>",
        "position": 123,
        "id": "<string>",
        "score": 123,
        "variant_skus": [
          "<string>"
        ],
        "variants": [
          {
            "id": "<string>",
            "title": "<string>",
            "price": "<string>",
            "sku": "<string>",
            "position": 123,
            "compare_at_price": "<string>",
            "selected_options": [
              {
                "name": "<string>",
                "value": "<string>"
              }
            ],
            "inventory_quantity": 123,
            "inventory_policy": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "image": {
              "id": "<string>",
              "url": "<string>",
              "alt_text": "<string>"
            },
            "inventory_item": {
              "measurement": {
                "weight": {
                  "unit": "<string>",
                  "value": 123
                }
              }
            },
            "__parent_id": "<string>",
            "graphql_id": "<string>",
            "image_id": "<string>",
            "weight": 123,
            "weight_unit": "<string>"
          }
        ],
        "name": "<string>",
        "brand": "<string>",
        "calculated_price": 123,
        "description": "<string>",
        "inventory_level": 123,
        "images": [
          {
            "id": "<string>",
            "url": "<string>",
            "altText": "<string>",
            "graphql_id": "<string>",
            "src": "<string>"
          }
        ],
        "variant_options": [
          {
            "id": "<string>",
            "name": "<string>",
            "position": 123,
            "values": [
              "<string>"
            ],
            "optionValues": [
              {
                "id": "<string>"
              }
            ]
          }
        ],
        "category_meta": [
          {
            "id": "<string>",
            "name": "<string>",
            "provider_id": 123
          }
        ],
        "provider_id": "<string>",
        "page_slug": "<string>",
        "pin": true,
        "slot": true
      }
    ],
    "_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.

currency
string

Currency code for price displays.

include_fields_meta
boolean

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

location_id
string

Identifier for the regional location from the BigCommerce admin panel.

user_id
string

Unique identifier for the user. Id or user email.

session_id
string

Identifier for the user's session id

show_auto_suggester_term
boolean

Whether to show the auto-suggester term.

auto_suggester_term_limit
integer

Limit for the number of auto-suggester terms to return.

show_category
boolean

Whether to show product category name suggestions.

include_category_count
boolean

Whether to include the number of products per category

category_limit
integer

Max number of categories to return.

Whether to Include popular search phrases.

Max number of popular searches to return.

show_recent_searches
boolean

Whether to show user’s recent search history.

recent_searches_limit
integer

Max number of recent searches to return.

show_content_pages
boolean

Whether to show matching content pages in the result

content_pages_limit
integer

Max number of content pages to return.

content_fields
string

Comma-separated list of fields to include for content pages

show_products
boolean

Whether to show products in the result

products_limit
integer

Max number of product suggestions to return.

filter
string

Logical filter expression to narrow results

search_term
string

The search term for generating suggestions or results

is_auto_spellcheck
boolean

Whether to auto-correct misspellings in the search term.

out_of_stock
enum<string>

Whether to include/ exclude/ bury out-of-stock items (INCLUDE / EXCLUDE / BURY)

Available options:
INCLUDE,
EXCLUDE,
BURRY
preview
boolean

Whether this is a preview mode request. If true, the suggestions returns in preview mode.

Response

200
application/json

Auto-suggest results via query parameters.

The response is of type object.