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

# GetForecasts

> GetForecasts returns the latest generated probabilistic forecasts; the degraded flag distinguishes a backend outage from a healthy empty set.



## OpenAPI

````yaml /api/ForecastService.openapi.yaml get /api/forecast/v1/get-forecasts
openapi: 3.1.0
info:
  title: ForecastService API
  version: 1.0.0
servers:
  - url: https://api.worldmonitor.app
security:
  - WorldMonitorKey: []
  - ApiKeyHeader: []
paths:
  /api/forecast/v1/get-forecasts:
    get:
      tags:
        - ForecastService
      summary: GetForecasts
      description: >-
        GetForecasts returns the latest generated probabilistic forecasts; the
        degraded flag distinguishes a backend outage from a healthy empty set.
      operationId: GetForecasts
      parameters:
        - name: domain
          in: query
          description: >-
            Forecast domain to retrieve, such as geopolitics, markets, or
            climate.
          required: false
          example: conflict
          schema:
            type: string
            enum:
              - conflict
              - market
              - supply_chain
              - political
              - military
              - cyber
              - infrastructure
        - name: region
          in: query
          description: Optional geographic or thematic region filter for forecasts.
          required: false
          example: example
          schema:
            type: string
        - name: jmespath
          in: query
          description: >-
            Optional JMESPath expression applied server-side to project or
            reduce the JSON response before it is returned (mirrors the MCP
            jmespath argument). Invalid expressions, expressions larger than
            1024 UTF-8 bytes, or projections that exceed the 256 KB output cap
            return HTTP 400 with a {_jmespath_error, original_keys} envelope.
            Grammar and worked examples:
            https://www.worldmonitor.app/docs/mcp-jmespath.
          required: false
          example: keys(@)
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                degraded: true
                error: example
                forecasts:
                  - calibration:
                      drift: 1.5
                      marketPrice: 75.25
                      marketTitle: example
                      source: example
                    cascades:
                      - domain: example
                        effect: example
                        probability: 1.5
                    caseFile:
                      actorLenses:
                        - example
                      actors:
                        - category: cs.AI
                          constraints:
                            - example
                          id: example-id
                          influenceScore: 42.5
                          likelyActions:
                            - example
                      baseCase: example
                      branches:
                        - kind: example
                          outcome: example
                          projectedProbability: 1.5
                          rounds:
                            - {}
                          summary: Example WorldMonitor observation.
                      changeItems:
                        - example
                    confidence: 0.82
                    createdAt: 1717200000000
                generatedAt: 1717200000000
                stale: true
              schema:
                $ref: '#/components/schemas/GetForecastsResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidationError'
                  - $ref: '#/components/schemas/JmespathProjectionError'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: >-
            API access requires an active subscription (the API key's
            subscription is inactive or expired).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '429':
          description: Rate limit exceeded.
          headers:
            X-RateLimit-Limit:
              description: Maximum requests allowed in the active rate-limit window.
              schema:
                type: string
            X-RateLimit-Remaining:
              description: Requests remaining in the active rate-limit window.
              schema:
                type: string
            X-RateLimit-Reset:
              description: >-
                Unix epoch milliseconds when the active rate-limit window
                resets.
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying the request.
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/RateLimitError'
        default:
          description: Gateway or handler error response.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/GatewayError'
components:
  schemas:
    GetForecastsResponse:
      type: object
      properties:
        forecasts:
          type: array
          items:
            $ref: '#/components/schemas/Forecast'
        generatedAt:
          type: integer
          format: int64
          description: 'Warning: Values > 2^53 may lose precision in JavaScript'
        degraded:
          type: boolean
          description: |-
            True when the forecast backend could not read the canonical cache.
             Distinguishes an outage from a healthy empty forecast set.
        stale:
          type: boolean
          description: >-
            True when forecasts are served from a stale fallback. Currently
            false for
             this endpoint because get-forecasts does not have a stale fallback cache.
        error:
          type: string
          description: |-
            Stable machine-readable reason when degraded=true, empty otherwise.
             Value: "forecast_backend_unavailable" on Redis/backend read failures.
    ValidationError:
      type: object
      properties:
        violations:
          type: array
          items:
            $ref: '#/components/schemas/FieldViolation'
          description: List of validation violations
      required:
        - violations
      description: >-
        ValidationError is returned when request validation fails. It contains a
        list of field violations describing what went wrong.
    JmespathProjectionError:
      description: >-
        Returned when a REST jmespath projection is invalid or exceeds the
        expression/output byte limits.
      properties:
        _jmespath_error:
          description: Projection error discriminator and details.
          type: string
        original_keys:
          description: Top-level keys or shape of the unprojected response.
          items:
            type: string
          type: array
      required:
        - _jmespath_error
        - original_keys
      type: object
    UnauthorizedError:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
      required:
        - error
      description: >-
        Returned when the API key is missing, malformed, or lacks current API
        access.
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          description: Human-readable entitlement failure reason.
        requiredTier:
          type: integer
          format: int32
          description: Minimum entitlement tier required for this endpoint.
        currentTier:
          type: integer
          format: int32
          description: Caller entitlement tier when known.
        planKey:
          type: string
          description: Caller plan key when known.
      required:
        - error
      description: >-
        Returned when a PRO-gated endpoint denies access because the caller has
        no resolved authenticated user, entitlements cannot be verified, or the
        caller lacks the required entitlement tier.
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message (e.g., 'user not found', 'database connection failed')
      description: >-
        Error is returned when a handler encounters an error. It contains a
        simple error message that the developer can customize.
    RateLimitError:
      type: object
      description: Returned when a gateway or handler rate limit rejects the request.
      properties:
        error:
          type: string
          description: Human-readable rate-limit failure reason.
      required:
        - error
    GatewayError:
      type: object
      description: >-
        Returned by gateway infrastructure errors before an RPC handler runs,
        such as origin, routing, method, authentication, or quota checks.
      properties:
        error:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: Gateway error reason or structured gateway failure details.
      required:
        - error
    Forecast:
      type: object
      properties:
        id:
          type: string
        domain:
          type: string
        region:
          type: string
        title:
          type: string
        scenario:
          type: string
        feedSummary:
          type: string
        probability:
          type: number
          format: double
        confidence:
          type: number
          format: double
        timeHorizon:
          type: string
        signals:
          type: array
          items:
            $ref: '#/components/schemas/ForecastSignal'
        cascades:
          type: array
          items:
            $ref: '#/components/schemas/CascadeEffect'
        trend:
          type: string
          description: >-
            Forecast trend direction. Current values are "rising", "falling",
            and
             "stable". The seeder compares probability against the prior forecast
             snapshot and uses a +/-0.05 deadband: deltas above +0.05 are rising,
             below -0.05 are falling, and everything inside the band is stable.
        priorProbability:
          type: number
          format: double
        calibration:
          $ref: '#/components/schemas/CalibrationInfo'
        createdAt:
          type: integer
          format: int64
          description: 'Warning: Values > 2^53 may lose precision in JavaScript'
        updatedAt:
          type: integer
          format: int64
          description: 'Warning: Values > 2^53 may lose precision in JavaScript'
        perspectives:
          $ref: '#/components/schemas/Perspectives'
        projections:
          $ref: '#/components/schemas/Projections'
        caseFile:
          $ref: '#/components/schemas/ForecastCase'
        simulationAdjustment:
          type: number
          format: double
          description: >-
            Simulation-scoring fields — populated when the deep forecast
            simulation pipeline
             has run for this forecast's state and produced a non-zero adjustment.
             simulation_adjustment: raw score delta (+0.08–+0.12 positive, -0.12/-0.15 negative).
             sim_path_confidence: clamped [0,1] confidence of the matched sim top-path; 0 = not set.
             demoted_by_simulation: true when a negative adjustment crossed the 0.50 acceptance threshold.
        simPathConfidence:
          type: number
          format: double
        demotedBySimulation:
          type: boolean
        resolution:
          $ref: '#/components/schemas/ResolutionSpec'
    FieldViolation:
      type: object
      properties:
        field:
          type: string
          description: >-
            The field path that failed validation (e.g., 'user.email' for nested
            fields). For header validation, this will be the header name (e.g.,
            'X-API-Key')
        description:
          type: string
          description: >-
            Human-readable description of the validation violation (e.g., 'must
            be a valid email address', 'required field missing')
      required:
        - field
        - description
      description: FieldViolation describes a single validation error for a specific field.
    ForecastSignal:
      type: object
      properties:
        type:
          type: string
        value:
          type: string
        weight:
          type: number
          format: double
    CascadeEffect:
      type: object
      properties:
        domain:
          type: string
        effect:
          type: string
        probability:
          type: number
          format: double
    CalibrationInfo:
      type: object
      properties:
        marketTitle:
          type: string
        marketPrice:
          type: number
          format: double
        drift:
          type: number
          format: double
        source:
          type: string
    Perspectives:
      type: object
      properties:
        strategic:
          type: string
        regional:
          type: string
        contrarian:
          type: string
    Projections:
      type: object
      properties:
        h24:
          type: number
          format: double
          description: Projected 24-hour probability after domain-curve normalization.
        d7:
          type: number
          format: double
          description: Projected 7-day probability after domain-curve normalization.
        d30:
          type: number
          format: double
          description: Projected 30-day probability after domain-curve normalization.
      description: >-
        Projections contains bounded presentation-path probabilities derived
        from
         domain curves. Market forecasts are peak-anchored, so the projected value at
         the forecast's own time_horizon can intentionally differ from the headline
         probability; non-market forecasts preserve their emitted horizon as anchor.
    ForecastCase:
      type: object
      properties:
        supportingEvidence:
          type: array
          items:
            $ref: '#/components/schemas/ForecastCaseEvidence'
        counterEvidence:
          type: array
          items:
            $ref: '#/components/schemas/ForecastCaseEvidence'
        triggers:
          type: array
          items:
            type: string
        actorLenses:
          type: array
          items:
            type: string
        baseCase:
          type: string
        escalatoryCase:
          type: string
        contrarianCase:
          type: string
        changeSummary:
          type: string
        changeItems:
          type: array
          items:
            type: string
        actors:
          type: array
          items:
            $ref: '#/components/schemas/ForecastActor'
        worldState:
          $ref: '#/components/schemas/ForecastWorldState'
        branches:
          type: array
          items:
            $ref: '#/components/schemas/ForecastBranch'
    ResolutionSpec:
      type: object
      properties:
        kind:
          type: string
        metricKey:
          type: string
        operator:
          type: string
        threshold:
          type: number
          format: double
        baselineValue:
          type: number
          format: double
        window:
          type: string
        deadline:
          type: integer
          format: int64
          description: 'Warning: Values > 2^53 may lose precision in JavaScript'
        sourceFeed:
          type: string
        question:
          type: string
      description: |-
        Machine-checkable resolution spec — makes a forecast a scoreable *bet*.
         Every forecast carries exactly one spec, either "hard" or "judged":
           - "hard":   auto-resolvable by a free metric comparison against a
                       WorldMonitor feed the detector already scored from. Sets
                       metric_key (feed + path expression), operator, threshold,
                       window, and source_feed (a RESOLUTION_FEED_KEYS allowlist
                       member). baseline_value is set only when operator is
                       "crosses" (the emission-time metric value the move is
                       measured from).
           - "judged": resolved by a later LLM judge against the question string;
                       no numeric threshold, but still a resolution deadline.
         kind and operator are strings, not proto enums, mirroring the trend field
         above so a new operator/kind never requires a proto migration to land in
         the 45-day history. Current kind values are "hard" and "judged"; current
         operator values are ">=", "<=", and "crosses".
         kind and deadline are always set; every other field is optional and absent
         (persisted as JSON null) when it does not apply to the kind — a judged spec
         carries no threshold/baseline_value so "no threshold" is never confused
         with a real threshold of 0, and a hard spec carries no question.
    ForecastCaseEvidence:
      type: object
      properties:
        type:
          type: string
        summary:
          type: string
        weight:
          type: number
          format: double
    ForecastActor:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        category:
          type: string
        role:
          type: string
        objectives:
          type: array
          items:
            type: string
        constraints:
          type: array
          items:
            type: string
        likelyActions:
          type: array
          items:
            type: string
        influenceScore:
          type: number
          format: double
    ForecastWorldState:
      type: object
      properties:
        summary:
          type: string
        activePressures:
          type: array
          items:
            type: string
        stabilizers:
          type: array
          items:
            type: string
        keyUnknowns:
          type: array
          items:
            type: string
    ForecastBranch:
      type: object
      properties:
        kind:
          type: string
        title:
          type: string
        summary:
          type: string
        outcome:
          type: string
        projectedProbability:
          type: number
          format: double
        rounds:
          type: array
          items:
            $ref: '#/components/schemas/ForecastBranchRound'
    ForecastBranchRound:
      type: object
      properties:
        round:
          type: integer
          format: int32
        focus:
          type: string
        developments:
          type: array
          items:
            type: string
        actorMoves:
          type: array
          items:
            type: string
        probabilityShift:
          type: number
          format: double
  securitySchemes:
    WorldMonitorKey:
      type: apiKey
      in: header
      name: X-WorldMonitor-Key
      description: User-issued WorldMonitor API key.
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Alias header for the WorldMonitor API key (X-WorldMonitor-Key).

````