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

> ## Agent Instructions
> Setting up Context.dev for a user? Follow https://docs.context.dev/agent-quickstart.md. Start by signing the user up and getting an API key through https://www.context.dev/auth.md; application code reads CONTEXT_DEV_API_KEY.

# Retrieve a monitor run

> Retrieve the status, timing, and results of one monitor run.

<Badge color="blue">0 credits</Badge>

Requires [`monitors:read` permission](/account/api-keys). See the [guide](/monitors/runs-and-changes) for examples and usage.


## OpenAPI

````yaml GET /monitors/{monitor_id}/runs/{run_id}
openapi: 3.1.0
info:
  title: Context.dev API
  description: >-
    Scrape, crawl, search, and monitor websites, and retrieve brand, people, and
    news data.
  version: 1.0.0
servers:
  - url: https://api.context.dev/v1
security: []
tags:
  - name: Webhooks
    description: Inspect and retry batch and monitor webhook deliveries.
  - name: Logs
    description: Read your organization's API request logs.
  - name: Usage
    description: Read your organization's credit balance and usage history.
  - name: Agent Feedback
    description: Report API issues and documentation mismatches.
  - name: Batches
    description: Scrape many pages or crawl a site asynchronously.
  - name: Monitors
    description: Watch websites for exact or meaningful changes.
  - name: News
    description: Search live and historical news about a company.
  - name: Answers
    description: Answer a research task from the live web in the JSON shape you ask for.
paths:
  /monitors/{monitor_id}/runs/{run_id}:
    get:
      tags:
        - Monitors
      summary: Retrieve a monitor run
      description: Retrieve the status, timing, and results of one monitor run.
      operationId: getMonitorRun
      parameters:
        - schema:
            type: string
            description: ID of the monitor.
            example: mon_123
          required: true
          description: ID of the monitor.
          name: monitor_id
          in: path
        - schema:
            type: string
            description: ID of the monitor run.
            example: run_123
          required: true
          description: ID of the monitor run.
          name: run_id
          in: path
      responses:
        '200':
          description: The requested monitor run
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Mode:
              $ref: '#/components/headers/RateLimitMode'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsRunResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/MonitorsUnauthorized'
        '403':
          description: >-
            API key permissions or organization settings do not allow this
            request.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Mode:
              $ref: '#/components/headers/RateLimitMode'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          $ref: '#/components/responses/MonitorsNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - bearerAuth: []
components:
  headers:
    RequestId:
      description: Unique ID of this request; also `request_id` in JSON bodies.
      schema:
        type: string
        format: uuid
    RateLimitLimit:
      description: >-
        Maximum request units per minute, or maximum concurrent requests when
        X-RateLimit-Mode is concurrency.
      schema:
        type: integer
        minimum: 1
    RateLimitRemaining:
      description: >-
        Request units remaining in the current minute, or concurrent requests
        still available when X-RateLimit-Mode is concurrency.
      schema:
        type: integer
        minimum: 0
    RateLimitReset:
      description: >-
        Unix timestamp in seconds when the per-minute rate limit resets. Omitted
        for concurrency limits.
      schema:
        type: integer
    RateLimitMode:
      description: >-
        Set to concurrency when the organization is limited by concurrent
        requests. Omitted for per-minute limits.
      schema:
        type: string
        enum:
          - concurrency
  schemas:
    MonitorsRunResponse:
      type: object
      properties:
        webhook_delivery_ids:
          type: array
          items:
            type: string
          description: Webhook delivery IDs for this run.
        id:
          type: string
          example: run_123
        monitor_id:
          type: string
          example: mon_123
        status:
          $ref: '#/components/schemas/MonitorsRunStatus'
        run_type:
          type: string
          enum:
            - baseline
            - scheduled
          description: A baseline run follows creation or a target or detection change.
        target_type:
          $ref: '#/components/schemas/MonitorsTargetType'
        change_detection_type:
          $ref: '#/components/schemas/MonitorsChangeDetectionType'
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        change_detected:
          type: boolean
          example: true
        change_id:
          type:
            - string
            - 'null'
          example: chg_123
        baseline_created:
          type: boolean
          description: >-
            True when this run established the monitor's initial baseline;
            baseline runs perform no change detection.
        credits_charged:
          type: integer
          minimum: 0
          description: Credits charged for this run (0 for skipped/failed runs).
          example: 1
        skip_reason:
          type:
            - string
            - 'null'
          enum:
            - insufficient_credits
            - monitor_paused
            - superseded
            - null
          description: Why a skipped run never executed; null unless status is `skipped`.
        error:
          $ref: '#/components/schemas/MonitorsNullableRunError'
        webhook_delivery:
          $ref: '#/components/schemas/MonitorsWebhookDelivery'
          deprecated: true
          description: Deprecated. Use `webhook_deliveries` for all attempts.
        webhook_deliveries:
          type: array
          items:
            $ref: '#/components/schemas/MonitorsWebhookDelivery'
          description: >-
            All webhook deliveries attempted by this run — one per subscribed
            event that fired. Omitted when no webhook was attempted, including
            runs created before event selection was added.
        request_id:
          $ref: '#/components/schemas/RequestId'
        key_metadata:
          $ref: '#/components/schemas/KeyMetadata'
      required:
        - id
        - monitor_id
        - status
        - run_type
        - target_type
        - change_detection_type
        - change_detected
        - baseline_created
        - credits_charged
        - request_id
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message.
        error_code:
          type: string
          enum:
            - INTERNAL_ERROR
            - VALID
            - NOT_FOUND
            - FORBIDDEN
            - USAGE_EXCEEDED
            - RATE_LIMITED
            - UNAUTHORIZED
            - DISABLED
            - PAID_PLAN_REQUIRED
            - INSUFFICIENT_PERMISSIONS
            - TIMEOUT_EXCEEDS_MAXIMUM
            - TIMEOUT_TOO_SHORT_FOR_WAIT
            - WEBSITE_ACCESS_ERROR
            - WEBSITE_BLOCKED
            - WEBSITE_NOT_FOUND
            - PDF_SKIPPED
            - PDF_IMAGES_ONLY
            - INPUT_VALIDATION_ERROR
            - ZDR_NOT_SUPPORTED
            - ZDR_NOT_ENABLED
            - FREE_EMAIL_DETECTED
            - DISPOSABLE_EMAIL_DETECTED
            - REQUEST_TIMEOUT
            - COLD_DOMAIN_TIMEOUT_TOO_LOW
            - UNSUPPORTED_CONTENT
            - CONTENT_TOO_LARGE
            - MONITOR_PAUSED
            - MONITOR_NO_WEBHOOK
            - COLLECTION_PAUSED
            - MONITOR_LIMIT_EXCEEDED
            - SEARCH_UNAVAILABLE
            - BATCH_LIMIT_EXCEEDED
            - BATCH_NOT_CANCELLABLE
            - BATCH_NOT_COMPLETED
            - IDEMPOTENCY_KEY_CONFLICT
            - DELIVERY_IN_PROGRESS
            - DELIVERY_ALREADY_DELIVERED
            - DELIVERY_EXPIRED
            - DELIVERY_CANCELLED
          description: Machine-readable error code.
        required_permission:
          type: string
          enum:
            - logs:read
            - data:execute
            - monitors:read
            - monitors:write
            - batches:read
            - batches:write
          description: >-
            Permission required for this request when error_code is
            INSUFFICIENT_PERMISSIONS. Manage (write) also grants read access to
            the same resource group.
        key_metadata:
          $ref: '#/components/schemas/KeyMetadata'
        request_id:
          $ref: '#/components/schemas/RequestId'
      required:
        - request_id
    MonitorsRunStatus:
      type: string
      enum:
        - queued
        - running
        - completed
        - failed
        - skipped
      description: >-
        Lifecycle status of a run. `skipped` runs never executed — see
        `skip_reason` (insufficient credits, monitor paused, or superseded by a
        concurrent run).
    MonitorsTargetType:
      type: string
      enum:
        - page
        - sitemap
        - extract
    MonitorsChangeDetectionType:
      type: string
      enum:
        - exact
        - semantic
    MonitorsNullableRunError:
      anyOf:
        - allOf:
            - $ref: '#/components/schemas/MonitorsRunError'
        - type: 'null'
    MonitorsWebhookDelivery:
      type: object
      properties:
        delivery_id:
          type: string
          description: Delivery ID for status checks and retries, when available.
        event_id:
          type: string
          description: Identifier sent in the X-Context-Id header.
          example: evt_123
        event:
          type: string
          enum:
            - change.detected
            - run.completed
          description: >-
            The event this delivery carried. Deliveries recorded before event
            selection existed report change.detected.
        status:
          type: string
          enum:
            - delivered
            - rejected
            - failed
            - skipped_unsafe_url
          description: >-
            Outcome of the delivery attempt. Any 2xx response counts as
            delivered.
        http_status:
          type:
            - integer
            - 'null'
          minimum: 100
          maximum: 599
          description: >-
            The endpoint's final HTTP response status, or null when no response
            was received.
          example: 200
        attempted_at:
          type: string
          format: date-time
        error:
          $ref: '#/components/schemas/MonitorsNullableRunError'
      required:
        - event_id
        - event
        - status
        - http_status
        - attempted_at
        - error
      additionalProperties: false
      x-stainless-model: monitors.webhook_delivery
    RequestId:
      type: string
      format: uuid
      description: >-
        Unique ID of this request, also in `X-Request-Id`. Include it when
        contacting support.
      example: 3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91
    KeyMetadata:
      type: object
      properties:
        credits_consumed:
          type: integer
          description: Credits charged for this request.
        credits_remaining:
          type: integer
          description: Credits remaining for your organization.
      required:
        - credits_consumed
        - credits_remaining
      description: Credits this request used and your remaining balance.
    MonitorsRunError:
      type: object
      properties:
        code:
          type: string
          example: fetch_failed
        message:
          type: string
          example: The target URL could not be fetched.
      required:
        - code
        - message
      additionalProperties: false
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        X-RateLimit-Mode:
          $ref: '#/components/headers/RateLimitMode'
    MonitorsUnauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        X-RateLimit-Mode:
          $ref: '#/components/headers/RateLimitMode'
    MonitorsNotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        X-RateLimit-Mode:
          $ref: '#/components/headers/RateLimitMode'
    RateLimited:
      description: Rate limit exceeded
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        X-RateLimit-Mode:
          $ref: '#/components/headers/RateLimitMode'
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
            maximum: 60
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Human-readable error message.
              error_code:
                type: string
                enum:
                  - RATE_LIMITED
                description: Error code indicating the rate limit was exceeded
              key_metadata:
                $ref: '#/components/schemas/KeyMetadata'
              request_id:
                $ref: '#/components/schemas/RequestId'
            required:
              - request_id
              - message
              - error_code
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <API_KEY>`. Keys have full access unless
        restricted to scopes.

````

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