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

# List Brands

> Full Brand Library census, paginated.

Admin bypasses the Task 8 tenancy predicate
(``advertiser_identity.visible_to_caller_predicate``) by definition —
this is the surface that answers "why is this row here?" for every
advertiser, including ``tenant_private`` rows no ordinary caller can
browse. Read-only: never mints, enqueues, or triggers acquisition.



## OpenAPI

````yaml /openapi.json get /api/v1/admin/brand-library/brands
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/brand-library/brands:
    get:
      tags:
        - Admin Brand Library
        - Admin
      summary: List Brands
      description: |-
        Full Brand Library census, paginated.

        Admin bypasses the Task 8 tenancy predicate
        (``advertiser_identity.visible_to_caller_predicate``) by definition —
        this is the surface that answers "why is this row here?" for every
        advertiser, including ``tenant_private`` rows no ordinary caller can
        browse. Read-only: never mints, enqueues, or triggers acquisition.
      operationId: list_brands_api_v1_admin_brand_library_brands_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 200
            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/BrandLibraryCensusPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BrandLibraryCensusPage:
      properties:
        brands:
          items:
            $ref: '#/components/schemas/BrandLibraryCensusRow'
          type: array
          title: Brands
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - brands
        - total
        - limit
        - offset
        - has_more
      title: BrandLibraryCensusPage
      description: >-
        One page of the census, with enough metadata to page further.


        ``has_more`` is computed from ``offset + len(brands) < total`` where

        both sides come from the SAME unfiltered SQL query family (no
        Python-side

        row dropping happens between the count and the page) — see the service

        docstring for why that structurally avoids the has_more/offset drift bug

        class this repo has hit before.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BrandLibraryCensusRow:
      properties:
        advertiser_id:
          type: string
          format: uuid
          title: Advertiser Id
        brand_name:
          type: string
          title: Brand Name
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
        homepage_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Homepage Url
        parent_company:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Company
        library_visibility:
          type: string
          title: Library Visibility
        is_uob:
          type: boolean
          title: Is Uob
        is_dob:
          type: boolean
          title: Is Dob
        is_gtb:
          type: boolean
          title: Is Gtb
        is_utb:
          type: boolean
          title: Is Utb
        is_zob:
          type: boolean
          title: Is Zob
        uob_owners:
          items:
            $ref: '#/components/schemas/UobOwner'
          type: array
          title: Uob Owners
          default: []
        dob_origins:
          items:
            $ref: '#/components/schemas/DobOrigin'
          type: array
          title: Dob Origins
          default: []
        utb_trackers:
          items:
            $ref: '#/components/schemas/UtbTracker'
          type: array
          title: Utb Trackers
          default: []
      type: object
      required:
        - advertiser_id
        - brand_name
        - library_visibility
        - is_uob
        - is_dob
        - is_gtb
        - is_utb
        - is_zob
      title: BrandLibraryCensusRow
      description: |-
        One ``ad_library_advertisers`` row, annotated with its origin.

        ``is_zob`` is derived (``not is_uob and not is_dob``), never stored —
        see the model comment on ``AdLibraryAdvertiser.library_visibility`` for
        why origin classification and visibility are deliberately independent.
    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
    UobOwner:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
        user_email:
          type: string
          title: User Email
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
      type: object
      required:
        - user_id
        - user_email
      title: UobOwner
      description: A tenant whose ``brands`` row links directly to this advertiser.
    DobOrigin:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
        user_email:
          type: string
          title: User Email
        origin_brand_id:
          type: string
          format: uuid
          title: Origin Brand Id
        origin_brand_name:
          type: string
          title: Origin Brand Name
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
      type: object
      required:
        - user_id
        - user_email
        - origin_brand_id
        - origin_brand_name
      title: DobOrigin
      description: A tenant who discovered this advertiser as a competitor.
    UtbTracker:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
        user_email:
          type: string
          title: User Email
        via_brand_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Via Brand Name
      type: object
      required:
        - user_id
        - user_email
      title: UtbTracker
      description: |-
        A tenant tracking this advertiser in their Ad Library watchlist.

        ``via_brand_name`` is ``None`` when the advertiser is tracked without
        being assigned as a competitor of any of the tenant's brands — the
        operator explicitly allowed this shape (fix round 2 ruling).
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````