> ## 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 Demographic Performance

> Retrieve performance metrics segmented by demographics for a specified date range.

Args:
    customer_id: The Google Ads customer ID

    campaign_id: Optional filter by campaign ID
    demographic_type: Type of demographic data (AGE_RANGE, GENDER, PARENTAL_STATUS, HOUSEHOLD_INCOME).
    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.
    oauth2_token: OAuth2 token for authentication

Returns:
    Performance metrics by demographic segment aggregated over the period.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json get /api/v1/google-ads/demographic-performance
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/demographic-performance:
    get:
      tags:
        - Google Ads
      summary: Get Demographic Performance
      description: >-
        Retrieve performance metrics segmented by demographics for a specified
        date range.


        Args:
            customer_id: The Google Ads customer ID

            campaign_id: Optional filter by campaign ID
            demographic_type: Type of demographic data (AGE_RANGE, GENDER, PARENTAL_STATUS, HOUSEHOLD_INCOME).
            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.
            oauth2_token: OAuth2 token for authentication

        Returns:
            Performance metrics by demographic segment aggregated over the period.
      operationId: >-
        get_demographic_performance_api_v1_google_ads_demographic_performance_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: demographic_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - AGE_RANGE
              - GENDER
              - PARENTAL_STATUS
              - HOUSEHOLD_INCOME
            default: AGE_RANGE
            title: Demographic Type
        - 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: 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:
                $ref: '#/components/schemas/DemographicPerformanceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    DemographicPerformanceResponse:
      properties:
        demographic_performance:
          items:
            $ref: '#/components/schemas/DemographicPerformance'
          type: array
          title: Demographic Performance
        time_period:
          type: string
          title: Time Period
      type: object
      required:
        - demographic_performance
        - time_period
      title: DemographicPerformanceResponse
      description: Response schema for demographic performance
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DemographicPerformance:
      properties:
        demographic_type:
          type: string
          title: Demographic Type
        demographic_value:
          type: string
          title: Demographic Value
        impressions:
          type: integer
          title: Impressions
        clicks:
          type: integer
          title: Clicks
        ctr:
          type: number
          title: Ctr
        cost:
          type: number
          title: Cost
        conversions:
          type: number
          title: Conversions
        cost_per_conversion:
          type: number
          title: Cost Per Conversion
        conversion_rate:
          type: number
          title: Conversion Rate
        percentage_of_total:
          type: number
          title: Percentage Of Total
      type: object
      required:
        - demographic_type
        - demographic_value
        - impressions
        - clicks
        - ctr
        - cost
        - conversions
        - cost_per_conversion
        - conversion_rate
        - percentage_of_total
      title: DemographicPerformance
      description: Schema for demographic performance data
    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

````