{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hydrafetch-com/json-schema/hydrafetch-com-brand-response-dto-schema.json",
  "title": "BrandResponseDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hydrafetch-com-brand-api-openapi.yml#/components/schemas/BrandResponseDto",
  "type": "object",
  "properties": {
    "data": {
      "description": "Null when the domain could not be resolved at all. Unresolved domains are free.",
      "type": [
        "object",
        "null"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/WebBrandDataDto"
        }
      ]
    }
  },
  "required": [
    "data"
  ],
  "$defs": {
    "BrandAssetDto": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "wordmark",
            "symbol",
            "favicon",
            "backdrop"
          ],
          "description": "What kind of mark this is."
        },
        "variant": {
          "type": "string",
          "enum": [
            "light",
            "dark",
            "mono"
          ],
          "description": "Which background the asset is legible on. `mono` is a single-colour mark that works on both."
        },
        "url": {
          "type": "string",
          "description": "Public and immutable, so it can be embedded anywhere."
        },
        "format": {
          "type": "string"
        },
        "resolution": {
          "type": [
            "object",
            "null"
          ],
          "allOf": [
            {
              "$ref": "#/$defs/BrandResolutionDto"
            }
          ]
        },
        "colors": {
          "description": "The colours in the asset itself. A logo's own palette is the brand's, by definition.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/BrandColorDto"
          }
        },
        "blurhash": {
          "type": [
            "object",
            "null"
          ],
          "description": "Tiny placeholder hash, so a client can render something before the image lands."
        }
      },
      "required": [
        "kind",
        "variant",
        "url",
        "format",
        "resolution",
        "colors",
        "blurhash"
      ]
    },
    "BrandColorDto": {
      "type": "object",
      "properties": {
        "hex": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Nearest CSS colour name, so a swatch reads as something and not only as six digits."
        },
        "weight": {
          "type": "number",
          "description": "How much the site itself uses it — the ranking that makes this the brand's colour."
        },
        "role": {
          "type": "string",
          "enum": [
            "primary",
            "accent",
            "background",
            "text"
          ]
        }
      },
      "required": [
        "hex",
        "weight"
      ]
    },
    "BrandFieldProvenanceDto": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "declared",
            "harvested",
            "inferred",
            "external"
          ],
          "description": "`declared` the site said it in its own markup. `harvested` we processed an asset or read its CSS. `inferred` a model produced it from the page. `external` an enrichment source rather than the site."
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "source"
      ]
    },
    "BrandFontDto": {
      "type": "object",
      "properties": {
        "family": {
          "type": "string"
        },
        "weight": {
          "type": "number",
          "description": "How much of the site's type this face sets, 1 for the most-used one."
        },
        "role": {
          "type": "string",
          "description": "Absent when the page does not say which the face is.",
          "enum": [
            "heading",
            "body"
          ]
        }
      },
      "required": [
        "family",
        "weight"
      ]
    },
    "BrandLinksDto": {
      "type": "object",
      "properties": {
        "pricing": {
          "type": "string"
        },
        "blog": {
          "type": "string"
        },
        "careers": {
          "type": "string"
        },
        "contact": {
          "type": "string"
        },
        "privacy": {
          "type": "string"
        },
        "terms": {
          "type": "string"
        },
        "docs": {
          "type": "string"
        }
      }
    },
    "BrandNaicsDto": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "level": {
          "type": "string",
          "enum": [
            "sector",
            "industry_group",
            "national_industry"
          ],
          "description": "How specific the answer is. `industry_group` is the 4-digit level, `national_industry` the 6-digit one."
        },
        "sector": {
          "$ref": "#/$defs/BrandNaicsSectorDto"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "How much evidence the classification found, not a model's self-report."
        }
      },
      "required": [
        "code",
        "title",
        "level",
        "sector",
        "confidence"
      ]
    },
    "BrandNaicsSectorDto": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "title"
      ]
    },
    "BrandResolutionDto": {
      "type": "object",
      "properties": {
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "aspectRatio": {
          "type": "number",
          "description": "Width over height — what a caller reserves layout space with."
        }
      },
      "required": [
        "width",
        "height",
        "aspectRatio"
      ]
    },
    "BrandSocialDto": {
      "type": "object",
      "properties": {
        "platform": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "handle": {
          "type": "string",
          "description": "The account name, without the `@`."
        }
      },
      "required": [
        "platform",
        "url"
      ]
    },
    "WebBrandDataDto": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "description": "The canonical domain for this company."
        },
        "queriedDomain": {
          "type": "string",
          "description": "Only when you asked for a different domain that resolved here."
        },
        "aliases": {
          "description": "Only when this brand is known by more than its canonical domain.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": [
            "object",
            "null"
          ]
        },
        "description": {
          "type": [
            "object",
            "null"
          ]
        },
        "tagline": {
          "type": [
            "object",
            "null"
          ]
        },
        "naics": {
          "description": "Industry, as a real NAICS code rather than a phrase nobody can group on.",
          "allOf": [
            {
              "$ref": "#/$defs/BrandNaicsDto"
            }
          ]
        },
        "assets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BrandAssetDto"
          }
        },
        "colors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BrandColorDto"
          }
        },
        "fonts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BrandFontDto"
          }
        },
        "socials": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BrandSocialDto"
          }
        },
        "links": {
          "$ref": "#/$defs/BrandLinksDto"
        },
        "email": {
          "type": "string"
        },
        "legalName": {
          "type": "string"
        },
        "sources": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/BrandFieldProvenanceDto"
          },
          "description": "Per-field provenance, keyed by field name. Lets you tell \"their markup says this\" from \"a model guessed this\"."
        },
        "resolvedAt": {
          "type": [
            "object",
            "null"
          ]
        }
      },
      "required": [
        "domain",
        "name",
        "description",
        "tagline",
        "assets",
        "colors",
        "fonts",
        "socials",
        "links",
        "sources",
        "resolvedAt"
      ]
    }
  }
}