---
title: "Citations by prompt | Citations | AEO API"
description: "Group citations by the question that produced each answer."
url: "https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations-prompts"
canonical: "https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations-prompts"
last_updated: "2026-11-30"
---

Citations

# Citations by prompt

Group citations by the question that produced each answer.

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

- Path `dataset` is `citations`.
- Query `section` is `prompts`.

## 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 | `"citations"` | Yes |  |
| `audience_id` | query | `string (uuid) \| null` | No | Current audience assignment. Requires prompts:read. |
| `product_id` | query | `string (uuid) \| null` | No | Current product assignment. Requires prompts:read. |
| `service_id` | query | `string (uuid) \| null` | No | Current service assignment. Requires prompts:read. |
| `group_id` | query | `string (uuid) \| null` | No | Current prompt group assignment. Requires prompts:read. |
| `stage` | query | `"awareness" \| "consideration" \| "evaluation" \| "decision" \| "retention" \| null` | No | Current prompt buyer stage. Requires prompts:read. |
| `brand_id` | query | `string (uuid)` | Yes |  |
| `report_id` | query | `string (uuid) \| null` | No |  |
| `start_at` | query | `string (date-time) \| null` | No |  |
| `end_at` | query | `string (date-time) \| 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. |
| `provider` | query | `string \| null` | No | Filter by source label. Available labels include official_api, collector_a, collector_b, collector_c, collector_d, collector_e, collector_f, collector_g, collector_h. |
| `prompt_id` | query | `string (uuid) \| null` | No |  |
| `prompt_version` | query | `integer \| null` | No |  |
| `limit` | query | `integer` | No |  |
| `cursor` | query | `string \| null` | No |  |
| `page_type` | query | `"blog" \| "directory" \| "review_site" \| "news" \| "forum" \| "brand_site" \| "competitor_site" \| "marketplace" \| "docs" \| "social" \| "press_release" \| "comparison" \| "roundup" \| "guide" \| "institution" \| "reference" \| "other" \| "unknown" \| null` | No |  |
| `include_page_details` | query | `boolean` | No |  |
| `url` | query | `string \| null` | No |  |
| `ownership` | query | `"brand_owned" \| "registered_competitor" \| "other_external" \| "unknown" \| null` | No |  |
| `social_platform` | query | `"linkedin" \| "reddit" \| "youtube" \| null` | No |  |
| `location_id` | query | `string (uuid)` | No |  |
| `group_by` | query | `"location" \| "city" \| "region"` | No |  |
| `month` | query | `string \| null` | No | Use with section=growth. |
| `previous_month` | query | `string \| null` | No | Use with section=growth. |
| `topic_id` | query | `string \| null` | No | Use with section=growth. |
| `section` | query | `"prompts"` | Yes |  |

## 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/citations" \
  -H "Authorization: Bearer $AEO_API_KEY" \
  --data-urlencode "brand_id=$BRAND_ID" \
  --data-urlencode 'section=prompts'
```

```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="citations",
        brand_id=environ["BRAND_ID"],
        section="prompts",
    )
    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(
  "citations",
  {
    brand_id: process.env.BRAND_ID!,
    section: "prompts",
  },
);
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.content_composition` | `array of object` | Yes |  |
| `data.content_composition[].answer_url_pairs` | `integer` | Yes |  |
| `data.content_composition[].unique_urls` | `integer` | Yes |  |
| `data.content_composition[].value` | `string` | Yes |  |
| `data.ownership` | `"brand_owned" \| "registered_competitor" \| "other_external" \| "unknown" \| null` | Yes |  |
| `data.ownership_basis` | `"pinned_analysis_configuration" \| "unknown"` | Yes |  |
| `data.ownership_composition` | `array of object` | Yes |  |
| `data.ownership_composition[].answer_url_pairs` | `integer` | Yes |  |
| `data.ownership_composition[].unique_urls` | `integer` | Yes |  |
| `data.ownership_composition[].value` | `string` | Yes |  |
| `data.page_type_composition` | `array of object` | No |  |
| `data.page_type_composition[].answer_url_pairs` | `integer` | Conditional |  |
| `data.page_type_composition[].unique_urls` | `integer` | Conditional |  |
| `data.page_type_composition[].value` | `string` | Conditional |  |
| `data.report` | `object` | Yes |  |
| `data.report.analysis_version` | `string \| null` | Yes |  |
| `data.report.brand_id` | `string` | Yes |  |
| `data.report.comparison_set_version` | `string \| null` | Yes |  |
| `data.report.end_at` | `string` | Yes |  |
| `data.report.generated_at` | `string \| null` | Yes |  |
| `data.report.report_id` | `string \| null` | Yes |  |
| `data.report.segmentation` | `object \| null` | Yes |  |
| `data.report.segmentation.audience_id` | `string \| null` | Conditional |  |
| `data.report.segmentation.basis` | `"current_prompt_metadata"` | Conditional |  |
| `data.report.segmentation.group_id` | `string \| null` | Conditional |  |
| `data.report.segmentation.product_id` | `string \| null` | Conditional |  |
| `data.report.segmentation.service_id` | `string \| null` | Conditional |  |
| `data.report.segmentation.stage` | `"awareness" \| "consideration" \| "evaluation" \| "decision" \| "retention" \| null` | Conditional |  |
| `data.report.start_at` | `string` | Yes |  |
| `data.rows` | `array of object` | Yes |  |
| `data.rows[].dimension` | `object \| null` | Yes |  |
| `data.rows[].dimension.ai_search` | `string \| null` | Conditional | The AI search product the answer came from, such as google_ai_overviews. |
| `data.rows[].dimension.comparison_set_version` | `string \| null` | Conditional |  |
| `data.rows[].dimension.date` | `string \| null` | Conditional |  |
| `data.rows[].dimension.engine` | `string \| null` | Conditional |  |
| `data.rows[].dimension.prompt_id` | `string \| null` | Conditional |  |
| `data.rows[].dimension.prompt_version` | `integer \| null` | Conditional |  |
| `data.rows[].dimension.provider` | `string \| null` | Conditional |  |
| `data.rows[].dimension.source_cohort` | `object \| null` | Conditional |  |
| `data.rows[].dimension.source_cohort.[key]` | `string \| null` | No | Value for each key. |
| `data.rows[].domain` | `string \| null` | Yes |  |
| `data.rows[].matched_domain` | `string \| null` | Yes |  |
| `data.rows[].matched_entity_id` | `string \| null` | Yes |  |
| `data.rows[].metrics` | `object` | Yes |  |
| `data.rows[].metrics.answer_mentions` | `object` | Yes |  |
| `data.rows[].metrics.answer_mentions.brand_mention_answers` | `integer` | Yes |  |
| `data.rows[].metrics.answer_mentions.competitor_mention_answers` | `object` | Yes |  |
| `data.rows[].metrics.answer_mentions.competitor_mention_answers.[key]` | `integer` | No | Value for each key. |
| `data.rows[].metrics.answer_url_pairs` | `integer` | Yes |  |
| `data.rows[].metrics.answers_with_displayable_citations` | `integer` | Yes |  |
| `data.rows[].metrics.answers_with_recorded_citations` | `integer` | Yes |  |
| `data.rows[].metrics.answers_with_unusable_citation_urls` | `integer` | Yes |  |
| `data.rows[].metrics.answers_with_withheld_citations` | `integer` | Yes |  |
| `data.rows[].metrics.cited_page_brand_mention_rate` | `number \| null` | Yes |  |
| `data.rows[].metrics.cited_page_brand_mentions` | `integer \| null` | Yes |  |
| `data.rows[].metrics.cited_page_competitor_mention_rates` | `object` | Yes |  |
| `data.rows[].metrics.cited_page_competitor_mention_rates.[key]` | `number \| null` | No | Value for each key. |
| `data.rows[].metrics.cited_page_competitor_mentions` | `object` | Yes |  |
| `data.rows[].metrics.cited_page_competitor_mentions.[key]` | `integer \| null` | No | Value for each key. |
| `data.rows[].metrics.citing_answers` | `integer` | Yes |  |
| `data.rows[].metrics.citing_share_of_answers_with_displayable_citations` | `number \| null` | Yes |  |
| `data.rows[].metrics.content_type_answer_url_pairs` | `object` | Yes |  |
| `data.rows[].metrics.content_type_answer_url_pairs.[key]` | `integer` | No | Value for each key. |
| `data.rows[].metrics.ownership_answer_url_pairs` | `object` | Yes |  |
| `data.rows[].metrics.ownership_answer_url_pairs.[key]` | `integer` | No | Value for each key. |
| `data.rows[].metrics.scheduled_samples` | `integer` | Yes |  |
| `data.rows[].metrics.source_channel_answer_url_pairs` | `object` | Yes |  |
| `data.rows[].metrics.source_channel_answer_url_pairs.[key]` | `integer` | No | Value for each key. |
| `data.rows[].metrics.unique_domains` | `integer` | Yes |  |
| `data.rows[].metrics.unique_urls` | `integer` | Yes |  |
| `data.rows[].metrics.urls_with_brand_mention_review` | `integer` | Yes |  |
| `data.rows[].metrics.urls_with_competitor_mention_review` | `object` | Yes |  |
| `data.rows[].metrics.urls_with_competitor_mention_review.[key]` | `integer` | No | Value for each key. |
| `data.rows[].metrics.valid_answers` | `integer` | Yes |  |
| `data.rows[].ownership` | `"brand_owned" \| "registered_competitor" \| "other_external" \| "unknown" \| null` | Yes |  |
| `data.rows[].ownership_rank` | `integer \| null` | Yes |  |
| `data.rows[].page` | `object \| null` | Yes |  |
| `data.rows[].page.brand_mentioned_on_page` | `boolean \| null` | Conditional |  |
| `data.rows[].page.checked_at` | `string \| null` | Conditional |  |
| `data.rows[].page.classification_basis` | `"curated_domain" \| "url_pattern" \| "page_content" \| "unknown"` | No |  |
| `data.rows[].page.classification_confidence` | `number` | No |  |
| `data.rows[].page.competitors_mentioned_on_page` | `object` | Conditional |  |
| `data.rows[].page.competitors_mentioned_on_page.[key]` | `boolean \| null` | No | Value for each key. |
| `data.rows[].page.content_type` | `string` | Conditional |  |
| `data.rows[].page.content_type_basis` | `"review" \| "url_pattern" \| "unknown"` | Conditional |  |
| `data.rows[].page.evidence_reference` | `string \| null` | Conditional |  |
| `data.rows[].page.page_evidence_status` | `"reviewed" \| "unknown"` | Conditional |  |
| `data.rows[].page.page_type` | `"blog" \| "directory" \| "review_site" \| "news" \| "forum" \| "brand_site" \| "competitor_site" \| "marketplace" \| "docs" \| "social" \| "press_release" \| "comparison" \| "roundup" \| "guide" \| "institution" \| "reference" \| "other" \| "unknown" \| "video"` | No |  |
| `data.rows[].page.page_type_confidence` | `number \| null` | No |  |
| `data.rows[].page.social_publisher` | `object` | No |  |
| `data.rows[].page.social_publisher.entity_id` | `string` | Conditional |  |
| `data.rows[].page.social_publisher.profile_url` | `string` | Conditional |  |
| `data.rows[].page.source_category` | `"directory" \| "review_site" \| "local_directory" \| "industry_directory" \| "forum" \| "social" \| "video" \| "news" \| "local_news" \| "comparison" \| "marketplace" \| "brand_site" \| "competitor_site" \| "docs" \| "press" \| "other"` | No |  |
| `data.rows[].page.source_channel` | `string` | Conditional |  |
| `data.rows[].page.source_channel_basis` | `"review" \| "url_pattern" \| "unknown"` | Conditional |  |
| `data.rows[].page.url` | `string` | Conditional |  |
| `data.rows[].page.url_pattern_basis` | `string \| null` | Conditional |  |
| `data.rows[].rank` | `integer \| null` | Yes |  |
| `data.rows[].social_platform` | `"linkedin" \| "reddit" \| "youtube"` | No |  |
| `data.rows[].social_publisher_metrics` | `object` | No |  |
| `data.rows[].social_publisher_metrics.answers_with_displayable_citations` | `integer` | Conditional |  |
| `data.rows[].social_publisher_metrics.brand` | `object` | Conditional |  |
| `data.rows[].social_publisher_metrics.brand.answer_url_pairs` | `integer` | Conditional |  |
| `data.rows[].social_publisher_metrics.brand.citation_rate` | `number \| null` | Conditional |  |
| `data.rows[].social_publisher_metrics.brand.citing_answers` | `integer` | Conditional |  |
| `data.rows[].social_publisher_metrics.competitors` | `object` | Conditional |  |
| `data.rows[].social_publisher_metrics.competitors.[key]` | `object` | No | Value for each key. |
| `data.rows[].social_publisher_metrics.unknown_publisher` | `object` | Conditional |  |
| `data.rows[].social_publisher_metrics.unknown_publisher.answer_url_pairs` | `integer` | Conditional |  |
| `data.rows[].social_publisher_metrics.unknown_publisher.citation_rate` | `number \| null` | Conditional |  |
| `data.rows[].social_publisher_metrics.unknown_publisher.citing_answers` | `integer` | Conditional |  |
| `data.section` | `"domains" \| "urls" \| "timeline" \| "channels" \| "prompts" \| "social_timeline"` | Yes |  |
| `data.social_platform` | `"linkedin" \| "reddit" \| "youtube"` | No |  |
| `data.source_channel_composition` | `array of object` | Yes |  |
| `data.source_channel_composition[].answer_url_pairs` | `integer` | Yes |  |
| `data.source_channel_composition[].unique_urls` | `integer` | Yes |  |
| `data.source_channel_composition[].value` | `string` | Yes |  |
| `data.summary` | `object` | Yes |  |
| `data.summary.answer_mentions` | `object` | Yes |  |
| `data.summary.answer_mentions.brand_mention_answers` | `integer` | Yes |  |
| `data.summary.answer_mentions.competitor_mention_answers` | `object` | Yes |  |
| `data.summary.answer_mentions.competitor_mention_answers.[key]` | `integer` | No | Value for each key. |
| `data.summary.answer_url_pairs` | `integer` | Yes |  |
| `data.summary.answers_with_displayable_citations` | `integer` | Yes |  |
| `data.summary.answers_with_recorded_citations` | `integer` | Yes |  |
| `data.summary.answers_with_unusable_citation_urls` | `integer` | Yes |  |
| `data.summary.answers_with_withheld_citations` | `integer` | Yes |  |
| `data.summary.cited_page_brand_mention_rate` | `number \| null` | Yes |  |
| `data.summary.cited_page_brand_mentions` | `integer \| null` | Yes |  |
| `data.summary.cited_page_competitor_mention_rates` | `object` | Yes |  |
| `data.summary.cited_page_competitor_mention_rates.[key]` | `number \| null` | No | Value for each key. |
| `data.summary.cited_page_competitor_mentions` | `object` | Yes |  |
| `data.summary.cited_page_competitor_mentions.[key]` | `integer \| null` | No | Value for each key. |
| `data.summary.citing_answers` | `integer` | Yes |  |
| `data.summary.citing_share_of_answers_with_displayable_citations` | `number \| null` | Yes |  |
| `data.summary.content_type_answer_url_pairs` | `object` | Yes |  |
| `data.summary.content_type_answer_url_pairs.[key]` | `integer` | No | Value for each key. |
| `data.summary.ownership_answer_url_pairs` | `object` | Yes |  |
| `data.summary.ownership_answer_url_pairs.[key]` | `integer` | No | Value for each key. |
| `data.summary.scheduled_samples` | `integer` | Yes |  |
| `data.summary.source_channel_answer_url_pairs` | `object` | Yes |  |
| `data.summary.source_channel_answer_url_pairs.[key]` | `integer` | No | Value for each key. |
| `data.summary.unique_domains` | `integer` | Yes |  |
| `data.summary.unique_urls` | `integer` | Yes |  |
| `data.summary.urls_with_brand_mention_review` | `integer` | Yes |  |
| `data.summary.urls_with_competitor_mention_review` | `object` | Yes |  |
| `data.summary.urls_with_competitor_mention_review.[key]` | `integer` | No | Value for each key. |
| `data.summary.valid_answers` | `integer` | Yes |  |
| `data.total_rows` | `integer` | Yes |  |
| `data.url` | `string \| null` | Yes |  |
| `meta` | `object` | Yes | Information about this response, including any warnings or pagination details. |

HTTP 200 response fields 2

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `object` | Yes | The requested result. See the fields below for its contents. |
| `data.growth` | `object` | Yes |  |
| `data.growth.brand_id` | `string` | Yes |  |
| `data.growth.comparison_coverage` | `object` | Yes |  |
| `data.growth.comparison_coverage.current_samples` | `integer` | Yes |  |
| `data.growth.comparison_coverage.matched_pairs` | `integer` | Yes |  |
| `data.growth.comparison_coverage.previous_samples` | `integer` | Yes |  |
| `data.growth.comparison_status` | `"no_baseline" \| "partial" \| "complete"` | Yes |  |
| `data.growth.current` | `object` | Yes |  |
| `data.growth.current.answers` | `integer` | Yes |  |
| `data.growth.current.citations` | `integer` | Yes |  |
| `data.growth.current.month` | `string` | Yes |  |
| `data.growth.current.pages` | `integer` | Yes |  |
| `data.growth.current.websites` | `integer` | Yes |  |
| `data.growth.history` | `array of object` | Yes |  |
| `data.growth.history[].answers` | `integer` | Yes |  |
| `data.growth.history[].citations` | `integer` | Yes |  |
| `data.growth.history[].month` | `string` | Yes |  |
| `data.growth.history[].pages` | `integer` | Yes |  |
| `data.growth.history[].websites` | `integer` | Yes |  |
| `data.growth.page_changes` | `object \| null` | Yes |  |
| `data.growth.page_changes.kept` | `integer` | Conditional |  |
| `data.growth.page_changes.lost` | `integer` | Conditional |  |
| `data.growth.page_changes.new` | `integer` | Conditional |  |
| `data.growth.pages` | `array of object` | Yes |  |
| `data.growth.pages[].change` | `"new" \| "lost"` | Yes |  |
| `data.growth.pages[].domain` | `string` | Yes |  |
| `data.growth.pages[].url` | `string` | Yes |  |
| `data.growth.previous` | `object` | Yes |  |
| `data.growth.previous.answers` | `integer` | Yes |  |
| `data.growth.previous.citations` | `integer` | Yes |  |
| `data.growth.previous.month` | `string` | Yes |  |
| `data.growth.previous.pages` | `integer` | Yes |  |
| `data.growth.previous.websites` | `integer` | Yes |  |
| `data.growth.report_id` | `string \| null` | Yes |  |
| `data.growth.total_changed_pages` | `integer` | Yes |  |
| `data.growth.website_changes` | `object \| null` | Yes |  |
| `data.growth.website_changes.kept` | `integer` | Conditional |  |
| `data.growth.website_changes.lost` | `integer` | Conditional |  |
| `data.growth.website_changes.new` | `integer` | Conditional |  |
| `meta` | `object` | Yes | Information about this response, including any warnings or pagination details. |
| `meta.as_of` | `string (date-time)` | Yes | The point in time that the response represents. |
| `meta.cohort_version` | `string \| null` | No | Identifies the version of the group used to calculate the results. |
| `meta.collected_at` | `string (date-time) \| null` | Yes | When the data was collected, if available. |
| `meta.metric_version` | `string \| null` | No | The version of the metric definition used for these results. |
| `meta.next_cursor` | `string \| null` | Yes | When present, pass this value as cursor to request the next page with the same filters. |
| `meta.next_refresh_at` | `string (date-time) \| null` | Yes |  |
| `meta.request_id` | `string (uuid)` | Yes | Keep this ID when reporting a problem with the request. |
| `meta.restricted_fields` | `array of string` | No | Fields that your current access does not allow the API to return. |
| `meta.rights_filtered` | `boolean` | Yes | Indicates whether access rights affected the returned data. |
| `meta.schema_version` | `"1.0"` | Yes | The version of the response format. |
| `meta.stale` | `boolean` | Yes |  |
| `meta.warnings` | `array of string` | Yes | Read these notes for limitations that affect the results. |

## 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)
