{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/statelicense-io/json-schema/statelicense-io-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/statelicense-io-api-openapi.json#/components/schemas/SearchResponse",
  "properties": {
    "total": {
      "type": "integer",
      "title": "Total"
    },
    "page": {
      "type": "integer",
      "title": "Page"
    },
    "page_size": {
      "type": "integer",
      "title": "Page Size"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/LicenseDetail"
      },
      "type": "array",
      "title": "Results"
    }
  },
  "type": "object",
  "required": [
    "total",
    "page",
    "page_size",
    "results"
  ],
  "$defs": {
    "LicenseDetail": {
      "properties": {
        "state": {
          "type": "string",
          "title": "State"
        },
        "license_number": {
          "type": "string",
          "title": "License Number"
        },
        "business_name": {
          "type": "string",
          "title": "Business Name"
        },
        "doing_business_as": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Doing Business As"
        },
        "licensee_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Licensee Name"
        },
        "license_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "License Type"
        },
        "license_type_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "License Type Code"
        },
        "credential_kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Credential Kind"
        },
        "authority": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authority"
        },
        "jurisdiction_scope": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Jurisdiction Scope"
        },
        "source_updated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Updated At",
          "description": "UTC date StateLicense downloaded the dataset snapshot used for this record. Not the authority's publication date or a live verification time; null when the historical download date is unverified."
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source"
        },
        "dataset": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Dataset"
        },
        "source_record_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Record Id"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "scope_description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Scope Description"
        },
        "project_limit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Project Limit"
        },
        "classifications": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Classifications",
          "default": []
        },
        "issue_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Issue Date"
        },
        "expiration_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expiration Date"
        },
        "suspension_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Suspension Date"
        },
        "last_updated": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Updated"
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Address"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City"
        },
        "mailing_state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mailing State"
        },
        "zip_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Zip Code"
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone"
        },
        "has_workers_comp": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Has Workers Comp"
        },
        "workers_comp_coverage_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Workers Comp Coverage Type"
        },
        "bond_amount": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bond Amount"
        },
        "bond_effective_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bond Effective Date"
        },
        "bond_cancelled_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bond Cancelled Date"
        },
        "has_disclosure": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Has Disclosure"
        },
        "raw_status_codes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Raw Status Codes",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "state",
        "license_number",
        "business_name",
        "status"
      ],
      "title": "LicenseDetail"
    }
  }
}