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

# List a project's prompt run history

> Returns paginated prompt runs with status, timestamps, platforms, and task totals. Use a completed run's id as runId on historical analytics reads.



## OpenAPI

````yaml /api-reference/openapi.json get /prompts/runs
openapi: 3.1.0
info:
  title: OpenLens API
  version: 1.4.0
  description: >-
    Public REST API for OpenLens. Onboard clients, run scans across the major AI
    platforms, read visibility metrics, and download client-ready reports. Beta
    — endpoints may evolve before GA.
  contact:
    name: OpenLens support
    email: contact@aibread.com
servers:
  - url: https://openlens.com/api
security:
  - bearerAuth: []
tags:
  - name: Onboarding
  - name: Runs
  - name: Metrics
  - name: Citations
  - name: Deliverables
  - name: Resources
  - name: Account
paths:
  /prompts/runs:
    get:
      tags:
        - Runs
      summary: List a project's prompt run history
      description: >-
        Returns paginated prompt runs with status, timestamps, platforms, and
        task totals. Use a completed run's id as runId on historical analytics
        reads.
      parameters:
        - name: projectId
          in: query
          required: true
          schema:
            type: string
            format: uuid
          description: Project id. Required on all data endpoints.
        - name: status
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - pending
                - running
                - completed
                - failed
                - interrupted
          style: form
          explode: true
          description: >-
            Repeat this parameter or provide comma-separated values to filter by
            run status.
        - name: startedAfter
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: startedBefore
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: completedAfter
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: completedBefore
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: triggeredBy
          in: query
          required: false
          schema:
            type: string
            enum:
              - manual
              - scheduled
        - name: platform
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - chatgpt
                - chatgpt_app
                - claude
                - gemini
                - gemini_app
                - grok_app
                - grok_api
                - perplexity
                - perplexity_app
                - google_app
                - deepseek
              description: >-
                LLM platform identifier. Newer scraper-backed ids end in `_app`;
                `chatgpt`, `perplexity`, and `gemini` are legacy and not
                returned by current runs.
          style: form
          explode: true
          description: >-
            Repeat this parameter or provide comma-separated values to filter by
            platform ID.
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
            enum:
              - ordinal
              - status
              - startedAt
              - completedAt
              - duration
            default: ordinal
        - name: sortDir
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
            minimum: 1
            maximum: 100
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            default: 0
            minimum: 0
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  runs:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        ordinal:
                          type: integer
                        name:
                          type:
                            - string
                            - 'null'
                        status:
                          type: string
                          enum:
                            - pending
                            - running
                            - completed
                            - failed
                            - interrupted
                        cancelRequested:
                          type: boolean
                        triggeredBy:
                          type: string
                          enum:
                            - manual
                            - scheduled
                        startedAt:
                          type: string
                          format: date-time
                        completedAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                        platforms:
                          type: array
                          items:
                            type: string
                        totalTasks:
                          type:
                            - integer
                            - 'null'
                        completedTasks:
                          type:
                            - integer
                            - 'null'
                        failedTasks:
                          type:
                            - integer
                            - 'null'
                      required:
                        - id
                        - ordinal
                        - name
                        - status
                        - cancelRequested
                        - triggeredBy
                        - startedAt
                        - completedAt
                        - platforms
                        - totalTasks
                        - completedTasks
                        - failedTasks
                  total:
                    type: integer
                  limit:
                    type: integer
                  offset:
                    type: integer
                required:
                  - runs
                  - total
                  - limit
                  - offset
        '400':
          description: Missing or invalid request parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Monthly included API calls for your tier are used up (code
            `USAGE_LIMIT`). Body includes a `limit` object — `{ limitHit,
            currentTier, targetTier, feature, cap, used, resetAt }` — describing
            the cap and the upgrade that lifts it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found or not owned by your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limit, project cap, or daily quota hit. Body includes a `code`
            field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error. Retry; if persistent, contact support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code for programmatic handling, when applicable.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Clerk API key. Create one from your account settings under API Keys.

````