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

# Analyze Negative Keywords

> Analyze the negative keywords for the Google Ads customer with the given ID.

Args:
    customer_id (int): The ID of the Google Ads customer
    login_customer_id (int | None): The Google Ads customer ID to log in as
    campaign_id (int | None): The ID of the campaign
    approved_user (User): The current user
    search_terms_days (int | None): The number of days to get the search terms
    search_terms_limit (int | None): The limit of search terms to get
    temperature (float): The temperature for the Gemini model

Returns:
    Dict containing the list of negative keywords



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/chat/analyze_negative_keywords
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/chat/analyze_negative_keywords:
    post:
      tags:
        - Chat
      summary: Analyze Negative Keywords
      description: >-
        Analyze the negative keywords for the Google Ads customer with the given
        ID.


        Args:
            customer_id (int): The ID of the Google Ads customer
            login_customer_id (int | None): The Google Ads customer ID to log in as
            campaign_id (int | None): The ID of the campaign
            approved_user (User): The current user
            search_terms_days (int | None): The number of days to get the search terms
            search_terms_limit (int | None): The limit of search terms to get
            temperature (float): The temperature for the Gemini model

        Returns:
            Dict containing the list of negative keywords
      operationId: analyze_negative_keywords_api_v1_chat_analyze_negative_keywords_post
      parameters:
        - name: customer_id
          in: query
          required: true
          schema:
            type: integer
            title: Customer Id
        - name: login_customer_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Login Customer Id
        - name: campaign_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Campaign Id
        - name: search_terms_days
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 1
            title: Search Terms Days
        - name: search_terms_limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 100
            title: Search Terms Limit
        - name: temperature
          in: query
          required: false
          schema:
            type: number
            maximum: 1
            minimum: 0
            default: 0.2
            title: Temperature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyzeNegativeKeywordsResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    AnalyzeNegativeKeywordsResponseSchema:
      properties:
        summary:
          $ref: '#/components/schemas/AnalyzeNegativeKeywordsSummarySchema'
      type: object
      required:
        - summary
      title: AnalyzeNegativeKeywordsResponseSchema
      description: The schema for a response of negative keywords' analysis.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AnalyzeNegativeKeywordsSummarySchema:
      properties:
        recommended_negatives:
          items:
            $ref: '#/components/schemas/RecommendedNegativeKeywordsSchema'
          type: array
          title: Recommended Negatives
      type: object
      required:
        - recommended_negatives
      title: AnalyzeNegativeKeywordsSummarySchema
      description: The schema for a summary of negative keywords' analysis.
    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
    RecommendedNegativeKeywordsSchema:
      properties:
        status:
          $ref: '#/components/schemas/RecommendationStatus'
          title: The status of the recommendation
        is_manually_generated:
          type: boolean
          title: Whether the recommendation was manually generated
        date_regenerated:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: The date the recommendation was regenerated
        date_added:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: The date the recommendation was added
        date_updated:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: The date the recommendation was updated
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
        keyword:
          type: string
          title: The keyword
        match_type:
          type: string
          title: The match type
        reason:
          type: string
          title: The reason
        budget_saving:
          anyOf:
            - type: number
            - type: 'null'
          title: The estimated budget saving from applying this negative keyword
        campaign:
          $ref: '#/components/schemas/KeywordCampaignSchema'
          title: The campaign
      type: object
      required:
        - status
        - is_manually_generated
        - keyword
        - match_type
        - reason
        - campaign
      title: RecommendedNegativeKeywordsSchema
      description: The schema for recommended negative keywords.
    RecommendationStatus:
      type: string
      enum:
        - pending
        - applied
        - auto_applied
        - rejected
      title: RecommendationStatus
      description: The status of a recommendation.
    KeywordCampaignSchema:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        channel_type:
          anyOf:
            - $ref: '#/components/schemas/GoogleCampaignChannelType'
            - type: 'null'
      type: object
      required:
        - id
        - name
      title: KeywordCampaignSchema
      description: Schema for campaign information related to a keyword
    GoogleCampaignChannelType:
      type: string
      enum:
        - SEARCH
        - DISPLAY
        - SHOPPING
        - VIDEO
        - APP
        - PERFORMANCE_MAX
        - LOCAL
        - SMART
        - LOCAL_SERVICES
        - DEMAND_GEN
        - DISCOVERY
      title: GoogleCampaignChannelType
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````