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

# List prompts

> Returns the tracked prompts of the site with their metrics. Use `q`, `tracking_group`, `ungrouped`, `sentiment`, `target` and `opportunity` to filter, and `sort` and `direction` to order. Use `date_range` to select the period (`7g`, `1a`, `3a`, `6a`, `1y` or `custom` with `since` and `until`). Use `persona` and `llm` to limit the data to one persona and to some AI assistants. The list is paged with `page` and `page_size`.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sites/{site_uuid}/prompts
openapi: 3.0.3
info:
  title: Perquery API
  version: 1.0.0
  description: Read-only access to the data of your Perquery organization.
servers:
  - url: https://perquery.ai/api
security:
  - apiKey: []
paths:
  /v1/sites/{site_uuid}/prompts:
    get:
      tags:
        - Prompts
      summary: List prompts
      description: >-
        Returns the tracked prompts of the site with their metrics. Use `q`,
        `tracking_group`, `ungrouped`, `sentiment`, `target` and `opportunity`
        to filter, and `sort` and `direction` to order. Use `date_range` to
        select the period (`7g`, `1a`, `3a`, `6a`, `1y` or `custom` with `since`
        and `until`). Use `persona` and `llm` to limit the data to one persona
        and to some AI assistants. The list is paged with `page` and
        `page_size`.
      operationId: list_prompts
      parameters:
        - in: query
          name: date_range
          schema:
            enum:
              - 7g
              - 1a
              - 3a
              - 6a
              - 1y
              - custom
            type: string
            default: 1a
            minLength: 1
          description: |-
            * `7g` - 7g
            * `1a` - 1a
            * `3a` - 3a
            * `6a` - 6a
            * `1y` - 1y
            * `custom` - custom
        - in: query
          name: direction
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            minLength: 1
          description: |-
            * `asc` - asc
            * `desc` - desc
        - in: query
          name: llm
          schema:
            type: array
            items:
              enum:
                - chatgpt
                - gemini
                - claude
                - perplexity
                - googleai
                - grok
                - deepseek
              type: string
              description: |-
                * `chatgpt` - chatgpt
                * `gemini` - gemini
                * `claude` - claude
                * `perplexity` - perplexity
                * `googleai` - googleai
                * `grok` - grok
                * `deepseek` - deepseek
        - in: query
          name: opportunity
          schema:
            enum:
              - all
              - 'yes'
              - 'no'
            type: string
            default: all
            minLength: 1
          description: |-
            * `all` - all
            * `yes` - yes
            * `no` - no
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
            default: 1
        - in: query
          name: page_size
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
        - in: query
          name: persona
          schema:
            type: string
            format: uuid
            nullable: true
        - in: query
          name: q
          schema:
            type: string
            nullable: true
        - in: query
          name: sentiment
          schema:
            enum:
              - pos
              - neu
              - neg
              - null
            type: string
            nullable: true
            minLength: 1
          description: |-
            * `pos` - pos
            * `neu` - neu
            * `neg` - neg
        - in: query
          name: since
          schema:
            type: string
            format: date
          description: The first day of a `custom` range.
        - in: path
          name: site_uuid
          schema:
            type: string
            format: uuid
          required: true
        - in: query
          name: sort
          schema:
            enum:
              - vis
              - rank
              - sentiment
              - volume
              - opportunity
            type: string
            default: opportunity
            minLength: 1
          description: |-
            * `vis` - vis
            * `rank` - rank
            * `sentiment` - sentiment
            * `volume` - volume
            * `opportunity` - opportunity
        - in: query
          name: target
          schema:
            enum:
              - all
              - 'yes'
              - 'no'
            type: string
            default: all
            minLength: 1
          description: |-
            * `all` - all
            * `yes` - yes
            * `no` - no
        - in: query
          name: tracking_group
          schema:
            type: string
            nullable: true
        - in: query
          name: ungrouped
          schema:
            type: boolean
            default: false
        - in: query
          name: until
          schema:
            type: string
            format: date
          description: The last day of a `custom` range.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptList'
          description: ''
      security:
        - apiKey: []
components:
  schemas:
    PromptList:
      type: object
      properties:
        rows:
          type: array
          items:
            $ref: '#/components/schemas/PromptRow'
        total:
          type: integer
        page:
          type: integer
        page_size:
          type: integer
        total_pages:
          type: integer
      required:
        - page
        - page_size
        - rows
        - total
        - total_pages
    PromptRow:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        text:
          type: string
        target_page:
          type: string
          nullable: true
        primary_keyword:
          type: string
          nullable: true
        text_editable:
          type: boolean
        labels:
          type: array
          items:
            type: string
        metrics:
          $ref: '#/components/schemas/PromptMetrics'
      required:
        - labels
        - metrics
        - primary_keyword
        - target_page
        - text
        - text_editable
        - uuid
    PromptMetrics:
      type: object
      properties:
        visibility:
          type: number
          format: double
        rank:
          type: number
          format: double
          nullable: true
        sentiment:
          type: number
          format: double
        volume:
          type: integer
          nullable: true
        opportunity:
          type: integer
          nullable: true
        has_opportunity:
          type: boolean
        assistants_present:
          type: array
          items:
            type: string
        trend:
          type: array
          items:
            type: number
            format: double
        subset_scoped:
          type: boolean
      required:
        - assistants_present
        - has_opportunity
        - rank
        - sentiment
        - subset_scoped
        - trend
        - visibility
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: '`ApiKey pq_<prefix>_<secret>`. An API key gives read-only access.'

````

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