---
title: "Source usage time-series"
method: GET
path: "/api/v1/analytics/source-usage-time-series"
tags: ["analytics"]
---

# Source usage time-series

`GET /api/v1/analytics/source-usage-time-series`

## Request

- Base URL: `https://pineprompt.com`
- URL: `https://pineprompt.com/api/v1/analytics/source-usage-time-series`
- Auth: HTTP bearer

For each top source, returns the percentage of analyzed responses in each bucket that cited that source. The result is capped to the top `top_n` sources by citation count. Source-keyed analytics cannot be scoped by segment.

## Query parameters

- `start_date` string, date, required
- `end_date` string, date, required
- `interval` 'day' | 'week' | 'month' | 'year', required
- `platforms` string[]
- `countries` string[]
- `monitors` integer[]
- `tags` integer[]
- `top_n` integer

## Headers

- `Pineprompt-Project-Id` integer, required

## Response `200`

OK

- SourceUsageTimeSeries: A source usage time series: one entry per source in scope, each carrying a dense list of buckets tracing how often analyzed responses cited it.
  - `interval` 'day' | 'week' | 'month' | 'year': The bucket granularity used to compute the series.
  - `series` SourceUsageSeries[]: One entry per source in scope, each carrying a dense list of buckets.
    - `source` Source: A source is a domain that an AI platform cited inside an answer, recorded with its type classification and a playbook of recommended actions.
      - `id` integer: The unique ID of the source.
      - `project_id` integer: The ID of the project the source belongs to.
      - `domain` string: The domain of the cited URL.
      - `type` string, nullable: The source type, as classified by Pineprompt.
      - `playbook` 'pitch' | 'buy' | 'participate' | 'claim' | 'hands_off', nullable: The playbook category the source falls under.
      - `analyzed_at` string, date-time, nullable: When the source was most recently analyzed, or `null` if it has not yet been analyzed.
      - `project` Project: A project represents a single brand or site you monitor. Its `brand_id` names the own brand, the brand every core metric is computed for.
        - `id` integer: The unique ID of the project.
        - `organization_id` integer: The ID of the organization that owns the project.
        - `name` string: The display name of the project.
        - `brand_id` integer, nullable: The ID of the project's own brand, or null while none has been designated.
        - `organization` Organization: An organization is the top-level billing entity and tenant boundary in Pineprompt. Every project, member, and API key belongs to exactly one organization.
          - `id` integer: The unique ID of the organization.
          - `name` string: The display name of the organization.
          - `created_at` string, date-time: When the organization was created.
          - `updated_at` string, date-time: When the organization was last updated.
        - `created_at` string, date-time: When the project was created.
        - `updated_at` string, date-time: When the project was last updated.
      - `created_at` string, date-time: When the source was created.
      - `updated_at` string, date-time: When the source was last updated.
    - `data` TimeSeriesPoint[]: The bucketed data points for this source. Each value is the percentage of analyzed responses in the bucket that cited any URL from the source.
      - `timestamp` string, date-time: The ISO 8601 UTC start of the bucket.
      - `value` integer: The metric value for this bucket. The series that carries the point describes what the value measures.

## Other responses

- `400`: Missing project header
- `401`: Unauthorized
- `403`: Missing ability
- `404`: Project not in this organization
- `422`: Validation failed

---

[API](https://skmtc.dev/pineprompt/apis/pineprompt-api.md) · [All operations](https://skmtc.dev/pineprompt/apis/pineprompt-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pineprompt/apis/pineprompt-api/revisions/05dbb5241a27?raw)
