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

# Get Ad Library Parent Company

> Advertiser identities owned by one legal parent, with ad counts.

Answers "which advertiser records share this legal entity". It does NOT
answer "which consumer brands does this entity own" -- caption-only brands
have no advertiser row and need the deferred ``ad_library_brands`` table.
Do not promise the latter in UI copy against this route.



## OpenAPI

````yaml /openapi.json get /api/v1/brand-intelligence/parent-companies/{parent_company_id}
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brand-intelligence/parent-companies/{parent_company_id}:
    get:
      tags:
        - Brand Intelligence
        - Brand Intelligence
      summary: Get Ad Library Parent Company
      description: >-
        Advertiser identities owned by one legal parent, with ad counts.


        Answers "which advertiser records share this legal entity". It does NOT

        answer "which consumer brands does this entity own" -- caption-only
        brands

        have no advertiser row and need the deferred ``ad_library_brands``
        table.

        Do not promise the latter in UI copy against this route.
      operationId: >-
        get_ad_library_parent_company_api_v1_brand_intelligence_parent_companies__parent_company_id__get
      parameters:
        - name: parent_company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Parent Company Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            title: Offset
            default: 0
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdLibraryParentCompanyDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AdLibraryParentCompanyDetail:
      properties:
        generated_at:
          type: string
          format: date-time
          title: Generated At
        parent_company:
          $ref: '#/components/schemas/AdLibraryOrgSummary'
        total_advertisers:
          type: integer
          title: Total Advertisers
          default: 0
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        has_more:
          type: boolean
          title: Has More
          default: false
        items:
          items:
            $ref: '#/components/schemas/AdLibraryAdvertiserListItem'
          type: array
          title: Items
      type: object
      required:
        - generated_at
        - parent_company
        - limit
        - offset
      title: AdLibraryParentCompanyDetail
      description: >-
        Advertiser identities grouped under one legal parent.


        ``total_advertisers`` counts advertisers with at least one ad the caller

        may see, NOT every row carrying the FK: this reuses the Explore Brands

        aggregate, which is ad-rooted, so an owned advertiser with no
        displayable

        ad forms no group and does not appear. That is the same seam

        ``GET /ad-library/brands`` exists to cover for the library at large.


        It also does NOT answer "every consumer brand HEINEKEN owns".
        Caption-only

        brands (Strongbow, Durex) have no advertiser row to hang the FK from and

        need the deferred ``ad_library_brands`` table; see the plan's

        "Scope honesty" section before writing UI copy against this.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AdLibraryOrgSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: AdLibraryOrgSummary
      description: A parent company or paying agency, by id + display name.
    AdLibraryAdvertiserListItem:
      properties:
        advertiser:
          $ref: '#/components/schemas/AdLibraryAdvertiserSummary'
        has_captured_ads:
          type: boolean
          title: Has Captured Ads
          default: true
        total_ads:
          type: integer
          title: Total Ads
          default: 0
        review_count:
          type: integer
          title: Review Count
          default: 0
        new_ads_30d:
          type: integer
          title: New Ads 30D
          default: 0
        active_ads:
          type: integer
          title: Active Ads
          default: 0
        industry_match:
          type: boolean
          title: Industry Match
          default: false
        recommendation_score:
          type: number
          maximum: 100
          minimum: 0
          title: Recommendation Score
          default: 0
        last_active_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Active At
        platforms:
          items:
            type: string
          type: array
          title: Platforms
        providers:
          items:
            type: string
          type: array
          title: Providers
        countries:
          items:
            type: string
          type: array
          title: Countries
      type: object
      required:
        - advertiser
      title: AdLibraryAdvertiserListItem
      description: >-
        One advertiser (brand) row for the Explore Brands list.


        Server-side ``GROUP BY advertiser_id`` aggregate over the global ad

        library — accurate ad counts regardless of how many ads a single fetch

        page would carry. ``platforms`` / ``providers`` are the distinct stored

        values across the advertiser's matching ads (Facebook / Instagram /

        WhatsApp surfaces are split from Meta publisher_platforms), so the row

        badges agree with the Explore feed. ``countries`` is the distinct

        observation country set for those matching ads. Recommendation evidence
        is

        returned alongside the score so the UI can explain it: actual launches
        in

        30 days, active inventory, portfolio size, and selected-industry match.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AdLibraryAdvertiserSummary:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        parent_company:
          anyOf:
            - $ref: '#/components/schemas/AdLibraryOrgSummary'
            - type: 'null'
        primary_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Primary Domain
        website_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Website Url
        website_header_image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Website Header Image Url
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        brand_classification:
          anyOf:
            - $ref: '#/components/schemas/BrandClassification'
            - type: 'null'
        filterable_industries:
          items:
            type: string
          type: array
          title: Filterable Industries
        partners:
          items:
            $ref: '#/components/schemas/AdLibraryPartnerSummary'
          type: array
          title: Partners
      type: object
      title: AdLibraryAdvertiserSummary
    BrandClassification:
      properties:
        primary_industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Primary Industry
        industries:
          items:
            type: string
          type: array
          title: Industries
        business_models:
          items:
            type: string
          type: array
          title: Business Models
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        classified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Classified At
        needs_review:
          type: boolean
          title: Needs Review
          default: false
      type: object
      title: BrandClassification
      description: >-
        A versioned multi-label brand classification.


        Industries describe what the brand sells or does. Business models
        describe

        how it operates independently of industry. Keeping those dimensions

        separate prevents the historical ``E-Commerce`` pseudo-industry from

        replacing the brand's real product industry.
    AdLibraryPartnerSummary:
      properties:
        name:
          type: string
          title: Name
        page_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Id
        page_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Url
        profile_image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Image Url
      type: object
      required:
        - name
      title: AdLibraryPartnerSummary
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````