POST
/
apis
/
ecommerce-service
/
public
/
discovery
/
v2
/
auto-suggest
Fetch Auto-Suggest Data
curl --request POST \
  --url https://{base-address}/apis/ecommerce-service/public/discovery/v2/auto-suggest \
  --header 'Content-Type: application/json' \
  --data '{
  "show_auto_suggester_term": true,
  "auto_suggester_term_limit": 123,
  "show_category": true,
  "include_category_count": true,
  "category_limit": 123,
  "show_popular_searches": true,
  "popular_searches_limit": 123,
  "show_recent_searches": true,
  "recent_searches_limit": 123,
  "show_content_pages": true,
  "content_pages_limit": 123,
  "show_products": true,
  "products_limit": 123,
  "search_term": "<string>",
  "filter": [
    {
      "group": {
        "operator": "<string>",
        "rules": [
          {
            "action": "<string>",
            "field_name": "<string>",
            "value": "<string>"
          }
        ]
      }
    }
  ],
  "is_auto_spellcheck": true,
  "out_of_stock": "<string>",
  "user_id": "<string>",
  "session_id": "<string>",
  "preview": true
}'
{
  "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.

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, returns metadata for each filterable field.

content_fields
string

Comma-separated list of fields to include for content pages

Body

application/json

Request body

The body is of type object.

Response

200
application/json

Auto-suggest payload containing terms, categories, products, pages, and more.

The response is of type object.