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

# Trend

> Daily history of visibility, sentiment, and prompt counts for charting

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
GET /v1/ai-visibility/:appId/trend
```

Returns a **daily series** of AI Visibility metrics. Use it to draw the chart on your dashboard — score over time, sentiment over time, prompt coverage over time — for a single `(app, country, model)` combination.

The series can be scoped to either:

* the **whole app** (default) — the same numbers the headline gauge shows in [GET /overview](https://docs.appeeky.com/docs/ai-visibility-overview-endpoint.md), one row per scored day.
* a **single intent** — pass `intentId` to drill into how visibility for that one user goal moved over time.

***

## Path parameters

| Name | Type | Required | Description |
| - | - | - | - |
| appId | string | Yes | Apple App ID (numeric) |

## Query parameters

| Name | Type | Default | Description |
| - | - | - | - |
| country | string | `us` | ISO country code |
| model | string | `chatgpt` | One of `chatgpt`, `claude`, `gemini`, `perplexity` |
| windowDays | int | `30` | Lookback window. Min 1, max 90. |
| intentId | string | — | Optional. If provided, restricts the series to that one intent. Otherwise returns the app-level series (`intent_id IS NULL`). |

***

## Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "data": [
    {
      "date": "2026-04-12",
      "visibilityScore": 31,
      "visibilityPct": 22.2,
      "sentimentPct": 64,
      "positionAvg": 3.1,
      "promptsTotal": 54,
      "promptsWithOwner": 12
    },
    {
      "date": "2026-04-15",
      "visibilityScore": 38,
      "visibilityPct": 27.8,
      "sentimentPct": 67,
      "positionAvg": 2.7,
      "promptsTotal": 54,
      "promptsWithOwner": 15
    },
    {
      "date": "2026-04-18",
      "visibilityScore": 42,
      "visibilityPct": 31.5,
      "sentimentPct": 70,
      "positionAvg": 2.4,
      "promptsTotal": 54,
      "promptsWithOwner": 17
    }
  ]
}
```

Rows are returned **oldest → newest** so a chart library can plot them directly. Days without a scan are omitted (the series isn't densified) — pass `windowDays=30` and you'll get however many days actually have data inside that window.

| Field | Type | Description |
| - | - | - |
| date | string | ISO date (`YYYY-MM-DD`) the scan was scored on |
| visibilityScore | int | 0–100 composite score for that day |
| visibilityPct | number | % of prompts that mentioned your app |
| sentimentPct | number \| null | Average sentiment of mentions, expressed 0–100. Null when there were no mentions. |
| positionAvg | number \| null | Average rank position of your app in mentions. Null when there were no mentions. |
| promptsTotal | int | How many prompts were scanned that day |
| promptsWithOwner | int | How many of those mentioned your app |

***

## Examples

### App-level 30-day trend (default)

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl https://api.appeeky.com/v1/ai-visibility/1234567890/trend \
  -H "Authorization: Bearer $JWT"
```

### Single intent, 90-day window

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.appeeky.com/v1/ai-visibility/1234567890/trend?intentId=8c3a-xxxx&windowDays=90" \
  -H "Authorization: Bearer $JWT"
```

### Compare models side-by-side

Call the endpoint once per model and overlay the series:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
for m in chatgpt claude gemini perplexity; do
  curl "https://api.appeeky.com/v1/ai-visibility/1234567890/trend?model=$m" \
    -H "Authorization: Bearer $JWT" > "trend-$m.json"
done
```

***

## Credits

This is a **read** endpoint billed against the AI Visibility credit pool: **1 credit per call**. See [Overview & pricing](https://docs.appeeky.com/docs/ai-visibility-overview.md) for the full pricing table.


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