# Sentiment

Returns sentiment scores for all tracked entities (your brand and competitors) with trend data over time. Sentiment is analyzed from how AI search engines describe each entity in their responses.

## Request

```
GET /v1/sentiment/overview
```

### Query Parameters

All [common filters](/getting-started/filtering.md) are supported:

| Parameter   | Type              | Required | Default     | Description            |
| ----------- | ----------------- | -------- | ----------- | ---------------------- |
| `startDate` | string (ISO 8601) | No       | 30 days ago | Start of date range    |
| `endDate`   | string (ISO 8601) | No       | Today       | End of date range      |
| `providers` | string\[]         | No       | All         | Filter by AI provider  |
| `topicIds`  | string\[]         | No       | All         | Filter by topic        |
| `countries` | string\[]         | No       | All         | Filter by country code |

## Response

### Success (200 OK)

```json
{
  "entities": [
    {
      "name": "Acme",
      "latestSentimentScore": 78.5,
      "sentimentScoreChange": 2.3,
      "totalMentions": 1247,
      "runs": [
        {
          "runId": "550e8400-e29b-41d4-a716-446655440010",
          "runDate": "2026-03-15T00:00:00Z",
          "sentimentScore": 78.5
        },
        {
          "runId": "550e8400-e29b-41d4-a716-446655440009",
          "runDate": "2026-03-01T00:00:00Z",
          "sentimentScore": 76.2
        }
      ]
    },
    {
      "name": "Globex",
      "latestSentimentScore": 72.1,
      "sentimentScoreChange": -1.4,
      "totalMentions": 987,
      "runs": [...]
    }
  ]
}
```

### Fields

| Field                              | Type              | Description                           |
| ---------------------------------- | ----------------- | ------------------------------------- |
| `entities`                         | array             | List of entities with sentiment data  |
| `entities[].name`                  | string            | Entity name                           |
| `entities[].latestSentimentScore`  | number            | Most recent sentiment score (0-100)   |
| `entities[].sentimentScoreChange`  | number or null    | Change from previous period           |
| `entities[].totalMentions`         | integer           | Total mentions analyzed for sentiment |
| `entities[].runs`                  | array             | Historical sentiment data points      |
| `entities[].runs[].runId`          | string (UUID)     | Analysis run ID                       |
| `entities[].runs[].runDate`        | string (ISO 8601) | Date of the analysis run              |
| `entities[].runs[].sentimentScore` | number            | Sentiment score for this run (0-100)  |

## Examples

### curl

```bash
curl "https://app.limy.ai/api/v1/sentiment/overview" \
  -H "X-API-Key: YOUR_API_KEY"
```

### Python

```python
response = requests.get(
    f"https://app.limy.ai/api/v1/sentiment/overview",
    headers={"X-API-Key": API_KEY}
)

for entity in response.json()['entities']:
    change = entity['sentimentScoreChange'] or 0
    print(f"{entity['name']}: {entity['latestSentimentScore']}/100 ({change:+.1f})")
```

### JavaScript

```javascript
const response = await fetch(
  `https://app.limy.ai/api/v1/sentiment/overview`,
  { headers: { 'X-API-Key': API_KEY } }
);

const { entities } = await response.json();
entities.forEach(e =>
  console.log(`${e.name}: ${e.latestSentimentScore}/100 (${e.sentimentScoreChange > 0 ? '+' : ''}${e.sentimentScoreChange})`)
);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-reference.limy.ai/analytics/overview-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
