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

# Get the latest site audit run

> The newest finished run (COMPLETED or PARTIAL). An in-flight run does not hide the last scored one.



## OpenAPI

````yaml /v2/openapi.json get /site-audit/runs/latest
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:
  /site-audit/runs/latest:
    get:
      tags:
        - Site Audit
      summary: Get the latest site audit run
      description: >-
        The newest finished run (COMPLETED or PARTIAL). An in-flight run does
        not hide the last scored one.
      operationId: getLatestSiteAuditRun
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 6ba7b820-9dad-11d1-80b4-00c04fd430c8
                  state: COMPLETED
                  trigger: SCHEDULED
                  healthScore: 82
                  urlsTotal: 1200
                  urlsChecked: 1180
                  urlsSkipped: 20
                  urlsUnchecked: 0
                  issueTotals:
                    error: 12
                    warning: 30
                    notice: 4
                  createdAt: '2026-08-01T09:00:00.000Z'
                  startedAt: '2026-08-01T09:00:04.000Z'
                  finishedAt: '2026-08-01T09:42:00.000Z'
                  error: null
                  issueCounts:
                    status4xx: 12
                    missingDescription: 30
                  issueDiffs:
                    status4xx:
                      affectedUrls: 12
                      fixedUrls: 4
                      newUrls: 3
                  issues:
                    - issue: status4xx
                      label: Page returns a 4xx error
                      severity: error
                      affectedUrls: 12
                      fixedUrls: 4
                      newUrls: 3
                  performance:
                    bytesAvg: 84000
                    downloadAvgMs: 210
                    ttfbAvgMs: 180
                    ttfbP75Ms: 320
                    ttfbP95Ms: 900
                  recheckPending: 0
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Audit run identifier
                  state:
                    type: string
                    enum:
                      - PENDING
                      - RUNNING
                      - FINALIZING
                      - COMPLETED
                      - FAILED
                      - PARTIAL
                    description: >-
                      Run state; PARTIAL means the plan's URL ceiling capped
                      coverage
                  trigger:
                    type: string
                    enum:
                      - SCHEDULED
                      - MANUAL
                    description: What opened the run
                  healthScore:
                    type: integer
                    nullable: true
                    description: Health score 0-100; null until the run finalizes
                  urlsTotal:
                    type: integer
                    description: URLs selected for the run
                  urlsChecked:
                    type: integer
                    description: URLs the sweep returned a result for
                  urlsSkipped:
                    type: integer
                    description: URLs left out of the run by the plan ceiling
                  urlsUnchecked:
                    type: integer
                    description: URLs selected but never answered before the run closed
                  issueTotals:
                    type: object
                    example:
                      error: 12
                      warning: 30
                      notice: 4
                    description: >-
                      Affected URLs summed per severity. A URL in two checks
                      counts twice.
                    properties:
                      error:
                        type: integer
                        description: Affected URLs on error-severity checks
                      notice:
                        type: integer
                        description: Affected URLs on notice-severity checks
                      warning:
                        type: integer
                        description: Affected URLs on warning-severity checks
                    required:
                      - error
                      - notice
                      - warning
                    additionalProperties: false
                  createdAt:
                    type: string
                    format: date-time
                    description: Timestamp (ISO 8601)
                  startedAt:
                    type: string
                    format: date-time
                    description: When the first check was dispatched
                    nullable: true
                  finishedAt:
                    type: string
                    format: date-time
                    description: When the run finalized
                    nullable: true
                  error:
                    type: string
                    nullable: true
                    description: Failure reason when the run state is FAILED
                  issueCounts:
                    type: object
                    additionalProperties:
                      type: integer
                    description: >-
                      Affected URL count per check. Checks that never fired are
                      omitted.
                  issueDiffs:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        affectedUrls:
                          type: integer
                          description: URLs the check fires on in this run
                        fixedUrls:
                          type: integer
                          description: >-
                            URLs that stopped firing since the previous finished
                            run
                        newUrls:
                          type: integer
                          description: >-
                            URLs that started firing since the previous finished
                            run
                      required:
                        - affectedUrls
                        - fixedUrls
                        - newUrls
                      additionalProperties: false
                    description: >-
                      New/fixed deltas against the previous finished run, keyed
                      by check id
                  issues:
                    type: array
                    items:
                      type: object
                      example:
                        issue: status4xx
                        label: Page returns a 4xx error
                        severity: error
                        affectedUrls: 12
                        fixedUrls: 4
                        newUrls: 3
                      properties:
                        affectedUrls:
                          type: integer
                          description: URLs the check fires on in this run
                        fixedUrls:
                          type: integer
                          description: >-
                            URLs that stopped firing since the previous finished
                            run
                        issue:
                          type: string
                          enum:
                            - status4xx
                            - status5xx
                            - brokenInternalLink
                            - redirectChainTooLong
                            - missingTitle
                            - noH1
                            - certificateInvalid
                            - sitemapUrlRedirects
                            - orphanPage
                            - missingDescription
                            - multipleH1
                            - thinContent
                            - slowTtfb
                            - oversizedHtml
                            - certificateExpiringSoon
                            - linkedNotInSitemap
                            - titleLengthOutOfRange
                            - externalCanonical
                            - duplicateContent
                            - navOnlyPage
                            - contentRequiresJs
                          description: >-
                            Check id (status4xx, status5xx, brokenInternalLink,
                            redirectChainTooLong, missingTitle, noH1,
                            certificateInvalid, sitemapUrlRedirects, orphanPage,
                            missingDescription, multipleH1, thinContent,
                            slowTtfb, oversizedHtml, certificateExpiringSoon,
                            linkedNotInSitemap, titleLengthOutOfRange,
                            externalCanonical, duplicateContent, navOnlyPage,
                            contentRequiresJs)
                        label:
                          type: string
                          description: Human-readable check name
                        newUrls:
                          type: integer
                          description: >-
                            URLs that started firing since the previous finished
                            run
                        severity:
                          type: string
                          enum:
                            - error
                            - warning
                            - notice
                          description: Check severity
                      required:
                        - affectedUrls
                        - fixedUrls
                        - issue
                        - label
                        - newUrls
                        - severity
                      additionalProperties: false
                    description: Checks that fired, errors first
                  performance:
                    type: object
                    nullable: true
                    description: >-
                      Response-time and size averages over fetched URLs; null
                      when the run checked nothing
                    example:
                      bytesAvg: 84000
                      downloadAvgMs: 210
                      ttfbAvgMs: 180
                      ttfbP75Ms: 320
                      ttfbP95Ms: 900
                    properties:
                      bytesAvg:
                        type: number
                        description: Average HTML size in bytes
                      downloadAvgMs:
                        type: number
                        description: Average download time in milliseconds
                      ttfbAvgMs:
                        type: number
                        description: Average time to first byte in milliseconds
                      ttfbP75Ms:
                        type: number
                        description: 75th percentile time to first byte in milliseconds
                      ttfbP95Ms:
                        type: number
                        description: 95th percentile time to first byte in milliseconds
                    required:
                      - bytesAvg
                      - downloadAvgMs
                      - ttfbAvgMs
                      - ttfbP75Ms
                      - ttfbP95Ms
                    additionalProperties: false
                  recheckPending:
                    type: integer
                    description: Pages a re-check is still waiting on
                required:
                  - id
                  - state
                  - trigger
                  - healthScore
                  - urlsTotal
                  - urlsChecked
                  - urlsSkipped
                  - urlsUnchecked
                  - issueTotals
                  - createdAt
                  - error
                  - issueCounts
                  - issueDiffs
                  - issues
                  - performance
                  - recheckPending
                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
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  code: SITE_AUDIT_RUN_NOT_FOUND
                  message: Site audit run not found
                properties:
                  code:
                    type: string
                    description: Error code indicating the type of error
                    enum:
                      - SITE_AUDIT_PLAN_REQUIRED
                      - SITE_AUDIT_PROJECT_NOT_FOUND
                      - SITE_AUDIT_RUN_NOT_FOUND
                      - INTERNAL_ERROR
                    example: SITE_AUDIT_PLAN_REQUIRED
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - code
                  - message
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  code: SITE_AUDIT_RUN_NOT_FOUND
                  message: Site audit run not found
                properties:
                  code:
                    type: string
                    description: Error code indicating the type of error
                    enum:
                      - SITE_AUDIT_PLAN_REQUIRED
                      - SITE_AUDIT_PROJECT_NOT_FOUND
                      - SITE_AUDIT_RUN_NOT_FOUND
                      - INTERNAL_ERROR
                    example: SITE_AUDIT_PLAN_REQUIRED
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - code
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  code: SITE_AUDIT_RUN_NOT_FOUND
                  message: Site audit run not found
                properties:
                  code:
                    type: string
                    description: Error code indicating the type of error
                    enum:
                      - SITE_AUDIT_PLAN_REQUIRED
                      - SITE_AUDIT_PROJECT_NOT_FOUND
                      - SITE_AUDIT_RUN_NOT_FOUND
                      - INTERNAL_ERROR
                    example: SITE_AUDIT_PLAN_REQUIRED
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - code
                  - 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.

````

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