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

> Return merged competitor list — SEO-discovered rows + brand-kit names.

Each entry is tagged with ``source`` so the UI can distinguish
full-data rows (starrable, editable) from name-only kit chips.
Dedup uses fuzzy name matching; see competitor_merge_service.



## OpenAPI

````yaml /openapi.json get /api/v1/brands/{brand_id}/competitors
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brands/{brand_id}/competitors:
    get:
      tags:
        - Brands
        - Brands
      summary: List Competitors
      description: |-
        Return merged competitor list — SEO-discovered rows + brand-kit names.

        Each entry is tagged with ``source`` so the UI can distinguish
        full-data rows (starrable, editable) from name-only kit chips.
        Dedup uses fuzzy name matching; see competitor_merge_service.
      operationId: list_competitors_api_v1_brands__brand_id__competitors_get
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Brand Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MergedCompetitorResponse'
                title: >-
                  Response List Competitors Api V1 Brands  Brand Id  Competitors
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    MergedCompetitorResponse:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        brand_id:
          type: string
          format: uuid
          title: Brand Id
        name:
          type: string
          title: Name
        website_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Website Url
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        content_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Url
        youtube_channel_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Youtube Channel Url
        is_starred:
          type: boolean
          title: Is Starred
          default: false
        social_links:
          additionalProperties: true
          type: object
          title: Social Links
        analysis_data:
          additionalProperties: true
          type: object
          title: Analysis Data
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        source:
          type: string
          enum:
            - seo_discovery
            - brand_kit
          title: Source
          default: seo_discovery
      type: object
      required:
        - brand_id
        - name
      title: MergedCompetitorResponse
      description: |-
        A competitor entry merged from SEO discoveries and brand-kit names.

        Brand-kit-sourced entries lack id, website_url, description, notes, and
        timestamps — they're synthesized from a string in BrandKit.competitors.
        The frontend should branch on ``source`` to decide which actions to
        expose (star/edit/delete only work on entries with an ``id``).

        ``source`` defaults to ``"seo_discovery"`` so this schema can also be
        returned directly from add/update routes that operate on the
        ``brand_competitors`` table — those endpoints always produce SEO rows.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````