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

# Get a prompt

> Returns one prompt with its labels, metrics, the result of each persona and AI assistant, and the page that answers it best. 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.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sites/{site_uuid}/prompts/{prompt_uuid}
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/{prompt_uuid}:
    get:
      tags:
        - Prompts
      summary: Get a prompt
      description: >-
        Returns one prompt with its labels, metrics, the result of each persona
        and AI assistant, and the page that answers it best. 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.
      operationId: get_prompt
      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: 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: persona
          schema:
            type: string
            format: uuid
            nullable: true
        - in: path
          name: prompt_uuid
          schema:
            type: string
            format: uuid
          required: true
        - 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: until
          schema:
            type: string
            format: date
          description: The last day of a `custom` range.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptDetailResponse'
          description: ''
      security:
        - apiKey: []
components:
  schemas:
    PromptDetailResponse:
      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'
        persona_bars:
          type: array
          items:
            $ref: '#/components/schemas/PersonaBarDTO'
        llm_cards:
          type: array
          items:
            $ref: '#/components/schemas/LlmCardDTO'
        matched_page:
          allOf:
            - $ref: '#/components/schemas/MatchedPageDTO'
          nullable: true
        target_read:
          allOf:
            - $ref: '#/components/schemas/TargetReadDTO'
          nullable: true
      required:
        - labels
        - llm_cards
        - matched_page
        - metrics
        - persona_bars
        - primary_keyword
        - target_page
        - target_read
        - 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
    PersonaBarDTO:
      type: object
      properties:
        persona_name:
          type: string
        visibility:
          type: number
          format: double
      required:
        - persona_name
        - visibility
    LlmCardDTO:
      type: object
      properties:
        assistant:
          type: string
        rank:
          type: integer
          nullable: true
        transition_type:
          type: string
        sentiment:
          type: number
          format: double
        snippet:
          type: string
        excerpt:
          type: string
        competitors_above:
          type: array
          items:
            type: string
      required:
        - assistant
        - competitors_above
        - excerpt
        - rank
        - sentiment
        - snippet
        - transition_type
    MatchedPageDTO:
      type: object
      properties:
        path:
          type: string
        url:
          type: string
          nullable: true
        strength:
          type: string
      required:
        - path
        - strength
        - url
    TargetReadDTO:
      type: object
      description: The last read of the target page that gave no page.
      properties:
        outcome:
          $ref: '#/components/schemas/TargetReadOutcome'
        status_code:
          type: integer
          nullable: true
        final_url:
          type: string
          nullable: true
        is_permanent:
          type: boolean
        read_at:
          type: string
          format: date-time
      required:
        - final_url
        - is_permanent
        - outcome
        - read_at
        - status_code
    TargetReadOutcome:
      enum:
        - ok
        - http_error
        - not_html
        - empty
        - unreachable
        - rate_limited
        - redirected
        - robots_blocked
      type: string
      description: |-
        * `ok` - ok
        * `http_error` - http_error
        * `not_html` - not_html
        * `empty` - empty
        * `unreachable` - unreachable
        * `rate_limited` - rate_limited
        * `redirected` - redirected
        * `robots_blocked` - robots_blocked
  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.