{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/encarapi-com/json-schema/encarapi-com-model-search-response-schema.json",
  "title": "ModelSearchResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/encarapi-com-openapi.json#/components/schemas/ModelSearchResponse",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "Suggestions, most listings first (up to `limit`).",
      "items": {
        "$ref": "#/$defs/ModelSearchResult"
      }
    },
    "groups": {
      "type": "array",
      "description": "Model lines matching the search with exact counts, most listings first (max 8). Absent when `search` is empty.",
      "items": {
        "$ref": "#/$defs/ModelSearchGroup"
      }
    }
  },
  "$defs": {
    "ModelSearchGroup": {
      "type": "object",
      "description": "One model line matching the search, with its exact live listing count.",
      "properties": {
        "manufacturer": {
          "type": "string"
        },
        "manufacturerEn": {
          "type": "string"
        },
        "modelGroup": {
          "type": "string"
        },
        "modelGroupEn": {
          "type": "string"
        },
        "modelGroupDe": {
          "type": "string"
        },
        "count": {
          "type": "integer"
        }
      }
    },
    "ModelSearchResult": {
      "type": "object",
      "description": "One suggestion: a make / model line / badge group combination with its live listing count.",
      "properties": {
        "manufacturer": {
          "type": "string"
        },
        "manufacturerEn": {
          "type": "string"
        },
        "modelGroup": {
          "type": "string"
        },
        "modelGroupEn": {
          "type": "string"
        },
        "modelGroupDe": {
          "type": "string",
          "description": "German model line label (falls back to the English label)."
        },
        "badgeGroup": {
          "type": "string"
        },
        "badgeGroupEn": {
          "type": "string"
        },
        "badgeGroupDe": {
          "type": "string",
          "description": "German badge group label (falls back to the English label)."
        },
        "count": {
          "type": "integer"
        }
      }
    }
  }
}