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

> Get Google Ads ads for a specific customer from the database.

Args:
    customer: The verified customer (injected dependency)
    campaign: Optional verified campaign to filter by (injected dependency)
    ad_group: Optional verified ad group to filter by (injected dependency)
    limit: Maximum number of ads to retrieve (1-1000, default: 100)
    offset: Number of ads to skip for pagination (default: 0)

Returns:
    List[GoogleAdsAdSchema]: List of Google Ads ads for the customer.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json get /api/v1/google-ads-database-data/ads
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-database-data/ads:
    get:
      tags:
        - Google Ads Database
      summary: Get Ads
      description: |-
        Get Google Ads ads for a specific customer from the database.

        Args:
            customer: The verified customer (injected dependency)
            campaign: Optional verified campaign to filter by (injected dependency)
            ad_group: Optional verified ad group to filter by (injected dependency)
            limit: Maximum number of ads to retrieve (1-1000, default: 100)
            offset: Number of ads to skip for pagination (default: 0)

        Returns:
            List[GoogleAdsAdSchema]: List of Google Ads ads for the customer.
      operationId: get_ads_api_v1_google_ads_database_data_ads_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: Maximum number of items to retrieve
            default: 100
            title: Limit
          description: Maximum number of items to retrieve
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of items to skip for pagination
            default: 0
            title: Offset
          description: Number of items to skip for pagination
        - name: customer_id
          in: query
          required: true
          schema:
            type: integer
            description: The Google Ads customer ID
            title: Customer Id
          description: The Google Ads customer ID
        - name: campaign_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Filter by campaign ID
            title: Campaign Id
          description: Filter by campaign ID
        - name: ad_group_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Filter by ad group ID
            title: Ad Group Id
          description: Filter by ad group ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GoogleAdsAdSchema'
                title: Response Get Ads Api V1 Google Ads Database Data Ads Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    GoogleAdsAdSchema:
      properties:
        id:
          type: integer
          title: Id
          description: The ad ID
        date_added:
          type: string
          format: date-time
          title: Date Added
        date_updated:
          type: string
          format: date-time
          title: Date Updated
        is_active:
          type: boolean
          title: Is Active
          default: true
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        google_ads_ad_group:
          $ref: '#/components/schemas/GoogleAdsAdGroupSchema'
          description: The Google Ads ad group
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: The ad type
        final_url:
          type: string
          title: Final Url
          description: The final URL of the ad
      type: object
      required:
        - id
        - date_added
        - date_updated
        - google_ads_ad_group
        - final_url
      title: GoogleAdsAdSchema
      description: Schema for GoogleAdsAd model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GoogleAdsAdGroupSchema:
      properties:
        id:
          type: integer
          title: Id
          description: The ad group ID
        date_added:
          type: string
          format: date-time
          title: Date Added
        date_updated:
          type: string
          format: date-time
          title: Date Updated
        is_active:
          type: boolean
          title: Is Active
          default: true
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        google_ads_campaign:
          $ref: >-
            #/components/schemas/api__google_ads__database_data__schemas__GoogleAdsCampaignSchema
          description: The Google Ads campaign
        name:
          type: string
          title: Name
          description: The ad group name
        status:
          type: string
          title: Status
          description: The ad group status
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: The ad group type
      type: object
      required:
        - id
        - date_added
        - date_updated
        - google_ads_campaign
        - name
        - status
      title: GoogleAdsAdGroupSchema
      description: Schema for GoogleAdsAdGroup model.
    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
    api__google_ads__database_data__schemas__GoogleAdsCampaignSchema:
      properties:
        id:
          type: integer
          title: Id
          description: The campaign ID
        date_added:
          type: string
          format: date-time
          title: Date Added
        date_updated:
          type: string
          format: date-time
          title: Date Updated
        is_active:
          type: boolean
          title: Is Active
          default: true
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        google_ads_customer:
          $ref: >-
            #/components/schemas/api__google_ads__database_data__schemas__GoogleAdsCustomerSchema
          description: The Google Ads customer
        name:
          type: string
          title: Name
          description: The campaign name
        status:
          type: string
          title: Status
          description: The campaign status
        channel_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Type
          description: The channel type
        start_date:
          type: string
          format: date
          title: Start Date
          description: The campaign start date
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
          description: The campaign end date
      type: object
      required:
        - id
        - date_added
        - date_updated
        - google_ads_customer
        - name
        - status
        - start_date
      title: GoogleAdsCampaignSchema
      description: Schema for GoogleAdsCampaign model.
    api__google_ads__database_data__schemas__GoogleAdsCustomerSchema:
      properties:
        id:
          type: integer
          title: Id
          description: The customer ID
        date_added:
          type: string
          format: date-time
          title: Date Added
        date_updated:
          type: string
          format: date-time
          title: Date Updated
        is_active:
          type: boolean
          title: Is Active
          default: true
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        descriptive_name:
          type: string
          title: Descriptive Name
          description: The descriptive name of the customer
        currency_code:
          type: string
          title: Currency Code
          description: The currency code
        time_zone:
          type: string
          title: Time Zone
          description: The time zone
        status:
          type: string
          title: Status
          description: The status of the customer
        manager:
          type: boolean
          title: Manager
          description: Whether the customer is a manager account
      type: object
      required:
        - id
        - date_added
        - date_updated
        - descriptive_name
        - currency_code
        - time_zone
        - status
        - manager
      title: GoogleAdsCustomerSchema
      description: Schema for GoogleAdsCustomer model.
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````