> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siteline.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Citations

> Returns citations from AI answers for a selected product by property, page or associated products.

When `groupBy` targets a single dimension (`property`, `page`, or `product`), the response includes only that top-level field. The aliases `byProperty`, `byPage`, and `byProduct` also work.



## OpenAPI

````yaml /reporting-api.openapi.json get /v1/products/{productId}/citations
openapi: 3.1.0
info:
  title: Siteline Reporting API
  version: '1'
  description: >-
    Read-only access to Siteline product analytics, prompt performance,
    citations, and agent traffic.
servers:
  - url: https://api.siteline.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/products/{productId}/citations:
    get:
      tags:
        - Citations
      summary: Citations
      description: >-
        Returns citations from AI answers for a selected product by property,
        page or associated products.


        When `groupBy` targets a single dimension (`property`, `page`, or
        `product`), the response includes only that top-level field. The aliases
        `byProperty`, `byPage`, and `byProduct` also work.
      operationId: listCitationMetrics
      parameters:
        - $ref: '#/components/parameters/productId'
        - $ref: '#/components/parameters/domain'
        - $ref: '#/components/parameters/dateFrom'
        - $ref: '#/components/parameters/dateTo'
        - $ref: '#/components/parameters/platforms'
        - $ref: '#/components/parameters/labelIds'
        - name: groupBy
          in: query
          required: false
          schema:
            type: string
            enum:
              - all
              - property
              - page
              - product
            default: all
          description: >-
            Group citations by dimension. `all` returns all three grouped
            arrays.
      responses:
        '200':
          description: Citation metrics grouped by the selected dimension.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CitationResponse'
              example:
                byProperty:
                  - domain: example.com
                    products:
                      - name: Example
                        domain: example.com
                    count: 12
                    isMentioned: true
                byPage:
                  - domain: example.com
                    url: https://example.com/guide
                    products:
                      - name: Example
                        domain: example.com
                    count: 8
                    isMentioned: true
                byProduct:
                  - name: Example
                    domain: example.com
                    count: 12
                    isMentioned: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    productId:
      name: productId
      in: path
      required: true
      schema:
        type: integer
        example: 42
      description: Product ID returned by `GET /v1/products`.
    domain:
      name: domain
      in: query
      required: true
      schema:
        type: string
        example: example.com
      description: Product domain to report metrics for, such as `example.com`.
    dateFrom:
      name: dateFrom
      in: query
      required: true
      schema:
        type: string
        format: date-time
        example: '2026-05-01T00:00:00Z'
      description: Inclusive start timestamp in RFC3339 format.
    dateTo:
      name: dateTo
      in: query
      required: true
      schema:
        type: string
        format: date-time
        example: '2026-05-31T23:59:59Z'
      description: Inclusive end timestamp in RFC3339 format.
    platforms:
      name: platforms[]
      in: query
      required: false
      schema:
        type: array
        items:
          type: string
      description: >-
        Platform filters. Common values: `openai`, `gemini`, `google`,
        `perplexity`, `google_ai_overviews`, `claude`.
      style: form
      explode: true
    labelIds:
      name: labelIds[]
      in: query
      required: false
      schema:
        type: array
        items:
          type: integer
      description: Prompt label IDs to filter on. Invalid IDs return `400`.
      style: form
      explode: true
  schemas:
    CitationResponse:
      type: object
      description: >-
        Citation metrics grouped by the selected dimension. When `groupBy`
        targets a single dimension, only that top-level field is present.
      properties:
        byProperty:
          type: array
          items:
            $ref: '#/components/schemas/CitationByProperty'
        byPage:
          type: array
          items:
            $ref: '#/components/schemas/CitationByPage'
        byProduct:
          type: array
          items:
            $ref: '#/components/schemas/CitationByProduct'
    CitationByProperty:
      type: object
      properties:
        domain:
          type: string
          example: example.com
        products:
          type: array
          items:
            $ref: '#/components/schemas/CitationProduct'
        count:
          type: integer
          example: 12
        isMentioned:
          type: boolean
          example: true
      required:
        - domain
        - products
        - count
        - isMentioned
    CitationByPage:
      type: object
      properties:
        domain:
          type: string
          example: example.com
        url:
          type: string
          format: uri
          example: https://example.com/guide
        products:
          type: array
          items:
            $ref: '#/components/schemas/CitationProduct'
        count:
          type: integer
          example: 8
        isMentioned:
          type: boolean
          example: true
      required:
        - domain
        - url
        - products
        - count
        - isMentioned
    CitationByProduct:
      type: object
      properties:
        name:
          type: string
          example: Example
        domain:
          type: string
          example: example.com
        count:
          type: integer
          example: 12
        isMentioned:
          type: boolean
          example: true
      required:
        - name
        - domain
        - count
        - isMentioned
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
    CitationProduct:
      type: object
      properties:
        name:
          type: string
          example: Example
        domain:
          type: string
          example: example.com
      required:
        - name
        - domain
  responses:
    BadRequest:
      description: Required query parameters are missing or malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Invalid request parameters.
    Unauthorized:
      description: API key or product authorization failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Unauthorized.
    InternalServerError:
      description: Unexpected server-side or upstream dependency failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Internal server error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Siteline public API key. Create one under **Team settings > Public API
        Key**.

````