---
title: "Get per-prompt sentiment analytics for a product"
method: GET
path: "/api/v1/analytics/sentiment"
tags: ["Visibility & Mentions"]
---

# Get per-prompt sentiment analytics for a product

`GET /api/v1/analytics/sentiment`

## Request

- Base URL: `https://app.promptingco.com`
- URL: `https://app.promptingco.com/api/v1/analytics/sentiment`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

## Query parameters

- `productId` string, required: Product ID to use as the primary sentiment scope.
- `by` 'prompt'
- `viewId` string: View ID to scope results to prompts assigned to the view.
- `promptId` string: Prompt ID. Returns a daily sentiment time series for one prompt.
- `topicId` string: Topic ID to filter per-prompt sentiment rows.
- `start` string: Start of date window, formatted as YYYY-MM-DD.
- `end` string: End of date window, formatted as YYYY-MM-DD.
- `wow` 'true' | 'false'

## Response `200`

Successful response

- object
  - `ok` true, required
  - `data` object, required
    - `scope` object, required
      - `product` object, required
        - `id` string, required
        - `name` string, required
        - `slug` string, required
      - `view` object
        - `id` string, required
        - `name` string, required
    - `rows` object[], required
      - `date` string
      - `promptId` string, required
      - `prompt` string, required
      - `topicId` string, nullable, required
      - `totalMentions` integer, required
      - `positive` integer, required
      - `neutral` integer, required
      - `negative` integer, required
      - `positivePct` number, required
      - `neutralPct` number, required
      - `negativePct` number, required
      - `wow` integer
      - `wowPct` number
      - `negativeReasons` string[], required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Not found
- `422`: Validation failed
- `500`: Internal server error

---

[API](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api.md) - [All operations](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/llms.txt) - [OpenAPI document](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/revisions/c0451ea10e9a?raw)
