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

# List prompts

> Returns a paginated list of prompts in your workspace. By default it returns your real prompts and leaves out AI-suggested and rejected ones. Ask for those with `status=suggested` or `status=rejected`.



## OpenAPI

````yaml /api/openapi.json get /prompts
openapi: 3.1.0
info:
  title: ZeroRank REST API
  version: 1.0.0
  description: >-
    The public ZeroRank REST API. Every request uses a workspace API key (Bearer
    `zr_live_…`) and only ever sees that one workspace. Use it to read your
    results and manage your prompts, brands, tags, and topics from your own
    scripts and tools.
servers:
  - url: https://api.zerorank.ai/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Workspace
    description: The workspace, plan, and key behind your request.
  - name: Prompts
    description: The questions ZeroRank asks AI engines for you.
  - name: Brands
    description: The brands you track, including competitors.
  - name: Tags
    description: Labels you put on prompts.
  - name: Topics
    description: Groups you sort prompts into.
  - name: Analytics
    description: 'Read-only results: sources, chats, and rankings.'
paths:
  /prompts:
    get:
      tags:
        - Prompts
      summary: List prompts
      description: >-
        Returns a paginated list of prompts in your workspace. By default it
        returns your real prompts and leaves out AI-suggested and rejected ones.
        Ask for those with `status=suggested` or `status=rejected`.
      operationId: listPrompts
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/Limit100'
        - name: status
          in: query
          description: Only return prompts with this status.
          required: false
          schema:
            $ref: '#/components/schemas/PromptStatus'
        - name: topicId
          in: query
          description: Only return prompts in this topic.
          required: false
          schema:
            type: integer
        - name: search
          in: query
          description: Only return prompts whose text contains this word or phrase.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A page of prompts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/PaginatedPrompts'
                  message:
                    type: string
                    example: Prompts retrieved successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    Page:
      name: page
      in: query
      required: false
      description: Which page to return. Defaults to 1.
      schema:
        type: integer
        minimum: 1
        default: 1
    Limit100:
      name: limit
      in: query
      required: false
      description: How many items per page (1–100). Defaults to 20.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
  schemas:
    PromptStatus:
      type: string
      enum:
        - draft
        - active
        - paused
        - suggested
        - rejected
      description: >-
        Where a prompt is in its life: draft, active, paused, suggested
        (AI-proposed), or rejected.
    PaginatedPrompts:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Prompt'
        total:
          type: integer
          example: 42
          description: Total prompts that match.
        page:
          type: integer
          example: 1
        perPage:
          type: integer
          example: 20
        lastPage:
          type: integer
          example: 3
    Prompt:
      type: object
      properties:
        id:
          type: integer
          example: 101
        text:
          type: string
          example: What is the best CRM for small teams?
        status:
          $ref: '#/components/schemas/PromptStatus'
        location:
          type:
            - string
            - 'null'
          example: United States
        workspaceId:
          type: integer
          example: 7
        topicId:
          type:
            - integer
            - 'null'
          example: 3
        lastScheduledAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        topic:
          oneOf:
            - $ref: '#/components/schemas/Topic'
            - type: 'null'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: A human-readable explanation.
        code:
          type: string
          description: A short error code, when one applies.
        errors:
          description: Field-level details, on validation errors.
    Topic:
      type: object
      properties:
        id:
          type: integer
          example: 3
        name:
          type: string
          example: CRM
        workspaceId:
          type: integer
          example: 7
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Tag:
      type: object
      properties:
        id:
          type: integer
          example: 5
        name:
          type: string
          example: pricing
        color:
          $ref: '#/components/schemas/TagColor'
        hexColor:
          type: string
          description: The tag color as a hex value.
          example: '#3b82f6'
        promptCount:
          type: integer
          description: How many prompts use this tag (included when listing tags).
          example: 8
        workspaceId:
          type: integer
          example: 7
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    TagColor:
      type: string
      enum:
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - emerald
        - teal
        - cyan
        - sky
        - blue
        - indigo
        - violet
        - purple
        - fuchsia
        - pink
        - rose
        - slate
        - gray
        - zinc
      description: One of ZeroRank's named tag colors.
  responses:
    Unauthorized:
      description: The API key is missing, invalid, revoked, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Invalid, revoked, or expired API key
            code: API_KEY_INVALID
    RateLimited:
      description: >-
        Too many requests. Slow down and retry after the time in the
        `Retry-After` header.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
        X-RateLimit-Limit:
          schema:
            type: integer
          description: Your per-minute limit.
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Requests left in this window.
        X-RateLimit-Reset:
          schema:
            type: integer
          description: Unix time when the window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: API rate limit exceeded. Please slow down.
            code: RATE_LIMIT_EXCEEDED
            retryAfter: 30
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your workspace API key as `Authorization: Bearer zr_live_…`.'

````