> ## 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 Global Brand Library Brands

> Brand Library brands visible to the caller, whether or not they have ads.

The advertiser-rooted counterpart to ``/advertisers``. That route groups
ads by advertiser, so a brand whose ads are absent or all non-displayable
forms no group and cannot surface at any page -- 705 of the 832 brands
missing from it in production are missing for that reason alone, not
because tenancy withholds them. ``total`` here is therefore expected to
exceed the ``/advertisers`` total; the two are answering different
questions, and ``has_ads`` splits this one along exactly that seam.

Returns a narrow row shape on purpose. The admin census
(``/admin/brand-library/brands``) answers a superficially similar question
but its rows carry tenant emails, other tenants' brand names, and
ownership annotations -- none of which may reach an ordinary caller.



## OpenAPI

````yaml /openapi.json get /api/v1/ad-library/brands
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/ad-library/brands:
    get:
      tags:
        - Ad Library
        - Ad Library
      summary: List Global Brand Library Brands
      description: >-
        Brand Library brands visible to the caller, whether or not they have
        ads.


        The advertiser-rooted counterpart to ``/advertisers``. That route groups

        ads by advertiser, so a brand whose ads are absent or all
        non-displayable

        forms no group and cannot surface at any page -- 705 of the 832 brands

        missing from it in production are missing for that reason alone, not

        because tenancy withholds them. ``total`` here is therefore expected to

        exceed the ``/advertisers`` total; the two are answering different

        questions, and ``has_ads`` splits this one along exactly that seam.


        Returns a narrow row shape on purpose. The admin census

        (``/admin/brand-library/brands``) answers a superficially similar
        question

        but its rows carry tenant emails, other tenants' brand names, and

        ownership annotations -- none of which may reach an ordinary caller.
      operationId: list_global_brand_library_brands_api_v1_ad_library_brands_get
      parameters:
        - name: has_ads
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Has Ads
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            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/BrandLibraryBrandListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BrandLibraryBrandListResponse:
      properties:
        generated_at:
          type: string
          format: date-time
          title: Generated At
        total:
          type: integer
          title: Total
          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/BrandLibraryBrandListItem'
          type: array
          title: Items
          default: []
      type: object
      required:
        - generated_at
        - limit
        - offset
      title: BrandLibraryBrandListResponse
      description: |-
        Paginated Brand Library listing that does not require ads.

        ``total`` is every brand visible to this caller, whether or not it has
        collected ads -- so it is larger than the Explore Brands total by the
        ad-less population, and the two are expected to disagree.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BrandLibraryBrandListItem:
      properties:
        advertiser_id:
          type: string
          format: uuid
          title: Advertiser Id
        name:
          type: string
          title: Name
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
        classification:
          anyOf:
            - $ref: '#/components/schemas/BrandClassification'
            - type: 'null'
        total_ads:
          type: integer
          title: Total Ads
          default: 0
      type: object
      required:
        - advertiser_id
        - name
      title: BrandLibraryBrandListItem
      description: |-
        One Brand Library brand the caller is entitled to see.

        ``total_ads`` counts only ads that clear
        ``ad_identity_scope.displayable_ad_filter()`` -- the same definition
        Explore Brands groups by. ``0`` therefore means exactly "this brand is
        absent from Explore Brands", which is the population this listing exists
        to surface, rather than the weaker "no ad rows exist".
    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
    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.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````