---
title: "v2GetAnalyticsDataset | TypeScript SDK | AEO API"
description: "Read a named dataset for a brand. Choose visibility for mention rates and visibility scores, or citation_gaps to investigate missing citations."
url: "https://aeoapi.dev/docs/sdks/typescript/v2GetAnalyticsDataset"
canonical: "https://aeoapi.dev/docs/sdks/typescript/v2GetAnalyticsDataset"
last_updated: "2026-11-30"
---

# v2GetAnalyticsDataset

Read a named dataset for a brand. Choose visibility for mention rates and visibility scores, or citation_gaps to investigate missing citations.

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

## Signature

```
v2GetAnalyticsDataset(
  dataset: string,
  options: {
    signal?: AbortSignal;
    after_url?: string | null;
    ai_search?: string | null;
    audience_id?: string | null;
    brand_id: string;
    category_id?: string | null;
    checks_as_of?: string | Date;
    city?: string | null;
    cohort_version?: string | null;
    compare_end?: string | null;
    compare_end_at?: string | Date;
    compare_start?: string | null;
    compare_start_at?: string | Date;
    country?: string | null;
    cursor?: string | null | number;
    device?: "desktop" | "mobile" | "unknown" | "ALL" | "PHONE" | "DESKTOP" | "TABLET";
    dimension?: "date" | "query" | "page";
    end?: string | null;
    end_at?: string | Date | null;
    engine?: "chatgpt" | "gemini" | "claude" | "perplexity" | "google" | "bing" | "brave" | "meta_ai" | "grok" | "universal" | null | string | "split";
    group_by?: ReadonlyArray<"date" | "source" | "country" | "language" | "location" | "currency" | "city" | "region"> | "location" | "city" | "region" | null | ReadonlyArray<"date" | "source" | "country" | "language" | "location" | "currency"> | "platform" | "country" | "topic" | "persona" | "theme";
    group_id?: string | null;
    include_evidence?: boolean;
    include_page_details?: boolean;
    language?: string | null;
    limit?: number;
    location_id?: string | null;
    metric_version?: string | null;
    mode?: "ui_normal" | "ui_search" | "api_normal" | "api_web" | "ai_mode" | "ai_overview" | "organic_search" | null;
    model?: "same_session" | "last_observed_ai_30d" | "modeled_influence" | "ga4_reported";
    month?: string | null;
    observation_id?: string;
    offset?: number;
    opportunities?: boolean;
    ownership?: "brand_owned" | "registered_competitor" | "other_external" | "unknown" | null;
    page_id?: string | null;
    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" | null;
    persona_id?: string | null;
    platform?: "chatgpt" | "gemini" | "claude" | "perplexity" | "google" | "bing" | "brave" | "meta_ai" | "grok" | "universal" | null | string;
    previous_month?: string | null;
    product_id?: string | null;
    prompt_id?: string | null;
    prompt_version?: number | null;
    property?: string | null;
    provider?: string | null;
    report_id?: string | null;
    search_activity?: "observed" | "not_observed" | "unknown";
    section?: "timeline" | "channels" | "prompts" | "domains" | "urls" | "social_timeline";
    service_id?: string | null;
    social_platform?: "linkedin" | "reddit" | "youtube" | null;
    stage?: "awareness" | "consideration" | "evaluation" | "decision" | "retention" | null;
    start?: string | null;
    start_at?: string | Date | null;
    status?: "approved" | "needs_review" | "suggested" | null;
    theme?: "pricing" | "features" | "availability" | "policy" | "company" | "integrations" | "other" | null;
    topic_id?: string | null;
    traffic_limit?: number;
    traffic_offset?: number;
    url?: string | null;
    view?: "summary" | "history" | "compare";
    website?: string | null;
  },
): Promise<ApiResponse<unknown>>
```

## Parameters

**`dataset`**

Name of the analytics dataset. The example reads visibility.

**`options`**

Pass the named options in the signature. The selected action or view determines which fields are required.

**`options.signal`**

Optional AbortSignal to cancel the HTTP request.

**`options.brand_id`**

string (uuid), required for this request. brand_id

**`options.start_at`**

string (date-time), required for this request. Inclusive UTC timestamp.

**`options.end_at`**

string (date-time), required for this request. Exclusive UTC timestamp; after start_at. Maximum window per plan/history and 366 days per synchronous query.

**`options.group_by`**

array of "date" | "source" | "country" | "language" | "location" | "currency" | "city" | "region". group_by

## Return value

Promise\<ApiResponse\<unknown\>\>. For visibility, body.data contains metric rows. Each row includes visibility_score and coverage. Check coverage before comparing periods.

## Errors

- The SDK throws AeoApiError if the API returns an error. Inspect status, code, fieldErrors and requestId.
- AeoTransportError means the request failed to connect or the client could not finish reading a successful response. Invalid JSON in a successful response throws SyntaxError. If you abort the request, the SDK throws the reason from the AbortSignal.
- For HTTP 422, check fieldErrors for the input field and validation message.

## TypeScript example

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

const apiKey = process.env.AEO_API_KEY;
if (!apiKey) throw new Error("Set AEO_API_KEY on your server.");
const client = new AeoClient(apiKey, { baseUrl: "https://api.aeoapi.dev" });

// Substitute your own record IDs and values.
const response = await client.v2GetAnalyticsDataset("visibility", {
  "brand_id": "00000000-0000-4000-8000-000000000001",
  "start_at": "2026-11-01T00:00:00Z",
  "end_at": "2026-11-30T00:00:00Z",
  "group_by": [
    "date"
  ]
});
console.log(response.status, response.body);
```

## Requests by feature

### Site audits and page checks

- [Read page measurements](https://aeoapi.dev/docs/features/site-audits-and-page-checks/get-analytics-dataset-page-experience)

### Citations

- [Rank cited sources](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations)
- [Citations by domain](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations-domains)
- [Citations by URL](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations-urls)
- [Citation timeline](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations-timeline)
- [Citations by channel](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations-channels)
- [Citations by prompt](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations-prompts)
- [Social citation timeline](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citations-social-timeline)
- [Compare citation growth](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citation-growth)
- [Find competitor citation gaps](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-citation-gaps)
- [Find pages missing the brand](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-missing-brand)
- [List saved page checks](https://aeoapi.dev/docs/features/citations/get-analytics-dataset-page-checks)

### Answer accuracy

- [Read accuracy trends](https://aeoapi.dev/docs/features/answer-accuracy/get-analytics-dataset-answer-accuracy)
- [List frequent wrong claims](https://aeoapi.dev/docs/features/answer-accuracy/get-analytics-dataset-wrong-claims)
- [Review accuracy facts](https://aeoapi.dev/docs/features/answer-accuracy/get-analytics-dataset-accuracy-facts)

### Analytics and attribution

- [Measure visibility](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-visibility)
- [Read prompt metrics](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-prompts)
- [Compare locations](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-locations)
- [Compare engine scores](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-radar)
- [Read keyword shares](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-keywords)
- [Measure brand perception](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-brand-perception)
- [Filter dashboard metrics](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-dashboard)
- [Track URL impact](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-url-impact)
- [Read search performance](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-search-performance)
- [Read Bing site insights](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-bing-insights)
- [Read revenue attribution](https://aeoapi.dev/docs/features/analytics-and-attribution/get-analytics-dataset-attribution)

See [TypeScript client setup](https://aeoapi.dev/docs/sdks/typescript) for authentication, timeouts and retry settings.
