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

> Returns one row with AI visibility metrics per tracked prompt, platform, and domain for the selected filters.

`position`, `visibility`, `rank`, and `runCount` can be `null` when no value is available for that prompt row.



## OpenAPI

````yaml /reporting-api.openapi.json get /v1/products/{productId}/prompts
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:
    get:
      tags:
        - Prompts
      summary: AI visibility by prompt
      description: >-
        Returns one row with AI visibility metrics per tracked prompt, platform,
        and domain for the selected filters.


        `position`, `visibility`, `rank`, and `runCount` can be `null` when no
        value is available for that prompt row.
      operationId: listPromptMetrics
      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: Array of prompt metrics.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PromptMetric'
              example:
                - promptText: best observability platforms
                  platform: openai
                  domain: example.com
                  position: 2.5
                  visibility: 0.42
                  rank: 3
                  runCount: 120
                  labels:
                    - id: 7
                      name: Commercial
        '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:
    PromptMetric:
      type: object
      properties:
        promptText:
          type: string
          example: best observability platforms
        platform:
          type: string
          example: openai
        domain:
          type: string
          example: example.com
        position:
          type:
            - number
            - 'null'
          example: 2.5
          description: >-
            Average position of the product within AI response text for this
            prompt. For example, a position of 1 means the product was mentioned
            first. `null` when no data is available.
        visibility:
          type:
            - number
            - 'null'
          example: 0.42
          description: >-
            Percentage of AI responses in which the product appears for this
            prompt, expressed as a decimal (e.g. `0.42` = 42%). `null` when no
            data is available.
        rank:
          type:
            - integer
            - 'null'
          example: 3
          description: >-
            Product's ranking by visibility compared to all products appearing
            in this prompt's results. A rank of 1 means highest visibility.
            `null` when no data is available.
        runCount:
          type:
            - integer
            - 'null'
          example: 120
          description: >-
            Total number of prompt runs recorded in the period. `null` when no
            data is available.
        labels:
          type: array
          items:
            $ref: '#/components/schemas/PromptLabel'
      required:
        - promptText
        - platform
        - domain
        - position
        - visibility
        - rank
        - runCount
        - labels
    PromptLabel:
      type: object
      properties:
        id:
          type: integer
          example: 7
        name:
          type: string
          example: Commercial
      required:
        - id
        - name
    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**.

````