---
title: "get histogram for a product query (requires owner)"
method: GET
path: "/products/histogram"
tags: ["Scoring"]
---

# get histogram for a product query (requires owner)

`GET /products/histogram`

## Query parameters

- `group_by` 'personal_health_score'
- `q` string
- `usage_id` integer
- `usage_ids[]` string[]
- `category_id` integer
- `brand_id` integer
- `brand_ids[]` integer[]
- `retailer_id` integer
- `retailer_ids[]` integer[]
- `health_group_id` integer
- `health_group_present` true
- `certificate_id` integer
- `certificate_ids[]` integer[]
- `scored` true
- `personal_health_scored` boolean
- `score` integer
- `nutriscore` 'A' | 'B' | 'C' | 'D' | 'E'
- `nutriscores[]` string[]
- `personal_health_score` 'A' | 'B1' | 'B2' | 'C1' | 'C2'
- `personal_health_scores[]` string[]
- `ids` string
- `image` boolean

## Response `200`

success

- object
  - `products_histogram` ProductsHistogram
    - `data` array[] — histogram of scores and their number of products
      - union[] — score-number pair
        - union
          - string
          - number

## Other responses

- `401` — no authenticated owner

---

[API](https://skmtc.net/thequestionmark/apis/questionmark-api-v1-2.md) · [All operations](https://skmtc.net/thequestionmark/apis/questionmark-api-v1-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thequestionmark/questionmark-api-v1-2/versions/936ff09e6fa1/schema)
