# Competitor Visibility

Returns visibility metrics for all tracked entities (your brand and competitors), including appearance counts, percentages, rankings, and period-over-period changes.

## Request

```
GET /v1/visibility/competitors
```

### 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                   |
| `isPromptBranded` | string\[]         | No       | All         | `Branded` or `Non-Branded`               |
| `promptTypes`     | string\[]         | No       | All         | `COMMERCIAL`, `INFORMATIONAL`, `GENERAL` |

## Response

### Success (200 OK)

```json
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "name": "Acme",
    "websiteUrl": "https://acme.com",
    "type": "SELF",
    "appearanceCount": 1247,
    "appearancePercentage": 68.3,
    "appearanceCountChange": 156,
    "appearancePercentageChange": 3.2,
    "rank": 1,
    "performanceRanges": [
      {
        "startDate": "2026-01-01T00:00:00Z",
        "endDate": "2026-01-31T23:59:59Z",
        "appearanceCount": 389,
        "appearancePercentage": 65.1,
        "rank": 1,
        "totalCount": 598
      }
    ]
  },
  {
    "id": "550e8400-e29b-41d4-a716-446655440003",
    "name": "Globex",
    "websiteUrl": "https://globex.com",
    "type": "DIRECT",
    "appearanceCount": 987,
    "appearancePercentage": 54.1,
    "appearanceCountChange": -23,
    "appearancePercentageChange": -1.8,
    "rank": 2,
    "performanceRanges": [...]
  }
]
```

### Fields

| Field                        | Type            | Description                                            |
| ---------------------------- | --------------- | ------------------------------------------------------ |
| `id`                         | string (UUID)   | Competitor ID                                          |
| `name`                       | string          | Entity name                                            |
| `websiteUrl`                 | string or null  | Entity website                                         |
| `type`                       | string          | `SELF` (your brand), `DIRECT`, or `ORGANIC` competitor |
| `appearanceCount`            | integer or null | Total appearances in AI responses                      |
| `appearancePercentage`       | number or null  | Percentage of prompts where entity appeared            |
| `appearanceCountChange`      | number or null  | Change from previous period                            |
| `appearancePercentageChange` | number or null  | Percentage point change from previous period           |
| `rank`                       | integer or null | Rank among all tracked entities                        |
| `performanceRanges`          | array           | Time-bucketed performance data                         |

### Performance Range Fields

| Field                  | Type              | Description                           |
| ---------------------- | ----------------- | ------------------------------------- |
| `startDate`            | string (ISO 8601) | Bucket start date                     |
| `endDate`              | string (ISO 8601) | Bucket end date                       |
| `appearanceCount`      | integer or null   | Appearances in this period            |
| `appearancePercentage` | number or null    | Appearance rate in this period        |
| `rank`                 | integer or null   | Rank in this period                   |
| `totalCount`           | integer or null   | Total prompts analyzed in this period |

## Examples

### curl

```bash
curl "https://app.limy.ai/api/v1/visibility/competitors?\
startDate=2026-01-01&endDate=2026-03-31" \
  -H "X-API-Key: YOUR_API_KEY"
```

### Python

```python
response = requests.get(
    f"https://app.limy.ai/api/v1/visibility/competitors",
    headers={"X-API-Key": API_KEY},
    params={"startDate": "2026-01-01", "endDate": "2026-03-31"}
)

for entity in response.json():
    change = entity['appearancePercentageChange'] or 0
    print(f"{entity['name']}: {entity['appearancePercentage']}% ({change:+.1f}pp)")
```

### JavaScript

```javascript
const response = await fetch(
  `https://app.limy.ai/api/v1/visibility/competitors?startDate=2026-01-01&endDate=2026-03-31`,
  { headers: { 'X-API-Key': API_KEY } }
);

const entities = await response.json();
entities.forEach(e =>
  console.log(`${e.name}: ${e.appearancePercentage}% (rank #${e.rank})`)
);
```


---

# 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/appearance-over-time/competitor-visibility.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.
