---
title: "Get Shopping Trend"
method: POST
path: "/products/trend"
tags: ["Products"]
---

# Get Shopping Trend

`POST /products/trend`

Return a product or brand shopping time series over a date range. Requires bucket and exactly one of product_ids or brand_ids.

## Request body

- object
  - `project_id` string — Required if using a company api key
  - `start_date` string, date — full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21
  - `end_date` string, date — full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21
  - `category_ids` string[] — Filter by shopping categories. Parent categories include descendants.
  - `country_codes` string[]
  - `model_channel_ids` string[]
  - `topic_ids` string[]
  - `tag_ids` string[]
  - `tag_operator` 'and' | 'or'
  - `merchant_ids` string[] — Filter to products sold through these merchants.
  - `bucket` 'day' | 'week' | 'month', required — Time-bucket granularity.
  - `brand_ids` string[] — Global brands to chart.
  - `product_ids` string[] — Products to chart.
  - `chat_scope` 'all' | 'shopping' — Which chats the visibility denominator counts: every in-scope chat ('all') or only product-gallery ('shopping') chats. Defaults to 'shopping'.

## Response `200`

Success

- object — Success
  - `entity_type` 'product' | 'brand', required
  - `series` object[], required
    - `entity_id` string, required
    - `points` object[], required
      - `date` string, required
      - `visibility` number, required
      - `win_rate` number, required
      - `avg_position` number, nullable, required
      - `sov` number, required
      - `has_data` boolean, required

---

[API](https://skmtc.net/peec/apis/peec-ai-customer-api.md) · [All operations](https://skmtc.net/peec/apis/peec-ai-customer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/peec/peec-ai-customer-api/revisions/92840a1bffa7/schema)
