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

# AI visibility by product

> Returns aggregate AI visibility by product across all prompts for the selected filters.



## OpenAPI

````yaml /reporting-api.openapi.json get /v1/products/{productId}/prompts/summary
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}/prompts/summary:
    get:
      tags:
        - Prompts
      summary: AI visibility by product
      description: >-
        Returns aggregate AI visibility by product across all prompts for the
        selected filters.
      operationId: getPromptSummary
      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'
      responses:
        '200':
          description: Aggregate prompt performance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptSummary'
              example:
                position: 2.5
                visibility: 0.42
                rank: 3
                totalCompetitors: 12
        '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:
    PromptSummary:
      type: object
      properties:
        position:
          type:
            - number
            - 'null'
          example: 2.5
          description: >-
            Average position of the product within AI response text across all
            matching prompts. `null` when no data is available.
        visibility:
          type:
            - number
            - 'null'
          example: 0.42
          description: >-
            Aggregate percentage of AI responses in which the product appears
            across all matching prompts, expressed as a decimal. `null` when no
            data is available.
        rank:
          type:
            - integer
            - 'null'
          example: 3
          description: >-
            Product's ranking by visibility compared to all competing products
            across matching prompts. `null` when no data is available.
        totalCompetitors:
          type: integer
          example: 12
          description: >-
            Total number of distinct competitor products appearing across
            matching prompt results.
      required:
        - position
        - visibility
        - rank
        - totalCompetitors
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
  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**.

````