{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/jid-com/json-schema/jid-com-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/jid-com-openapi.json#/components/schemas/SearchResponse",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "status_summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "matched_on": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "verify_url": {
            "type": "string"
          }
        }
      }
    },
    "website_declared": {
      "type": "array",
      "description": "Businesses with no Jid file whose own website names them (tier website_declared). Not files and not confirmed by an official register.",
      "items": {
        "$ref": "#/$defs/WebsiteDeclared"
      }
    }
  },
  "$defs": {
    "WebsiteDeclared": {
      "type": "object",
      "description": "What a company's own website states about itself (provenance tier website_declared): identity context only, never a registry result. Present only when no Jid file holds or is associated with the domain.",
      "properties": {
        "tier": {
          "type": "string",
          "enum": [
            "website_declared"
          ]
        },
        "domain": {
          "type": "string"
        },
        "legal_name": {
          "type": "string",
          "description": "As printed, with its legal form"
        },
        "trade_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "address": {
          "type": [
            "string",
            "null"
          ],
          "description": "As printed; null when the site prints addresses in several states"
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "postal_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": "string"
        },
        "read_at": {
          "type": "string",
          "format": "date-time"
        },
        "how": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  }
}