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

# Get the latest forecast for a market analysis

> Get the most recent forecast for a specific market analysis.

Returns the latest forecast regardless of is_active status.
The is_active field indicates whether the forecast is still valid
(False means config/keywords have changed since forecast creation).

Returns None (204 No Content) if no forecast exists for this analysis.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json get /api/v1/market-analysis/analyses/{analysis_id}/forecast
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/market-analysis/analyses/{analysis_id}/forecast:
    get:
      tags:
        - Market Analysis
      summary: Get the latest forecast for a market analysis
      description: |-
        Get the most recent forecast for a specific market analysis.

        Returns the latest forecast regardless of is_active status.
        The is_active field indicates whether the forecast is still valid
        (False means config/keywords have changed since forecast creation).

        Returns None (204 No Content) if no forecast exists for this analysis.
      operationId: >-
        get_market_analysis_forecast_api_v1_market_analysis_analyses__analysis_id__forecast_get
      parameters:
        - name: analysis_id
          in: path
          required: true
          schema:
            type: integer
            title: Analysis Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/MarketAnalysisForecastSchema'
                  - type: 'null'
                title: >-
                  Response Get Market Analysis Forecast Api V1 Market Analysis
                  Analyses  Analysis Id  Forecast Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    MarketAnalysisForecastSchema:
      properties:
        id:
          type: integer
          title: Id
          description: Forecast ID
        monthly_search_volume:
          type: integer
          title: Monthly Search Volume
          description: Total monthly search volume
        average_top_of_page_bid__low_range:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Average Top Of Page Bid  Low Range
          description: Average low-range bid estimate
        average_top_of_page_bid__high_range:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Average Top Of Page Bid  High Range
          description: Average high-range bid estimate
        estimated_cost_per_lead:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Estimated Cost Per Lead
          description: Estimated cost per lead/conversion
        date_added:
          type: string
          format: date-time
          title: Date Added
          description: Creation timestamp
        date_updated:
          type: string
          format: date-time
          title: Date Updated
          description: Last update timestamp
        is_active:
          type: boolean
          title: Is Active
          description: Whether the forecast is active (False if config/keywords changed)
      type: object
      required:
        - id
        - monthly_search_volume
        - average_top_of_page_bid__low_range
        - average_top_of_page_bid__high_range
        - estimated_cost_per_lead
        - date_added
        - date_updated
        - is_active
      title: MarketAnalysisForecastSchema
      description: Schema for a market analysis forecast.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````