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

# List Opportunities

> Returns ranked opportunities computed from stored prompt visibility results. Each includes an `execution_prompt` with context for an AI agent. Default window is 30 days.



## OpenAPI

````yaml /openapi.json get /v2/opportunities
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: []
tags:
  - name: Status
    description: Check API availability and validate the calling API key.
  - name: Visibility
    description: >-
      Measure visibility, citations, competitors, and prompt performance across
      answer platforms.
  - name: Prompts
    description: Manage tracked prompts and topics, and inspect their stored runs.
  - name: Opportunities
    description: Review ranked opportunities computed from prompt visibility results.
  - name: Tasks
    description: Manage the persisted action queue and task lifecycle.
  - name: Site Audits
    description: Review website audit results and page-level findings.
  - name: Evals
    description: Define eval tasks, judges, subjects, and saved configurations.
  - name: Eval Templates
    description: >-
      Select reusable judges, targets, schedules, metadata, and runtime settings
      with `POST /v2/eval-templates`, then copy only those settings into
      prompt-specific evals with `POST /v2/evals/batch`. Templates never contain
      prompts and remain independent from evals created from them.
  - name: Eval Runs
    description: Start eval runs and inspect their lifecycle state.
  - name: Eval Results
    description: Review completed eval outcomes and diagnostic details.
  - name: Agent Preference
    description: >-
      Compare your company head-to-head with a tracked competitor. Create a
      comparison with `POST /v2/agent-preference/evals`, run it with `POST
      /v2/eval-runs`, then read which company agents recommended.
  - name: Agents
    description: List runnable coding-agent harness and model combinations.
  - name: Repositories
    description: Manage reusable Git repository workspaces.
  - name: Environments
    description: List reusable runtime environments without exposing secret values.
  - name: MCP Servers
    description: List reusable MCP server integrations without exposing credentials.
  - name: CLIs
    description: List reusable command-line interfaces without exposing setup commands.
  - name: Skills
    description: List reusable skills available to workflows and evals.
paths:
  /v2/opportunities:
    get:
      tags:
        - Opportunities
      summary: List Opportunities
      description: >-
        Returns ranked opportunities computed from stored prompt visibility
        results. Each includes an `execution_prompt` with context for an AI
        agent. Default window is 30 days.
      operationId: v2_opportunities_list
      parameters:
        - name: since
          in: query
          required: false
          schema:
            type: string
            title: Since
          description: Relative or absolute window start, such as `30d` or `2026-08-01`.
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            title: Start Date
          description: Inclusive start date; overrides `since`.
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            title: End Date
          description: Inclusive end date; defaults to today.
        - name: category
          in: query
          required: false
          schema:
            enum:
              - quick_wins
              - growth
              - refresh
              - citations
            type: string
            title: Category
        - name: opportunity_type
          in: query
          required: false
          schema:
            enum:
              - almost_winning
              - negative_sentiment
              - lost_wins
              - competitor_gaps
              - untapped_topics
              - platform_blind_spots
              - content_gaps
              - declining_visibility
              - volatile_visibility
              - citation_gaps
              - high_citation_sources
              - listicle_targets
            type: string
            title: Opportunity Type
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOpportunitiesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - LightsageApiKeyAuth: []
components:
  schemas:
    ListOpportunitiesResponse:
      properties:
        start_date:
          type: string
          title: Start Date
          description: >-
            Window start actually used, after resolving `start_date`, `since`,
            or the default.
        end_date:
          type: string
          title: End Date
        data:
          items:
            $ref: '#/components/schemas/PublicPromptOpportunity'
          type: array
          title: Data
        count:
          type: integer
          title: Count
          description: Capped by `limit`; not the total available.
        summary:
          additionalProperties: true
          type: object
          title: Summary
          description: Breakdowns of the returned items only; each sums to `count`.
      type: object
      required:
        - start_date
        - end_date
        - count
      title: ListOpportunitiesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicPromptOpportunity:
      properties:
        id:
          type: string
          title: Id
          description: >-
            Stable across requests and windows for the same finding. There is no
            retrieve endpoint.
        type:
          type: string
          title: Type
          description: >-
            Determines which undeclared extra fields the object carries, such as
            `winner_brand_name` on `almost_winning`.
        category:
          type: string
          title: Category
        priority:
          type: string
          title: Priority
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        action:
          type: string
          title: Action
        execution_prompt:
          type: string
          title: Execution Prompt
        impact_score:
          type: number
          title: Impact Score
          description: >-
            Out of 100. Recomputed per window, so the same `id` can score
            differently across windows.
        created_at:
          type: string
          title: Created At
          description: Time of the request, since opportunities are computed per call.
      additionalProperties: true
      type: object
      required:
        - id
        - type
        - category
        - priority
        - title
        - description
        - action
        - execution_prompt
        - impact_score
        - created_at
      title: PublicPromptOpportunity
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    LightsageApiKeyAuth:
      type: apiKey
      in: header
      name: X-Lightsage-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.