---
title: "Source-URL analytics"
method: GET
path: "/api/v1/analytics/source-urls"
tags: ["analytics"]
---

# Source-URL analytics

`GET /api/v1/analytics/source-urls`

## Request

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

Returns per-URL aggregates: the percentage of analyzed responses in the window that cited each URL, together with the average number of citations to it per analyzed response. The response is paginated. This endpoint may not be scoped by segment.

## Query parameters

- `start_date` string, date, required
- `end_date` string, date, required
- `platforms` string[]
- `countries` string[]
- `monitors` integer[]
- `tags` integer[]
- `page` integer
- `per_page` integer
- `sort_by` 'used_percentage' | 'average_citations'
- `sort_order` 'asc' | 'desc'

## Headers

- `Pineprompt-Project-Id` integer, required

## Response `200`

OK

- SourceUrlAnalyticsList
  - `data` SourceUrlAnalytics[]
    - `source_url` SourceUrl: A single URL that an AI platform cited. Every source URL belongs to a source, the domain that issued it.
      - `id` integer: The unique ID of the source URL.
      - `source_id` integer: The ID of the source (domain) this URL belongs to.
      - `url` string: The full URL that the platform cited.
      - `title` string, nullable: The page title for this URL. `null` until a title is known.
      - `type` string, nullable: The URL's classification, as determined by Pineprompt.
      - `analyzed_at` string, date-time, nullable: When the URL was most recently analyzed by Pineprompt.
      - `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.
      - `created_at` string, date-time: When the source URL was created.
      - `updated_at` string, date-time: When the source URL was last updated.
    - `used_count` integer: The number of distinct analyzed responses in the window that cited this URL.
    - `used_count_change` integer: The difference in `used_count` compared with the equal-length period immediately preceding the window.
    - `used_percentage` integer: The percentage of analyzed responses in the window that cited this URL.
    - `used_percentage_change` integer: The difference in `used_percentage` compared with the equal-length period immediately preceding the window.
    - `average_citations` number, float: The average number of citations to this URL per analyzed response in the window.
    - `average_citations_change` number, float: The difference in `average_citations` compared with the preceding period.
    - `first_seen_on` string, date, nullable: The earliest date this URL was ever cited in the project. This is a lifetime value; the window, platform, and country filters are ignored.
    - `last_seen_on` string, date, nullable: The most recent date this URL was cited in the project. This is a lifetime value; the window, platform, and country filters are ignored.
  - `links` PaginationLinks
    - `first` string, nullable
    - `last` string, nullable
    - `prev` string, nullable
    - `next` string, nullable
  - `meta` PaginationMeta
    - `current_page` integer
    - `from` integer, nullable
    - `last_page` integer
    - `path` string
    - `per_page` integer
    - `to` integer, nullable
    - `total` integer
    - `links` PaginationLink[]: The page-link rows, in display order from the first page through the last. The set always opens with a previous link and closes with a next link.
      - `url` string, nullable: The URL for this link, or `null` for the disabled previous and next boundaries.
      - `label` string: The label for this link, either a page number or a localized previous or next caption.
      - `page` integer, nullable: The page number this link points to, or `null` for the disabled previous and next boundaries.
      - `active` boolean: Whether this link is the page currently being returned.

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