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

# List Prompt Brand Ranks

> For each active prompt, rank your brand and your direct competitors by visibility over the date range (the prompts page By Position view). Defaults to the last 30 days.



## OpenAPI

````yaml /v2/openapi.json get /prompts/brand-rank
openapi: 3.0.0
info:
  title: Promptwatch API v2
  description: >-
    API v2 for customer integrations with Promptwatch monitoring platform. This
    version provides improved structure, additional endpoints, and enhanced
    functionality.
  version: 2.0.0
  contact:
    name: Promptwatch Support
    email: team@promptwatch.com
    url: https://promptwatch.com
  license:
    name: Commercial
    url: https://promptwatch.com/terms-and-conditions
servers:
  - url: https://server.promptwatch.com/api/v2
    description: Promptwatch API v2
security: []
tags:
  - name: Authentication
    description: API key validation and authentication
  - name: Content
    description: >-
      AI content generation and content refresh. Create content asynchronously
      and poll for results.
  - name: Content Agent
    description: >-
      Content Agent (automated content) lifecycle: project settings, scheduled
      slots, review (accept/decline), and publish.
  - name: Content Gap
    description: Content gap analysis and recommendations
  - name: Publishing
    description: >-
      Publish content to a connected CMS, or record a live URL, and track the
      published page
  - name: Models
    description: Available LLM models
  - name: Monitors
    description: Monitor management and CRUD operations
  - name: Page Tracker
    description: Track URLs and inspect citation stats, responses, and prompts
  - name: Prompts
    description: Prompt management and operations
  - name: Query Fanouts
    description: ChatGPT query fanout keywords
  - name: Responses
    description: LLM response data and analytics
  - name: Tags
    description: Tag management for prompts
  - name: Topics
    description: Topic management for prompts
  - name: Actions
    description: Action items (GEO suggestions and tasks)
  - name: Personas
    description: Persona configuration for monitors
  - name: Brands
    description: Brand management for competitive analysis
  - name: Visibility
    description: >-
      Brand visibility time series, competitor heatmaps, and performance
      heatmaps
  - name: Events
    description: >-
      Dated project events such as prompts added and actions completed, for
      annotating time series
  - name: Citations
    description: Citation analytics from AI responses
  - name: Analytics
    description: Visitor analytics, AI crawler logs, sentiment, and brand visibility trends
  - name: Search Insights
    description: >-
      Google Search Console and Bing Webmaster performance for the project
      website
  - name: Projects
    description: Project management (organization-level keys only)
  - name: Usage
    description: Plan usage and limits (organization-level keys only)
  - name: Sitemap
    description: Sitemap feeds, crawler settings, crawl progress, and discovered URLs
  - name: Site Health
    description: Deprecated. Legacy SEO issue pages. Use Site Audit for the current checks.
  - name: Site Audit
    description: >-
      Site audit runs, issue lists, link and content insights, and per-URL
      history
  - name: Socials
    description: >-
      Social media citations (Reddit posts, YouTube videos, and LinkedIn posts)
      found in LLM responses
  - name: Ads Radar
    description: Sponsored ads captured in AI answers
  - name: Shopping
    description: Product appearances in AI shopping answers and tracked products
paths:
  /prompts/brand-rank:
    get:
      tags:
        - Prompts
      summary: List Prompt Brand Ranks
      description: >-
        For each active prompt, rank your brand and your direct competitors by
        visibility over the date range (the prompts page By Position view).
        Defaults to the last 30 days.
      operationId: listPromptBrandRanks
      parameters:
        - schema:
            type: string
            format: date
          in: query
          name: startDate
          required: false
          description: >-
            Start date (YYYY-MM-DD). Defaults to 29 days before today (30 days
            including today). Max range 90 days.
        - schema:
            type: string
            format: date
          in: query
          name: endDate
          required: false
          description: End date (YYYY-MM-DD). Defaults to today. Max range 90 days.
        - schema:
            type: integer
            default: 1
            minimum: 1
          in: query
          name: page
          required: false
          description: Page number (1-based)
        - schema:
            type: integer
            default: 25
            minimum: 1
            maximum: 100
          in: query
          name: size
          required: false
          description: Page size
        - schema:
            type: string
            format: uuid
          in: query
          name: llmMonitorId
          required: false
          description: Filter by monitor
        - schema:
            anyOf:
              - type: string
                enum:
                  - ORGANIC
                  - BRAND_SPECIFIC
                  - COMPETITOR_COMPARISON
              - type: array
                items:
                  type: string
                  enum:
                    - ORGANIC
                    - BRAND_SPECIFIC
                    - COMPETITOR_COMPARISON
          in: query
          name: types
          required: false
          description: 'Filter by prompt type. Repeat for multiple: types=x&types=y'
        - schema:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
          in: query
          name: models
          required: false
          description: >-
            Only rank brands using responses from these LLM models. Repeat for
            multiple: models=x&models=y
        - schema:
            type: string
          in: query
          name: query
          required: false
          description: Search query for prompt text
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          in: query
          name: sortOrder
          required: false
          description: Order prompts by average visibility
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  prompts:
                    - id: 6ba7b82e-9dad-11d1-80b4-00c04fd430c8
                      prompt: >-
                        What is the best workflow automation tool for finance
                        teams?
                      type: ORGANIC
                      llmMonitorId: 6ba7b815-9dad-11d1-80b4-00c04fd430c8
                      averageVisibility: 49.5
                      brands:
                        - rank: 1
                          brandId: 6ba7b840-9dad-11d1-80b4-00c04fd430c8
                          name: Example Brand
                          domain: example.com
                          relation: SELF
                          visibilityScore: 72.5
                        - rank: 2
                          brandId: 6ba7b841-9dad-11d1-80b4-00c04fd430c8
                          name: Fabrikam
                          domain: fabrikam.com
                          relation: DIRECT_COMPETITOR
                          visibilityScore: 40.13
                  total: 1
                  page: 1
                  size: 25
                  totalPages: 1
                properties:
                  prompts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Prompt identifier
                        prompt:
                          type: string
                          description: The prompt text
                        type:
                          type: string
                          enum:
                            - ORGANIC
                            - BRAND_SPECIFIC
                            - COMPETITOR_COMPARISON
                          description: Type of prompt
                        llmMonitorId:
                          type: string
                          format: uuid
                          description: Monitor that owns this prompt
                        averageVisibility:
                          type: number
                          nullable: true
                          description: Average visibility score across all responses
                        brands:
                          type: array
                          maxItems: 10
                          items:
                            type: object
                            properties:
                              rank:
                                type: integer
                                description: >-
                                  1-based rank of the brand for this prompt (1 =
                                  highest visibility)
                              brandId:
                                type: string
                                format: uuid
                                description: Brand ID
                              name:
                                type: string
                                description: Brand name
                              domain:
                                type: string
                                nullable: true
                                description: Brand domain
                              relation:
                                type: string
                                enum:
                                  - SELF
                                  - DIRECT_COMPETITOR
                                description: >-
                                  SELF for your own brand, DIRECT_COMPETITOR for
                                  a tracked competitor
                              visibilityScore:
                                type: number
                                description: >-
                                  Brand visibility for this prompt over the date
                                  range (0-100). Responses that don't mention
                                  the brand count as 0, matching the dashboard.
                            required:
                              - rank
                              - brandId
                              - name
                              - domain
                              - relation
                              - visibilityScore
                            additionalProperties: false
                          description: >-
                            Your brand and your direct competitors, ranked by
                            visibility for this prompt (top 10). Brands not
                            mentioned in the range are omitted.
                      required:
                        - id
                        - prompt
                        - type
                        - llmMonitorId
                        - averageVisibility
                        - brands
                      additionalProperties: false
                    description: Active prompts with their ranked brands
                  total:
                    type: integer
                    description: Total items matching the request
                  page:
                    type: integer
                    description: Page number (1-based)
                  size:
                    type: integer
                    description: Page size
                  totalPages:
                    type: integer
                    description: Total pages for this page size
                required:
                  - prompts
                  - total
                  - page
                  - size
                  - totalPages
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Bad Request
                  code: DATE_RANGE_TOO_LARGE
                  message: Date range cannot exceed 92 days
                properties:
                  error:
                    type: string
                    description: Error label
                  code:
                    type: string
                    description: Optional machine-readable code (e.g. DATE_RANGE_TOO_LARGE)
                  message:
                    type: string
                    description: Reason the request was rejected
                required:
                  - error
                  - message
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  message: Missing or invalid X-API-Key header.
                properties:
                  error:
                    type: string
                    description: Error category (often aligned with HTTP semantics)
                  code:
                    type: string
                    description: Optional machine-readable code
                  message:
                    type: string
                    description: Human-readable explanation
                  details:
                    type: object
                    description: Optional structured detail (e.g. validation)
                    additionalProperties: true
                required:
                  - error
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  code: PROMPT_NOT_FOUND
                  message: Prompt not found or access denied
                properties:
                  code:
                    type: string
                    description: Error code indicating the type of error
                    enum:
                      - PROMPT_NOT_FOUND
                      - PROMPT_KEYWORDS_REQUIRED
                      - PROMPT_CLASSIFICATION_FAILED
                      - PROMPT_INVALID_COPY_LANGUAGE
                      - PROMPT_DUPLICATE
                      - MONITOR_NOT_FOUND
                      - PROJECT_NOT_FOUND
                      - PERSONA_NOT_FOUND
                      - INTERNAL_ERROR
                    example: PROMPT_NOT_FOUND
                  message:
                    type: string
                    description: Human-readable error message
                    example: Prompt not found or access denied
                required:
                  - code
                  - message
                additionalProperties: false
              examples:
                example1:
                  value:
                    code: PROMPT_NOT_FOUND
                    message: Prompt not found or access denied
                example2:
                  value:
                    code: PROMPT_KEYWORDS_REQUIRED
                    message: Keywords are required for keywords generation type
                example3:
                  value:
                    code: PROMPT_CLASSIFICATION_FAILED
                    message: All prompt classifications failed
                example4:
                  value:
                    code: INTERNAL_ERROR
                    message: An unexpected error occurred
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get yours from the Promptwatch dashboard
        under Settings > API Keys.

````

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