> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rankraft.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sentiment report

> POST /v1/reports/sentiment

How answers that name your brand describe it: the share that are positive, neutral and negative. Answers that were not judged count as neutral, as on the dashboard.

## Body

**site\_id** `string` *required*

The site's id, from [List sites](/api-reference/endpoints/list-sites).

**start\_date** `string` *required*

Inclusive day, `YYYY-MM-DD`, UTC.

**end\_date** `string` *required*

Inclusive day, `YYYY-MM-DD`, UTC. At most 92 days after `start_date`.

**group\_by** `enum\<string\>[]`

Any of: `date`, `platform`, `prompt`, `category`.

**filter** `object`

Fields `platform`, `prompt`, `category`. See [Filtering](/api-reference/filtering).

**limit** `integer` (default: 50)

Rows per page, 1–100.

**cursor** `string`

Opaque cursor from `info.next_cursor`.

## Response

**info** `object`

**properties**

**count** `integer`

Rows in this page.

**total\_results** `integer`

Rows across all pages.

**next\_cursor** `string`

Pass as `cursor` for the next page; null on the last page.

**site\_id** `string`

**start\_date** `string`

**end\_date** `string`

**data** `object[]`

**properties**

**date** `string`

**platform** `string`

**prompt** `object`

**properties**

**id** `string`

**text** `string`

**category** `string`

**positive** `number`

0–1 of answers naming you.

**neutral** `number`

0–1 of answers naming you.

**negative** `number`

0–1 of answers naming you.

**answers\_mentioning** `integer`

Answers that named you — the denominator of the three shares.

**answers** `integer`

All answers in the group.

```bash cURL theme={"system"}
curl -X POST https://api.rankraft.ai/v1/reports/sentiment \
  -H "X-API-Key: $RANKRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "site_id": "3f2c9a10-7b1e-4c55-9d2a-1a2b3c4d5e6f",
    "start_date": "2026-09-01",
    "end_date": "2026-09-30",
    "group_by": ["platform"]
  }'
```

```javascript JavaScript theme={"system"}
// npm install rankraft-js · https://www.npmjs.com/package/rankraft-js
import { RankRaft } from "rankraft-js";

const rr = new RankRaft(); // reads RANKRAFT_API_KEY

const page = await rr.reports.sentiment({
  site_id: "3f2c9a10-7b1e-4c55-9d2a-1a2b3c4d5e6f",
  start_date: "2026-09-01",
  end_date: "2026-09-30",
  group_by: ["platform"],
});
for (const row of page.data) console.log(row.platform, row.positive, row.neutral, row.negative);
```

```python Python theme={"system"}
# pip install rankraft-py · https://pypi.org/project/rankraft-py/
from rankraft import RankRaft

with RankRaft() as rr:  # reads RANKRAFT_API_KEY
    page = rr.reports.sentiment(
        site_id="3f2c9a10-7b1e-4c55-9d2a-1a2b3c4d5e6f",
        start_date="2026-09-01",
        end_date="2026-09-30",
        group_by=["platform"],
    )
    for row in page:
        print(row["platform"], row["positive"], row["neutral"], row["negative"])
```

```json 200 theme={"system"}
{
  "info": {
    "site_id": "3f2c9a10-7b1e-4c55-9d2a-1a2b3c4d5e6f",
    "start_date": "2026-09-01",
    "end_date": "2026-09-30",
    "count": 1,
    "total_results": 1,
    "next_cursor": null
  },
  "data": [
    {
      "platform": "chatgpt",
      "positive": 0.42,
      "neutral": 0.53,
      "negative": 0.05,
      "answers_mentioning": 19,
      "answers": 60
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.