---
title: "Get Sitemap Page Metrics"
method: GET
path: "/{brand_id}/sitemap/pages/{page_id}/metrics"
tags: ["sitemap"]
---

# Get Sitemap Page Metrics

`GET /{brand_id}/sitemap/pages/{page_id}/metrics`

## Request

- Base URL: `https://api.scrunchai.com/v1`
- URL: `https://api.scrunchai.com/v1/{brand_id}/sitemap/pages/{page_id}/metrics`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/scrunch/apis/scrunch-data-api/docs/:brand_id/sitemap/pages/:page_id/metrics/get.ts> (a function with typed inputs; its response is checked against the schema)

Return time-series performance metrics for a single page: citations, AI referrals, and AI agent traffic. Each metric is reported as a list of buckets keyed by date, with counts broken down by AI platform.

Granularity is chosen automatically based on the requested date range — short ranges return daily buckets, longer ranges return weekly buckets. Date ranges are capped at 366 days.

## Path parameters

- `brand_id` integer, required: The unique identifier for the brand.
- `page_id` integer, required: The unique identifier for the page.

## Query parameters

- `start_date` string, date, nullable: Start date (YYYY-MM-DD). Defaults to 30 days ago.
- `end_date` string, date, nullable: End date (YYYY-MM-DD). Defaults to today.

## Response `200`

Successful Response

- SitemapPageMetricsResponse
  - `granularity` 'daily' | 'weekly', required: Time-series granularity: `daily` or `weekly`.
  - `metrics` SitemapUrlMetrics, required
    - `citations` SitemapMetricRow[], required: Citation counts over time by AI platform.
      - `date` string, required: Date in ISO 8601 format (YYYY-MM-DD).
      - `count_by_platform` object, required: Counts keyed by AI platform name (for example `OpenAI`, `Perplexity`, `Gemini`).
    - `ai_referrals` SitemapMetricRow[], required: AI referral counts over time by AI platform.
      - `date` string, required: Date in ISO 8601 format (YYYY-MM-DD).
      - `count_by_platform` object, required: Counts keyed by AI platform name (for example `OpenAI`, `Perplexity`, `Gemini`).
    - `agent_traffic` SitemapMetricRow[], required: AI agent traffic counts over time by AI platform.
      - `date` string, required: Date in ISO 8601 format (YYYY-MM-DD).
      - `count_by_platform` object, required: Counts keyed by AI platform name (for example `OpenAI`, `Perplexity`, `Gemini`).

## Other responses

- `400`: Invalid or out-of-range date parameters.
- `404`: Page not found.
- `422`: Validation Error

---

[API](https://skmtc.dev/scrunch/apis/scrunch-data-api.md) - [All operations](https://skmtc.dev/scrunch/apis/scrunch-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scrunch/apis/scrunch-data-api/revisions/e28a10a186bf?raw)
