---
title: "Get cited-source analytics and citation events"
method: GET
path: "/api/v1/sources/analytics"
tags: ["Traffic & Sources"]
---

# Get cited-source analytics and citation events

`GET /api/v1/sources/analytics`

## Request

- Base URL: `https://app.promptingco.com`
- URL: `https://app.promptingco.com/api/v1/sources/analytics`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

## Query parameters

- `productId` string[]: Product ID scope. Repeat to include multiple products. Prefer this over simulationBrandIds.
- `simulationBrandIds` string[]: Deprecated. Use productId. Existing cited-source callers may pass this repeated product ID parameter.
- `page` integer
- `pageSize` integer
- `eventPage` integer
- `eventPageSize` integer
- `category` string
- `contentType` string
- `ownership` 'self' | 'competitor' | 'other': Filter by per-brand ownership of the source. Independent of category (content type). Requires the per-brand ownership sync in Tinybird (DEV-2310).
- `model` string
- `searchTerm` string
- `viewId` string
- `topicId` string
- `regionId` string
- `includeNullRegions` boolean: When regionId is set, include citation rows whose region is unset.
- `includeEvents` boolean: Include row-level citation events. Defaults to false for performance. Only needed for detailed event analysis.
- `urls` string[]
- `productMentioned` 'mentioned' | 'not_mentioned': Filter to sources where the product was mentioned or not mentioned. Sources without mention analysis are excluded from both.
- `startDate` string
- `endDate` string
- `sortBy` 'citation_count' | 'unique_conversations'
- `sortOrder` 'asc' | 'desc'

## Response `200`

Successful response

- object
  - `ok` true, required
  - `data` object, required
    - `data` object[], required
      - `id` string
      - `hostname` string, required
      - `path` string
      - `search` string
      - `citation_count` integer, required
      - `unique_conversations` integer
      - `category` string, nullable
      - `content_type` string, nullable
      - `ownership` string, nullable
      - `brand_name` string
      - `brand_slug` string, nullable
      - `simulation_brand_id` string
      - `answer_engines` string[]
      - `product_mentioned` boolean, nullable
      - `title` string, nullable
      - `author_id` string
      - `authorId` string
      - `author_name` string
      - `authorName` string
      - `creator_id` string, nullable
      - `creatorId` string, nullable
      - `creator_name` string, nullable
      - `creatorName` string, nullable
      - `date` string
      - `created_at` string
      - `createdAt` string
    - `total` integer, required
    - `totalCitations` integer, required
    - `page` integer, required
    - `pageSize` integer, required
    - `events` object[], required
      - `date` string, required
      - `product_id` string, required
      - `product_name` string, required
      - `product_slug` string, required
      - `prompt_id` string, required
      - `prompt_text` string, required
      - `topic_id` string, required
      - `topic_name` string, required
      - `model` string, required
      - `citation_url` string, required
      - `citation_domain` string, required
      - `source_category` string, required
      - `content_type` string, required
      - `mentioned_product_id` string, nullable
      - `mentioned_product_name` string, required
      - `url_citation_count` number, required
      - `conversation_query_run_id` string, required
      - `view_ids` string[], required
      - `view_names` string[], required
      - `overall_sentiment` 'positive' | 'neutral' | 'negative' | 'null', nullable
    - `eventPagination` object, required
      - `page` integer, required
      - `pageSize` integer, required
      - `total` integer, required
      - `totalPages` integer, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Not found
- `422`: Validation failed
- `500`: Internal server error

---

[API](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api.md) - [All operations](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/llms.txt) - [OpenAPI document](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/revisions/c0451ea10e9a?raw)
