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

# Top Sources

> Get top referrer sources by visitor count. Projects with no recorded visitor analytics return an empty data array.



## OpenAPI

````yaml /v2/openapi.json get /analytics/visitors/top-sources
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 optimization. Create content asynchronously and
      poll for results.
  - name: Content Gap
    description: Content gap analysis and recommendations
  - 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 and competitor heatmaps
  - name: Citations
    description: Citation analytics from AI responses
  - name: Analytics
    description: Visitor analytics, AI crawler logs, sentiment, and brand visibility trends
  - name: Projects
    description: Project management (organization-level keys only)
  - name: Sitemap
    description: Sitemap crawl progress and discovered URLs
  - name: Site Health
    description: >-
      Crawled pages with SEO issues (titles, meta descriptions, H1, thin
      content)
  - name: Socials
    description: >-
      Social media citations (Reddit posts and YouTube videos) found in LLM
      responses
paths:
  /analytics/visitors/top-sources:
    get:
      tags:
        - Analytics
      summary: Top Sources
      description: >-
        Get top referrer sources by visitor count. Projects with no recorded
        visitor analytics return an empty data array.
      operationId: getTopSources
      parameters:
        - schema:
            type: string
            format: date
          in: query
          name: startDate
          required: false
          description: Start date for analytics data (YYYY-MM-DD). Max range 60 days.
        - schema:
            type: string
            format: date
          in: query
          name: endDate
          required: false
          description: End date for analytics data (YYYY-MM-DD). Max range 60 days.
        - schema:
            anyOf:
              - type: string
                enum:
                  - chatgpt.com
                  - gemini.google.com
                  - perplexity.ai
                  - copilot.microsoft.com
                  - copilot.com
                  - claude.ai
                  - grok.com
                  - chat.mistral.ai
              - type: array
                items:
                  type: string
                  enum:
                    - chatgpt.com
                    - gemini.google.com
                    - perplexity.ai
                    - copilot.microsoft.com
                    - copilot.com
                    - claude.ai
                    - grok.com
                    - chat.mistral.ai
                maxItems: 8
          in: query
          name: referrerDomains
          required: false
          description: >-
            Filter by AI referrer domains (repeat param for multiple). Allowed:
            chatgpt.com, gemini.google.com, perplexity.ai,
            copilot.microsoft.com, copilot.com, claude.ai, grok.com,
            chat.mistral.ai
        - schema:
            type: string
          in: query
          name: timezone
          required: false
          description: IANA timezone for date bucketing (e.g., 'America/Los_Angeles')
        - schema:
            type: string
          in: query
          name: path
          required: false
          description: Filter by specific page path
        - schema:
            type: string
            enum:
              - exact
              - partial
          in: query
          name: pathMatch
          required: false
          description: >-
            Path matching mode: 'exact' for exact match, 'partial' for prefix
            match (default: 'partial')
        - schema:
            type: string
            enum:
              - AD
              - AE
              - AF
              - AG
              - AI
              - AL
              - AM
              - AO
              - AR
              - AT
              - AU
              - AW
              - AX
              - AZ
              - BA
              - BB
              - BD
              - BE
              - BF
              - BG
              - BH
              - BI
              - BJ
              - BM
              - BN
              - BO
              - BR
              - BS
              - BT
              - BW
              - BY
              - BZ
              - CA
              - CD
              - CF
              - CG
              - CH
              - CI
              - CL
              - CM
              - CN
              - CO
              - CR
              - CU
              - CV
              - CW
              - CY
              - CZ
              - DE
              - DJ
              - DK
              - DM
              - DO
              - DZ
              - EC
              - EE
              - EG
              - ES
              - ET
              - FI
              - FJ
              - FM
              - FO
              - FR
              - GA
              - GB
              - GD
              - GE
              - GF
              - GG
              - GH
              - GI
              - GL
              - GM
              - GN
              - GP
              - GQ
              - GR
              - GT
              - GU
              - GW
              - GY
              - HK
              - HN
              - HR
              - HT
              - HU
              - ID
              - IE
              - IL
              - IM
              - IN
              - IQ
              - IR
              - IS
              - IT
              - JE
              - JM
              - JO
              - JP
              - KE
              - KG
              - KH
              - KN
              - KR
              - KW
              - KY
              - KZ
              - LA
              - LB
              - LC
              - LI
              - LK
              - LR
              - LS
              - LT
              - LU
              - LV
              - LY
              - MA
              - MC
              - MD
              - ME
              - MG
              - MK
              - ML
              - MM
              - MN
              - MO
              - MP
              - MQ
              - MR
              - MT
              - MU
              - MV
              - MW
              - MX
              - MY
              - MZ
              - NA
              - NC
              - NE
              - NG
              - NI
              - NL
              - 'NO'
              - NP
              - NZ
              - OM
              - PA
              - PE
              - PF
              - PG
              - PH
              - PK
              - PL
              - PR
              - PS
              - PT
              - PY
              - QA
              - RE
              - RO
              - RS
              - RU
              - RW
              - SA
              - SC
              - SD
              - SE
              - SG
              - SI
              - SK
              - SL
              - SN
              - SO
              - SR
              - SS
              - SV
              - SX
              - SZ
              - TC
              - TD
              - TG
              - TH
              - TJ
              - TM
              - TN
              - TR
              - TT
              - TW
              - TZ
              - UA
              - UG
              - US
              - UY
              - UZ
              - VC
              - VE
              - VG
              - VI
              - VN
              - XK
              - YE
              - YT
              - ZA
              - ZM
              - ZW
          in: query
          name: location
          required: false
          description: >-
            Filter by geographic location (ISO 3166-1 alpha-2 country code, e.g.
            US, GB, DE)
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    - name: chatgpt.com
                      value: 4400
                    - name: gemini.google.com
                      value: 2100
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          enum:
                            - chatgpt.com
                            - gemini.google.com
                            - perplexity.ai
                            - copilot.microsoft.com
                            - copilot.com
                            - claude.ai
                            - grok.com
                            - chat.mistral.ai
                          description: Referrer domain
                        value:
                          type: number
                      required:
                        - name
                        - value
                      additionalProperties: false
                required:
                  - data
                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 90 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:
                  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
      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.

````