> ## 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 Competitor Seo Metrics By Domain

> Bulk per-domain SEO metrics for Explore Brands' metric columns (S6).

Scoped to ``brand_id``'s own ``competitor_seo_metrics`` rows — a candidate
that happens to already be one of this brand's tracked competitors gets
real numbers (the join is free, already-acquired data); a genuinely
untracked candidate is simply absent from the response. This route never
enqueues acquisition and never spends a DataForSEO call — that population
question is explicitly deferred (design doc, S6).



## OpenAPI

````yaml /openapi.json get /api/v1/brands/{brand_id}/dashboards/competitor-seo/by-domain
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brands/{brand_id}/dashboards/competitor-seo/by-domain:
    get:
      tags:
        - Dashboards
        - Dashboards
      summary: Get Competitor Seo Metrics By Domain
      description: >-
        Bulk per-domain SEO metrics for Explore Brands' metric columns (S6).


        Scoped to ``brand_id``'s own ``competitor_seo_metrics`` rows — a
        candidate

        that happens to already be one of this brand's tracked competitors gets

        real numbers (the join is free, already-acquired data); a genuinely

        untracked candidate is simply absent from the response. This route never

        enqueues acquisition and never spends a DataForSEO call — that
        population

        question is explicitly deferred (design doc, S6).
      operationId: >-
        get_competitor_seo_metrics_by_domain_api_v1_brands__brand_id__dashboards_competitor_seo_by_domain_get
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Brand Id
        - name: domains
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: Comma-separated competitor domains (max 100).
            title: Domains
          description: Comma-separated competitor domains (max 100).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompetitorSeoDomainMetricsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CompetitorSeoDomainMetricsResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CompetitorSeoMetricRow'
          type: array
          title: Items
      type: object
      title: CompetitorSeoDomainMetricsResponse
      description: >-
        Explore Brands' SEO metric columns (S6) — one ``CompetitorSeoMetricRow``

        per requested domain that has a measured row for this brand's tracked

        competitor cohort.


        A requested domain missing from ``items`` has no ``CompetitorSeoMetric``

        row for this brand: it isn't tracked, or acquisition hasn't run for it

        yet. This endpoint never triggers acquisition and never backfills a row
        —

        the caller renders the absence as an honest "not measured" state, never
        a

        fabricated zero. Delta/previous-capture fields are left at their
        defaults

        here; this response only carries the four column values Explore Brands

        displays.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CompetitorSeoMetricRow:
      properties:
        competitor_domain:
          type: string
          title: Competitor Domain
        is_brand:
          type: boolean
          title: Is Brand
          default: false
        organic_keyword_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Organic Keyword Count
        keyword_sample_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Keyword Sample Size
        est_organic_traffic:
          anyOf:
            - type: number
            - type: 'null'
          title: Est Organic Traffic
        est_traffic_value_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Est Traffic Value Usd
        domain_rank:
          anyOf:
            - type: number
            - type: 'null'
          title: Domain Rank
        referring_domains:
          anyOf:
            - type: integer
            - type: 'null'
          title: Referring Domains
        backlinks:
          anyOf:
            - type: integer
            - type: 'null'
          title: Backlinks
        keyword_gap_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Keyword Gap Count
        keyword_gap_sample_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Keyword Gap Sample Size
        captured_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Captured At
        previous_captured_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Previous Captured At
        previous_est_organic_traffic:
          anyOf:
            - type: number
            - type: 'null'
          title: Previous Est Organic Traffic
        previous_organic_keyword_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Previous Organic Keyword Count
        previous_keyword_gap_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Previous Keyword Gap Count
        previous_counts_withheld:
          type: boolean
          title: Previous Counts Withheld
          default: false
        previous_organic_keyword_count_withheld:
          type: boolean
          title: Previous Organic Keyword Count Withheld
          default: false
        previous_keyword_gap_count_withheld:
          type: boolean
          title: Previous Keyword Gap Count Withheld
          default: false
      type: object
      required:
        - competitor_domain
      title: CompetitorSeoMetricRow
      description: >-
        One competitor's organic row.


        **Every numeric here is nullable and null means NOT MEASURED**, never
        zero.

        A DataForSEO read that failed persists NULL so the UI renders its

        NOT_MEASURED em-dash instead of an authoritative-looking 0.


        ``organic_keyword_count`` / ``keyword_gap_count`` are DOMAIN-WIDE

        populations. ``keyword_sample_size`` / ``keyword_gap_sample_size`` are
        how

        many rows the Keywords and Gap panels actually hold — so the UI can
        label

        them "top N of M" rather than presenting a capped API page as the count.
    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

````