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

# Retrieve Current Visibility

> Retrieve current visibility metrics for the organization.

Returns visibility score, share of voice, ranks, and date-range metadata for
the configured primary company. Values are calculated from currently active
prompts. When the selected range has no prompt-run data, metric values are
`null` and `has_data` is `false`.



## OpenAPI

````yaml /openapi.json get /v1/visibility/current
openapi: 3.1.0
info:
  title: Lightsage Public API
  description: Public API for Lightsage CLI and external integrations.
  version: 1.0.0
servers:
  - url: https://api.lightsage.com
    description: Production
security: []
paths:
  /v1/visibility/current:
    get:
      tags:
        - Visibility
      summary: Retrieve Current Visibility
      description: >-
        Retrieve current visibility metrics for the organization.


        Returns visibility score, share of voice, ranks, and date-range metadata
        for

        the configured primary company. Values are calculated from currently
        active

        prompts. When the selected range has no prompt-run data, metric values
        are

        `null` and `has_data` is `false`.
      operationId: visibility_current_retrieve
      parameters:
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            format: date
            description: Optional start date. Defaults to 30 days before the end date.
            title: Start Date
          description: Optional start date. Defaults to 30 days before the end date.
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            format: date
            description: Optional end date. Defaults to today.
            title: End Date
          description: Optional end date. Defaults to today.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCurrentVisibilityResponse'
        '400':
          description: The requested date range is invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                required:
                  - detail
              examples:
                invalid_date_range:
                  summary: Invalid date range
                  value:
                    detail: start_date must be on or before end_date
        '404':
          description: No configured company was found for this organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                required:
                  - detail
              examples:
                missing_company:
                  summary: Missing company
                  value:
                    detail: >-
                      Configured API Performance scope not found for this
                      organization
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - LightsageApiKeyAuth: []
components:
  schemas:
    PublicCurrentVisibilityResponse:
      properties:
        company:
          $ref: '#/components/schemas/PublicCompany'
        visibility_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Visibility Score
          description: Current visibility score for the selected date range, from 0 to 1.
        visibility_score_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Visibility Score Rank
          description: Rank by visibility score among tracked companies.
        share_of_voice:
          anyOf:
            - type: number
            - type: 'null'
          title: Share Of Voice
          description: Current share of voice for the selected date range, from 0 to 1.
        share_of_voice_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Share Of Voice Rank
          description: Rank by share of voice among tracked companies.
        average_position:
          anyOf:
            - type: number
            - type: 'null'
          title: Average Position
          description: Average mention position for the selected date range.
        average_position_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Average Position Rank
          description: Rank by average mention position among tracked companies.
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
          description: Latest prompt-run date included in the calculation.
        start_date:
          type: string
          title: Start Date
          description: Start date used for the calculation.
        end_date:
          type: string
          title: End Date
          description: End date used for the calculation.
        active_prompts_only:
          type: boolean
          title: Active Prompts Only
          description: Whether only currently active prompts were included.
          default: true
        has_data:
          type: boolean
          title: Has Data
          description: Whether the selected date range contains visibility data.
      type: object
      required:
        - company
        - start_date
        - end_date
        - has_data
      title: PublicCurrentVisibilityResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicCompany:
      properties:
        name:
          type: string
          title: Name
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
        relationship:
          anyOf:
            - type: string
            - type: 'null'
          title: Relationship
      type: object
      required:
        - name
      title: PublicCompany
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    LightsageApiKeyAuth:
      type: apiKey
      in: header
      name: X-Lightsage-Api-Key

````