---
title: "Find competitor citation gaps | Citations | AEO API"
description: "Finds external sites cited when a tracked competitor appeared and the brand did not."
url: "https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citation-gaps"
canonical: "https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citation-gaps"
last_updated: "2026-11-30"
---

Citations

# Find competitor citation gaps

Finds external sites cited when a tracked competitor appeared and the brand did not.

[`GET /v2/analytics/{dataset}`](https://aeoapi.dev/docs/api-reference#get-v2-analytics-dataset)

- Path `dataset` is `citation_gaps`.

## Authentication and access

**Authentication**

Bearer API key

**Scopes**

analytics:read

**Roles**

approver, editor, owner, publisher, service, viewer

**Plans**

Optimizer, Analyzer

**Credits**

No credit charge.

## Parameters

Request parameters

| Name | Where | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `dataset` | path | `"citation_gaps"` | Yes |  |
| `brand_id` | query | `string (uuid)` | Yes |  |
| `month` | query | `string \| null` | No |  |
| `report_id` | query | `string (uuid) \| null` | No |  |
| `engine` | query | `string \| null` | No |  |
| `ai_search` | query | `string \| null` | No | The AI search product the answer came from, such as google_ai_overviews. |
| `topic_id` | query | `string \| null` | No |  |
| `prompt_id` | query | `string (uuid) \| null` | No |  |
| `limit` | query | `integer` | No |  |
| `offset` | query | `integer` | No |  |
| `location_id` | query | `string (uuid)` | No | Limit to one location. |
| `checks_as_of` | query | `string (date-time)` | No | Send the check time from page one. |

## Request body

Send this request without a body.

## Request examples

Set `AEO_API_BASE_URL` to `https://api.aeoapi.dev` and `AEO_API_KEY` to your server-side API key. Set the other environment variables to the values for your request.

```bash
curl --fail-with-body --get "$AEO_API_BASE_URL/v2/analytics/citation_gaps" \
  -H "Authorization: Bearer $AEO_API_KEY" \
  --data-urlencode "brand_id=$BRAND_ID"
```

```python
from os import environ
from aeo_sdk import AeoClient

with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
    response = client.v2_get_analytics_dataset(
        dataset="citation_gaps",
        brand_id=environ["BRAND_ID"],
    )
    print(response.body)
```

```typescript
import { AeoClient } from "@aeoapi/aeo-sdk";

const client = new AeoClient(process.env.AEO_API_KEY!, {
  baseUrl: process.env.AEO_API_BASE_URL!,
});
const response = await client.v2GetAnalyticsDataset(
  "citation_gaps",
  {
    brand_id: process.env.BRAND_ID!,
  },
);
console.log(response.body);
```

## Responses

#### HTTP 200

Successful Response

`application/json`

Response fields are listed below.

HTTP 200 response fields 1

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `object` | Yes | The requested result. See the fields below for its contents. |
| `data.answers_with_tracked_competitors_in_scope` | `integer` | Yes |  |
| `data.brand_id` | `string` | Yes | Identifies the brand this result belongs to. |
| `data.brand_missing_from_count` | `integer` | Yes |  |
| `data.checks_as_of` | `string` | Yes |  |
| `data.competitor_cited_sources_count` | `integer` | Yes |  |
| `data.competitor_without_brand_answers` | `integer` | Yes |  |
| `data.competitors` | `array of object` | Yes |  |
| `data.competitors[].answers` | `integer` | Yes |  |
| `data.competitors[].location_id` | `string \| null` | Yes |  |
| `data.competitors[].name` | `string` | Yes |  |
| `data.domains` | `array of object` | Yes |  |
| `data.domains[].domain` | `string` | Yes |  |
| `data.domains[].domain_relationship` | `"registered_competitor" \| "other_external"` | Yes |  |
| `data.domains[].gap_answers_citing_domain` | `integer` | Yes |  |
| `data.gap_answers_with_displayable_citations` | `integer` | Yes |  |
| `data.location_groups` | `array of object` | Yes |  |
| `data.location_groups[].brand_missing_from_count` | `integer` | Yes |  |
| `data.location_groups[].competitor_cited_sources_count` | `integer` | Yes |  |
| `data.location_groups[].location_id` | `string \| null` | Yes |  |
| `data.location_id` | `string \| null` | Yes |  |
| `data.missing_sources` | `array of object` | Yes |  |
| `data.missing_sources[].answers_affected` | `integer` | Yes |  |
| `data.missing_sources[].brand_cited_in_answers` | `boolean` | Yes |  |
| `data.missing_sources[].brand_present_on_page` | `boolean \| null` | Yes |  |
| `data.missing_sources[].classification_basis` | `"curated_domain" \| "url_pattern" \| "page_content" \| "unknown"` | Yes |  |
| `data.missing_sources[].classification_confidence` | `number` | Yes |  |
| `data.missing_sources[].competitor_evidence` | `"page_check" \| "co_citation"` | Yes |  |
| `data.missing_sources[].competitors_present_on_page` | `array of string` | Yes |  |
| `data.missing_sources[].domain` | `string` | Yes |  |
| `data.missing_sources[].engines` | `array of string` | Yes |  |
| `data.missing_sources[].evidence` | `object` | Yes |  |
| `data.missing_sources[].evidence.answer_ids` | `array of string` | Yes |  |
| `data.missing_sources[].evidence.competitors` | `array of string` | Yes |  |
| `data.missing_sources[].evidence.engines` | `array of string` | Yes |  |
| `data.missing_sources[].evidence.prompt_ids` | `array of string` | Yes |  |
| `data.missing_sources[].last_checked_at` | `string \| null` | Yes |  |
| `data.missing_sources[].latest_cited_at` | `string` | Yes |  |
| `data.missing_sources[].location_id` | `string \| null` | Yes |  |
| `data.missing_sources[].page_type` | `string` | Yes |  |
| `data.missing_sources[].priority_reasons` | `array of string` | Yes |  |
| `data.missing_sources[].priority_score` | `integer` | Yes |  |
| `data.missing_sources[].prompts_affected` | `integer` | Yes |  |
| `data.missing_sources[].resolved_answer` | `object` | No |  |
| `data.missing_sources[].resolved_answer.answer_id` | `string \| null` | Conditional |  |
| `data.missing_sources[].resolved_answer.basis` | `"page_check" \| "answer"` | Conditional |  |
| `data.missing_sources[].resolved_answer.observed_at` | `string` | Conditional |  |
| `data.missing_sources[].source_category` | `"directory" \| "review_site" \| "local_directory" \| "industry_directory" \| "forum" \| "social" \| "video" \| "news" \| "local_news" \| "comparison" \| "marketplace" \| "brand_site" \| "competitor_site" \| "docs" \| "press" \| "other"` | Yes |  |
| `data.missing_sources[].url` | `string` | Yes |  |
| `data.month` | `string \| null` | Yes |  |
| `data.next_offset` | `integer \| null` | Yes |  |
| `data.next_sources_offset` | `integer \| null` | Yes |  |
| `data.report_id` | `string \| null` | Yes |  |
| `data.third_party_domains` | `array of object` | Yes |  |
| `data.third_party_domains[].answers_affected` | `integer` | Yes |  |
| `data.third_party_domains[].competitors` | `array of string` | Yes |  |
| `data.third_party_domains[].domain` | `string` | Yes |  |
| `data.third_party_domains[].location_id` | `string \| null` | Yes |  |
| `data.third_party_domains[].pages` | `integer` | Yes |  |
| `data.third_party_sources` | `array of object` | Yes |  |
| `data.third_party_sources[].answers_affected` | `integer` | Yes |  |
| `data.third_party_sources[].brand_cited_in_answers` | `boolean` | Yes |  |
| `data.third_party_sources[].brand_present_on_page` | `boolean \| null` | Yes |  |
| `data.third_party_sources[].classification_basis` | `"curated_domain" \| "url_pattern" \| "page_content" \| "unknown"` | Yes |  |
| `data.third_party_sources[].classification_confidence` | `number` | Yes |  |
| `data.third_party_sources[].competitor_evidence` | `"page_check" \| "co_citation"` | Yes |  |
| `data.third_party_sources[].competitors_present_on_page` | `array of string` | Yes |  |
| `data.third_party_sources[].domain` | `string` | Yes |  |
| `data.third_party_sources[].engines` | `array of string` | Yes |  |
| `data.third_party_sources[].evidence` | `object` | Yes |  |
| `data.third_party_sources[].evidence.answer_ids` | `array of string` | Yes |  |
| `data.third_party_sources[].evidence.competitors` | `array of string` | Yes |  |
| `data.third_party_sources[].evidence.engines` | `array of string` | Yes |  |
| `data.third_party_sources[].evidence.prompt_ids` | `array of string` | Yes |  |
| `data.third_party_sources[].last_checked_at` | `string \| null` | Yes |  |
| `data.third_party_sources[].latest_cited_at` | `string` | Yes |  |
| `data.third_party_sources[].location_id` | `string \| null` | Yes |  |
| `data.third_party_sources[].page_type` | `string` | Yes |  |
| `data.third_party_sources[].priority_reasons` | `array of string` | Yes |  |
| `data.third_party_sources[].priority_score` | `integer` | Yes |  |
| `data.third_party_sources[].prompts_affected` | `integer` | Yes |  |
| `data.third_party_sources[].resolved_answer` | `object` | No |  |
| `data.third_party_sources[].resolved_answer.answer_id` | `string \| null` | Conditional |  |
| `data.third_party_sources[].resolved_answer.basis` | `"page_check" \| "answer"` | Conditional |  |
| `data.third_party_sources[].resolved_answer.observed_at` | `string` | Conditional |  |
| `data.third_party_sources[].source_category` | `"directory" \| "review_site" \| "local_directory" \| "industry_directory" \| "forum" \| "social" \| "video" \| "news" \| "local_news" \| "comparison" \| "marketplace" \| "brand_site" \| "competitor_site" \| "docs" \| "press" \| "other"` | Yes |  |
| `data.third_party_sources[].url` | `string` | Yes |  |
| `data.total_domains` | `integer` | Yes |  |
| `data.total_missing_sources` | `integer` | Yes |  |
| `data.valid_answers` | `integer` | Yes |  |
| `meta` | `object` | Yes | Information about this response, including any warnings or pagination details. |

## Errors

Read `code` and `message` in the error response. Keep `request_id` when you contact support.

- HTTP 400 [`invalid_request`](https://aeoapi.dev/docs/errors#invalid_request)
- HTTP 401 [`unauthenticated`](https://aeoapi.dev/docs/errors#unauthenticated)
- HTTP 403 [`forbidden`](https://aeoapi.dev/docs/errors#forbidden)
- HTTP 404 [`not_found`](https://aeoapi.dev/docs/errors#not_found)
- HTTP 422 [`validation_error`](https://aeoapi.dev/docs/errors#validation_error)
- HTTP 429 [`rate_limited`](https://aeoapi.dev/docs/errors#rate_limited)

[Citations reference](https://aeoapi.dev/docs/features/citations)
