{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/premiumpin-com/json-schema/premiumpin-com-query-response-schema.json",
  "title": "QueryResponse",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/premiumpin-com-openapi.json#/components/schemas/QueryResponse",
  "properties": {
    "bindable_fips": {
      "items": {
        "pattern": "^[0-9]{5}$",
        "type": "string"
      },
      "type": "array"
    },
    "count": {
      "description": "rows returned (<= limit)",
      "type": "integer"
    },
    "empty_reason": {
      "enum": [
        "field-not-held"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "field_notes": {
      "items": {
        "$ref": "#/$defs/FieldSourceNote"
      },
      "type": "array"
    },
    "honest_empty": {
      "type": "boolean"
    },
    "miss_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "next_cursor": {
      "description": "pass as cursor for the next page; null on last page",
      "type": [
        "string",
        "null"
      ]
    },
    "parcels": {
      "items": {
        "$ref": "#/$defs/Parcel"
      },
      "type": "array"
    },
    "question_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "scope_coverage": {
      "$ref": "#/$defs/ScopeCoverage"
    },
    "store_version": {
      "type": "string"
    },
    "truncated": {
      "description": "more rows exist beyond this page",
      "type": "boolean"
    },
    "unavailable_fields": {
      "description": "Named fields not held by the scoped county; present on field-not-held honest empties.",
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "scope_coverage"
  ],
  "type": "object",
  "$defs": {
    "FieldSourceNote": {
      "description": "Source context only for a delivered nonblank county-field value. Parcel-universe year does not date the field.",
      "properties": {
        "capture_receipt_sha256": {
          "type": "string"
        },
        "effective_year": {
          "description": "Null when the field's effective year is unknown.",
          "type": [
            "integer",
            "null"
          ]
        },
        "field": {
          "type": "string"
        },
        "fieldbook_sha256": {
          "type": "string"
        },
        "fips": {
          "pattern": "^[0-9]{5}$",
          "type": "string"
        },
        "parcel_universe_year": {
          "description": "Dataset membership year, not field effective year.",
          "type": "integer"
        },
        "release_manifest_sha256": {
          "type": "string"
        },
        "source_field": {
          "type": "string"
        },
        "source_url": {
          "format": "uri",
          "type": "string"
        },
        "stage_sha256": {
          "type": "string"
        },
        "warning": {
          "type": "string"
        }
      },
      "required": [
        "fips",
        "field",
        "source_field",
        "source_url",
        "warning",
        "effective_year",
        "parcel_universe_year",
        "capture_receipt_sha256",
        "fieldbook_sha256",
        "release_manifest_sha256",
        "stage_sha256"
      ],
      "type": "object"
    },
    "Parcel": {
      "description": "All canonical parcel fields. The build step supplies nullable typed properties.",
      "properties": {
        "access_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "acres": {
          "type": [
            "number",
            "null"
          ]
        },
        "ag_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "assessed_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "bedrooms": {
          "type": [
            "integer",
            "null"
          ]
        },
        "block": {
          "type": [
            "string",
            "null"
          ]
        },
        "building_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "calc_area": {
          "type": [
            "number",
            "null"
          ]
        },
        "census_tract": {
          "type": [
            "string",
            "null"
          ]
        },
        "census_tract_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "cooling": {
          "type": [
            "string",
            "null"
          ]
        },
        "county_fips": {
          "type": [
            "string",
            "null"
          ]
        },
        "county_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "county_sub_fips": {
          "type": [
            "string",
            "null"
          ]
        },
        "county_sub_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "deed_book": {
          "type": [
            "string",
            "null"
          ]
        },
        "deed_instrument": {
          "type": [
            "string",
            "null"
          ]
        },
        "deed_page": {
          "type": [
            "string",
            "null"
          ]
        },
        "elev_avg": {
          "type": [
            "number",
            "null"
          ]
        },
        "elev_max": {
          "type": [
            "number",
            "null"
          ]
        },
        "elev_min": {
          "type": [
            "number",
            "null"
          ]
        },
        "epa_dfr_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "epa_frs_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "fips": {
          "type": [
            "string",
            "null"
          ]
        },
        "fireplaces": {
          "type": [
            "integer",
            "null"
          ]
        },
        "firm_date": {
          "format": "date",
          "type": [
            "string",
            "null"
          ]
        },
        "firm_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "flood_zone": {
          "type": [
            "string",
            "null"
          ]
        },
        "foundation": {
          "type": [
            "string",
            "null"
          ]
        },
        "full_baths": {
          "type": [
            "integer",
            "null"
          ]
        },
        "half_baths": {
          "type": [
            "integer",
            "null"
          ]
        },
        "heat_fuel": {
          "type": [
            "string",
            "null"
          ]
        },
        "heating": {
          "type": [
            "string",
            "null"
          ]
        },
        "improvement_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "iucn_class": {
          "type": [
            "string",
            "null"
          ]
        },
        "land_use": {
          "type": [
            "string",
            "null"
          ]
        },
        "land_use_desc": {
          "type": [
            "string",
            "null"
          ]
        },
        "land_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "legal_desc": {
          "type": [
            "string",
            "null"
          ]
        },
        "living_area_sqft": {
          "type": [
            "number",
            "null"
          ]
        },
        "lot": {
          "type": [
            "string",
            "null"
          ]
        },
        "market_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "naics_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "num_buildings": {
          "type": [
            "integer",
            "null"
          ]
        },
        "num_floors": {
          "type": [
            "integer",
            "null"
          ]
        },
        "num_units": {
          "type": [
            "integer",
            "null"
          ]
        },
        "owner_address": {
          "type": [
            "string",
            "null"
          ]
        },
        "owner_city": {
          "type": [
            "string",
            "null"
          ]
        },
        "owner_country": {
          "type": [
            "string",
            "null"
          ]
        },
        "owner_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "owner_state": {
          "type": [
            "string",
            "null"
          ]
        },
        "owner_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "owner_zip": {
          "type": [
            "string",
            "null"
          ]
        },
        "parcel_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "parcel_id_alt": {
          "type": [
            "string",
            "null"
          ]
        },
        "parcel_id_original": {
          "type": [
            "string",
            "null"
          ]
        },
        "parcel_id_original_alt": {
          "type": [
            "string",
            "null"
          ]
        },
        "parcel_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "parent_parcel_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "permit_caa": {
          "type": [
            "string",
            "null"
          ]
        },
        "permit_cwa": {
          "type": [
            "string",
            "null"
          ]
        },
        "permit_rcra": {
          "type": [
            "string",
            "null"
          ]
        },
        "place_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "place_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "plss_desc": {
          "type": [
            "string",
            "null"
          ]
        },
        "prior_deed_book": {
          "type": [
            "string",
            "null"
          ]
        },
        "prior_deed_page": {
          "type": [
            "string",
            "null"
          ]
        },
        "quarter_section": {
          "type": [
            "string",
            "null"
          ]
        },
        "range": {
          "type": [
            "string",
            "null"
          ]
        },
        "roof_cover": {
          "type": [
            "string",
            "null"
          ]
        },
        "sale_date": {
          "format": "date",
          "type": [
            "string",
            "null"
          ]
        },
        "sale_price": {
          "type": [
            "number",
            "null"
          ]
        },
        "section": {
          "type": [
            "string",
            "null"
          ]
        },
        "siding": {
          "type": [
            "string",
            "null"
          ]
        },
        "site_address": {
          "type": [
            "string",
            "null"
          ]
        },
        "site_city": {
          "type": [
            "string",
            "null"
          ]
        },
        "site_state": {
          "type": [
            "string",
            "null"
          ]
        },
        "site_zip": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_updated": {
          "format": "date",
          "type": [
            "string",
            "null"
          ]
        },
        "source_vintage": {
          "type": [
            "string",
            "null"
          ]
        },
        "stack_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "state_fips": {
          "type": [
            "string",
            "null"
          ]
        },
        "static_bfe": {
          "type": [
            "number",
            "null"
          ]
        },
        "tax_account": {
          "type": [
            "string",
            "null"
          ]
        },
        "tax_district": {
          "type": [
            "string",
            "null"
          ]
        },
        "tax_year": {
          "type": [
            "integer",
            "null"
          ]
        },
        "township": {
          "type": [
            "string",
            "null"
          ]
        },
        "year_built": {
          "type": [
            "integer",
            "null"
          ]
        },
        "zoning_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "zoning_desc": {
          "type": [
            "string",
            "null"
          ]
        },
        "zoning_subtype": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "ScopeCoverage": {
      "additionalProperties": false,
      "description": "Shared Engine availability for the effective existing filter and type rules. All FIPS arrays are sorted and deduplicated. For resolved supported filters, bindable/unavailable/field-unavailable are disjoint and exhaust requested_fips. Available means all requested counties bindable, partial a nonempty proper subset, unavailable none. Unknown means unresolved filter, with no certified bindable/unavailable/field-unavailable classification; it is never a fallback for missing or corrupt Census authority (generation binding fails). This does not promise visited counties, nonnull fields, distinct parcel totals, or legal access. Optional nullable projections retain existing binding rules.\n",
      "properties": {
        "bindable_fips": {
          "description": "Eligible under existing required-field/type rules, not visited on this page.",
          "items": {
            "pattern": "^[0-9]{5}$",
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "field_unavailable_fips": {
          "description": "Held geography lacking required capability.",
          "items": {
            "pattern": "^[0-9]{5}$",
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "legacy_fips": {
          "description": "Loaded/requested historical codes outside pinned current authority; not successor-jurisdiction coverage.",
          "items": {
            "pattern": "^[0-9]{5}$",
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "requested_fips": {
          "items": {
            "pattern": "^[0-9]{5}$",
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "status": {
          "enum": [
            "available",
            "partial",
            "unavailable",
            "unknown"
          ],
          "type": "string"
        },
        "unavailable_fips": {
          "description": "Requested geography without a loaded table.",
          "items": {
            "pattern": "^[0-9]{5}$",
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "status",
        "requested_fips",
        "bindable_fips",
        "unavailable_fips",
        "field_unavailable_fips",
        "legacy_fips"
      ],
      "type": "object"
    }
  }
}