> ## 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 Brand Intelligence Dashboard Route

> Return dashboard rollups over a brand's watched ad-library entities.



## OpenAPI

````yaml /openapi.json get /api/v1/brands/{brand_id}/brand-intelligence/dashboard
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brands/{brand_id}/brand-intelligence/dashboard:
    get:
      tags:
        - Brand Intelligence
        - Brand Intelligence
      summary: Get Brand Intelligence Dashboard Route
      description: Return dashboard rollups over a brand's watched ad-library entities.
      operationId: >-
        get_brand_intelligence_dashboard_route_api_v1_brands__brand_id__brand_intelligence_dashboard_get
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Brand Id
        - name: platform
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 200
                minLength: 1
              - type: 'null'
            title: Platform
        - name: per_advertiser_limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 100
                minimum: 1
              - type: 'null'
            title: Per Advertiser Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandIntelligenceDashboardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BrandIntelligenceDashboardResponse:
      properties:
        brand_id:
          type: string
          format: uuid
          title: Brand Id
        generated_at:
          type: string
          format: date-time
          title: Generated At
        metrics:
          $ref: '#/components/schemas/BrandIntelligenceOverviewMetrics'
        advertisers:
          items:
            $ref: '#/components/schemas/BrandIntelligenceDashboardAdvertiserRollup'
          type: array
          title: Advertisers
        providers:
          items:
            $ref: '#/components/schemas/BrandIntelligenceDashboardProviderRollup'
          type: array
          title: Providers
        recent_ads:
          items:
            $ref: '#/components/schemas/AdLibrarySearchAd'
          type: array
          title: Recent Ads
        provenance:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          type: object
          title: Provenance
        admin_diagnostics:
          anyOf:
            - items:
                $ref: '#/components/schemas/BrandIntelligenceAdminDiagnostics'
              type: array
            - type: 'null'
          title: Admin Diagnostics
      type: object
      required:
        - brand_id
        - generated_at
        - metrics
      title: BrandIntelligenceDashboardResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BrandIntelligenceOverviewMetrics:
      properties:
        watchlists:
          type: integer
          title: Watchlists
          default: 0
        watchlist_items:
          type: integer
          title: Watchlist Items
          default: 0
        watched_advertisers:
          type: integer
          title: Watched Advertisers
          default: 0
        watched_source_accounts:
          type: integer
          title: Watched Source Accounts
          default: 0
        total_ads:
          type: integer
          title: Total Ads
          default: 0
        active_ads:
          type: integer
          title: Active Ads
          default: 0
        new_ads_30d:
          type: integer
          title: New Ads 30D
          default: 0
        creatives:
          type: integer
          title: Creatives
          default: 0
        assets:
          type: integer
          title: Assets
          default: 0
        last_observed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Observed At
        last_ingested_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Ingested At
      type: object
      title: BrandIntelligenceOverviewMetrics
    BrandIntelligenceDashboardAdvertiserRollup:
      properties:
        advertiser:
          $ref: '#/components/schemas/AdLibraryAdvertiserSummary'
        source_accounts:
          items:
            $ref: '#/components/schemas/AdLibrarySourceAccountSummary'
          type: array
          title: Source Accounts
        total_ads:
          type: integer
          title: Total Ads
          default: 0
        active_ads:
          type: integer
          title: Active Ads
          default: 0
        new_ads_30d:
          type: integer
          title: New Ads 30D
          default: 0
        creatives:
          type: integer
          title: Creatives
          default: 0
        assets:
          type: integer
          title: Assets
          default: 0
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
        last_observed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Observed At
        providers:
          items:
            type: string
          type: array
          title: Providers
        platforms:
          items:
            type: string
          type: array
          title: Platforms
        recent_ads:
          items:
            $ref: '#/components/schemas/AdLibrarySearchAd'
          type: array
          title: Recent Ads
      type: object
      required:
        - advertiser
      title: BrandIntelligenceDashboardAdvertiserRollup
    BrandIntelligenceDashboardProviderRollup:
      properties:
        provider:
          type: string
          title: Provider
        platform:
          type: string
          title: Platform
        total_ads:
          type: integer
          title: Total Ads
          default: 0
        active_ads:
          type: integer
          title: Active Ads
          default: 0
        new_ads_30d:
          type: integer
          title: New Ads 30D
          default: 0
        advertisers:
          type: integer
          title: Advertisers
          default: 0
        source_accounts:
          type: integer
          title: Source Accounts
          default: 0
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
      type: object
      required:
        - provider
        - platform
      title: BrandIntelligenceDashboardProviderRollup
    AdLibrarySearchAd:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        provider:
          type: string
          title: Provider
        platform:
          type: string
          title: Platform
        publisher_platforms:
          items:
            type: string
          type: array
          title: Publisher Platforms
        source_ad_key:
          type: string
          title: Source Ad Key
        source_ad_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Ad Id
        source_ad_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Ad Url
        display_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Url
        click_through_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Click Through Url
        landing_page_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Landing Page Url
        posting_page_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Posting Page Name
        advertiser_logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Advertiser Logo Url
        ad_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Ad Format
        partners:
          items:
            $ref: '#/components/schemas/AdLibraryPartnerSummary'
          type: array
          title: Partners
        status:
          type: string
          title: Status
        started_running_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started Running At
        launched_month:
          anyOf:
            - type: string
            - type: 'null'
          title: Launched Month
        is_top_ad:
          type: boolean
          title: Is Top Ad
          default: false
        top_ad_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Top Ad Rank
        low_impression_count:
          type: boolean
          title: Low Impression Count
          default: false
        ad_has_multiple_versions:
          type: boolean
          title: Ad Has Multiple Versions
          default: false
        is_still_in_ad_library:
          type: boolean
          title: Is Still In Ad Library
          default: true
        last_seen_in_ad_library_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen In Ad Library At
        last_confirmed_active_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Confirmed Active At
        active_finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Active Finished At
        active_duration_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active Duration Days
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        first_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: First Seen At
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
        advertiser:
          anyOf:
            - $ref: '#/components/schemas/AdLibraryAdvertiserSummary'
            - type: 'null'
        source_account:
          anyOf:
            - $ref: '#/components/schemas/AdLibrarySourceAccountSummary'
            - type: 'null'
        creative:
          anyOf:
            - $ref: '#/components/schemas/AdLibraryCreativeSummary'
            - type: 'null'
        creative_count:
          type: integer
          title: Creative Count
          default: 0
        variant_count:
          type: integer
          title: Variant Count
          default: 1
        provenance:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          type: object
          title: Provenance
      type: object
      required:
        - id
        - provider
        - platform
        - source_ad_key
        - status
      title: AdLibrarySearchAd
    BrandIntelligenceAdminDiagnostics:
      properties:
        advertiser_id:
          type: string
          format: uuid
          title: Advertiser Id
        competitor_domain:
          type: string
          title: Competitor Domain
        data_source:
          type: string
          title: Data Source
          default: legacy_competitor_meta_ads
        fetch_diagnostics:
          $ref: '#/components/schemas/CompetitorMetaAdsFetchDiagnostics'
      type: object
      required:
        - advertiser_id
        - competitor_domain
      title: BrandIntelligenceAdminDiagnostics
      description: >-
        Per-advertiser Meta fetch diagnostics — provider attempted/used,
        queries,

        raw/kept/filtered counts.


        ADMIN-ONLY: this is provenance/debug detail that must never render for

        regular users. The route populates it only when the requesting user's
        email

        is in ``settings.admin_emails``; the field is omitted (``None``)
        otherwise so

        a normal user's payload never carries it.
    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'
        partners:
          items:
            $ref: '#/components/schemas/AdLibraryPartnerSummary'
          type: array
          title: Partners
      type: object
      title: AdLibraryAdvertiserSummary
    AdLibrarySourceAccountSummary:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        handle:
          anyOf:
            - type: string
            - type: 'null'
          title: Handle
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        followers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Followers
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
        tagline:
          anyOf:
            - type: string
            - type: 'null'
          title: Tagline
        raw_data:
          additionalProperties: true
          type: object
          title: Raw Data
      type: object
      title: AdLibrarySourceAccountSummary
    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
    AdLibraryCreativeSummary:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        headline:
          anyOf:
            - type: string
            - type: 'null'
          title: Headline
        body_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Text
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        cta:
          anyOf:
            - type: string
            - type: 'null'
          title: Cta
        creative_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Creative Type
        first_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: First Seen At
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
        assets:
          items:
            $ref: '#/components/schemas/AdLibraryAssetSummary'
          type: array
          title: Assets
        media_variants:
          items:
            $ref: '#/components/schemas/AdLibraryMediaVariantSummary'
          type: array
          title: Media Variants
        raw_data:
          additionalProperties: true
          type: object
          title: Raw Data
      type: object
      title: AdLibraryCreativeSummary
    CompetitorMetaAdsFetchDiagnostics:
      properties:
        provider_attempted:
          items:
            type: string
          type: array
          title: Provider Attempted
        provider_used:
          type: string
          title: Provider Used
          default: none
        facebook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Url
        facebook_page_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Page Name
        advertiser_query:
          anyOf:
            - type: string
            - type: 'null'
          title: Advertiser Query
        search_queries:
          items:
            type: string
          type: array
          title: Search Queries
        archive_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Archive Country
        metapi_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Metapi Country
        raw_returned_count:
          type: integer
          title: Raw Returned Count
          default: 0
        filtered_out_count:
          type: integer
          title: Filtered Out Count
          default: 0
        kept_count:
          type: integer
          title: Kept Count
          default: 0
        fallback_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Fallback Reason
        error_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Reason
      type: object
      title: CompetitorMetaAdsFetchDiagnostics
    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.
    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.
    AdLibraryAssetSummary:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        kind:
          type: string
          title: Kind
        url:
          type: string
          title: Url
        url_source:
          type: string
          title: Url Source
          default: source
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        raw_data:
          additionalProperties: true
          type: object
          title: Raw Data
      type: object
      required:
        - kind
        - url
      title: AdLibraryAssetSummary
    AdLibraryMediaVariantSummary:
      properties:
        media_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Media Url
        headline:
          anyOf:
            - type: string
            - type: 'null'
          title: Headline
        body_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Text
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        cta:
          anyOf:
            - type: string
            - type: 'null'
          title: Cta
        link_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Link Url
        display_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Url
      type: object
      title: AdLibraryMediaVariantSummary
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````