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

> Returns the Library's pages and redirects together, most recently updated first, each with a one-line summary and `href`, the path of its own resource. Read only: add, change and read the detail of pages under `/v2/library/pages` and redirects under `/v2/library/redirects`. This combined list reaches the 1,000 most recently updated items (`offset` up to 900, `limit` up to 100); `total` counts all of them. Page past that with `/v2/library/pages` and `/v2/library/redirects`, which have no ceiling.



## OpenAPI

````yaml /openapi.json get /v2/library
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: Library
    description: >-
      Track the pages you publish and the redirects you set up: their AI answer
      citations and agent visits per day, and whether each is helping.
  - name: Site Audits
    description: Review website audit results and page-level findings.
  - name: Agent Analytics
    description: >-
      See which coding agents, AI bots, and people visit your tracked sites,
      which pages they read, which pages return errors, and where the visits
      come from.
  - 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: Plugin Evals
    description: >-
      Download a day's ChatGPT plugin eval results: every run with and without
      the plugin, plus its insights report.
  - 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/library:
    get:
      tags:
        - Library
      summary: List Library
      description: >-
        Returns the Library's pages and redirects together, most recently
        updated first, each with a one-line summary and `href`, the path of its
        own resource. Read only: add, change and read the detail of pages under
        `/v2/library/pages` and redirects under `/v2/library/redirects`. This
        combined list reaches the 1,000 most recently updated items (`offset` up
        to 900, `limit` up to 100); `total` counts all of them. Page past that
        with `/v2/library/pages` and `/v2/library/redirects`, which have no
        ceiling.
      operationId: v2_library_list
      parameters:
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - page
              - redirect
            title: Type
          description: Only `page` or only `redirect` items.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            maximum: 900
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LibraryItemsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - LightsageApiKeyAuth: []
components:
  schemas:
    LibraryItemsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/LibraryItem'
          type: array
          title: Data
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
        - data
        - total
        - limit
        - offset
      title: LibraryItemsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LibraryItem:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          enum:
            - page
            - redirect
          title: Type
        title:
          type: string
          title: Title
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: The page's address, or a redirect's old address.
        to_url:
          anyOf:
            - type: string
            - type: 'null'
          title: To Url
          description: Where a redirect sends its old address. Null for a page.
        status:
          type: string
          title: Status
          description: >-
            A page's `published` or `in_review`, or a redirect's `working`,
            `not_working`, `checking` or `cant_check`.
        summary:
          type: string
          title: Summary
          description: One line on how it is doing.
        added_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Added At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        href:
          type: string
          title: Href
          description: The item's own resource, for its detail and insights.
      type: object
      required:
        - id
        - type
        - title
        - status
        - summary
        - href
      title: LibraryItem
      description: A page or a redirect, as the combined Library list shows it.
    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.