> ## 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 Ads Keywords

> Retrieve keywords (positive or negative) with performance for a specified date range.

Args:
    customer_id: The Google Ads customer ID

    start_date (str): Start date for the data range (YYYY-MM-DD). Defaults to 30 days ago.
    end_date (str): End date for the data range (YYYY-MM-DD). Defaults to today.
    limit: Maximum number of records to retrieve (default: 5000)
    negative: Whether to retrieve negative keywords (default: False).
    include_campaign_negatives: If retrieving negatives, include campaign-level ones (default: False).
    search: Optional text search filter
    exclude_removed: Exclude REMOVED entities from results (default: False)
    oauth2_token: The OAuth2 token for authentication

Returns:
    List of keywords with their details and performance metrics



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json get /api/v1/google-ads/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/google-ads/keywords:
    get:
      tags:
        - Google Ads
      summary: Get Ads Keywords
      description: >-
        Retrieve keywords (positive or negative) with performance for a
        specified date range.


        Args:
            customer_id: The Google Ads customer ID

            start_date (str): Start date for the data range (YYYY-MM-DD). Defaults to 30 days ago.
            end_date (str): End date for the data range (YYYY-MM-DD). Defaults to today.
            limit: Maximum number of records to retrieve (default: 5000)
            negative: Whether to retrieve negative keywords (default: False).
            include_campaign_negatives: If retrieving negatives, include campaign-level ones (default: False).
            search: Optional text search filter
            exclude_removed: Exclude REMOVED entities from results (default: False)
            oauth2_token: The OAuth2 token for authentication

        Returns:
            List of keywords with their details and performance metrics
      operationId: get_ads_keywords_api_v1_google_ads_keywords_get
      parameters:
        - name: customer_id
          in: query
          required: true
          schema:
            type: integer
            title: Customer Id
        - name: campaign_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Campaign Id
        - name: ad_group_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Ad Group Id
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            title: Start Date
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            title: End Date
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 5000
            title: Limit
        - name: negative
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Negative
        - name: include_campaign_negatives
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Campaign Negatives
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
                maxLength: 200
              - type: 'null'
            title: Search
        - name: exclude_removed
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Exclude Removed
        - name: token_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Optional specific Token ID
            title: Token Id
          description: Optional specific Token ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KeywordSchema'
                title: Response Get Ads Keywords Api V1 Google Ads Keywords Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    KeywordSchema:
      properties:
        text:
          type: string
          title: Text
          description: The keyword text
        match_type:
          $ref: '#/components/schemas/KeywordMatchTypes'
          description: The match type of the keyword
        keyword_id:
          type: string
          title: Keyword Id
        added_to:
          type: string
          title: Added To
          description: The name of the ad group or campaign the keyword is added to
        level:
          type: string
          title: Level
          description: The level at which the keyword is applied (Ad Group or Campaign)
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        negative:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Negative
          default: false
        quality_score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Quality Score
        ad_group:
          anyOf:
            - $ref: '#/components/schemas/KeywordAdGroupSchema'
            - type: 'null'
        campaign:
          anyOf:
            - $ref: '#/components/schemas/KeywordCampaignSchema'
            - type: 'null'
        metrics:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: integer
                  - type: number
              type: object
            - type: 'null'
          title: Metrics
      type: object
      required:
        - text
        - match_type
        - keyword_id
        - added_to
        - level
      title: KeywordSchema
      description: Schema for keyword data
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KeywordMatchTypes:
      type: string
      enum:
        - EXACT
        - PHRASE
        - BROAD
        - BROAD_MODIFIER
        - NEGATIVE
      title: KeywordMatchTypes
      description: The keyword match types.
    KeywordAdGroupSchema:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
      type: object
      required:
        - id
        - name
      title: KeywordAdGroupSchema
      description: Schema for ad group information related to a keyword
    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
    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
    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

````