{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/placestack-com/json-schema/placestack-com-jurisdiction-schema.json",
  "title": "Jurisdiction",
  "description": "A state, county, city or town.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/placestack-com-jurisdiction-api-openapi.yml#/components/schemas/Jurisdiction",
  "properties": {
    "object": {
      "type": "string",
      "const": "jurisdiction",
      "title": "Object",
      "description": "The object's type. Always `jurisdiction`.",
      "default": "jurisdiction"
    },
    "id": {
      "type": "string",
      "pattern": "^jur_[0-7][0-9a-hjkmnp-tv-z]{25}$",
      "title": "Id",
      "description": "A jurisdiction id."
    },
    "name": {
      "type": "string",
      "title": "Name",
      "description": "The jurisdiction's common name."
    },
    "legal_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Legal Name",
      "description": "Legal name. Null when the same as `name`."
    },
    "type": {
      "type": "string",
      "title": "Type",
      "description": "Kind of jurisdiction, in local terms, such as `county`, `parish`, `city` or `town`."
    },
    "tier": {
      "type": "string",
      "enum": [
        "national",
        "region",
        "subregion",
        "local"
      ],
      "title": "Tier",
      "description": "Level of government. One of `national`, `region` (a state or province), `subregion` (a county or district) or `local` (a city, town, village or township)."
    },
    "country": {
      "type": "string",
      "title": "Country",
      "description": "ISO 3166-1 alpha-2 country code."
    },
    "lifecycle_status": {
      "type": "string",
      "title": "Lifecycle Status",
      "description": "Lifecycle status. One of `active`, `dissolved`, `merged` or `renamed`."
    },
    "fips": {
      "anyOf": [
        {
          "$ref": "#/$defs/Fips"
        },
        {
          "type": "null"
        }
      ],
      "description": "Census GEOID and its parts. Null outside the US."
    },
    "identifiers": {
      "items": {
        "$ref": "#/$defs/jurisdiction__Identifier"
      },
      "type": "array",
      "title": "Identifiers",
      "description": "Every identifier, ordered by scheme."
    },
    "within": {
      "items": {
        "$ref": "#/$defs/jurisdiction__Within"
      },
      "type": "array",
      "title": "Within",
      "description": "The jurisdictions that contain this one, largest first."
    },
    "land_area_m2": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Land Area M2",
      "description": "Land area, in square meters. Null when not published."
    },
    "water_area_m2": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Water Area M2",
      "description": "Water area, in square meters. Null when not published."
    },
    "centroid": {
      "anyOf": [
        {
          "$ref": "#/$defs/Centroid"
        },
        {
          "type": "null"
        }
      ],
      "description": "A point inside the boundary. Null when not published."
    },
    "coverage": {
      "$ref": "#/$defs/Coverage",
      "description": "Data available for the jurisdiction, by kind of record."
    },
    "statistics": {
      "$ref": "#/$defs/Statistics",
      "description": "Figures computed from the records held for the jurisdiction."
    },
    "geometry": {
      "anyOf": [
        {
          "$ref": "#/$defs/Geometry"
        },
        {
          "type": "null"
        }
      ],
      "description": "Boundary, as GeoJSON. Included only with `include=geometry`; null otherwise."
    },
    "href": {
      "type": "string",
      "title": "Href",
      "description": "The object's path in the API."
    }
  },
  "type": "object",
  "required": [
    "object",
    "id",
    "name",
    "legal_name",
    "type",
    "tier",
    "country",
    "lifecycle_status",
    "fips",
    "identifiers",
    "within",
    "land_area_m2",
    "water_area_m2",
    "centroid",
    "coverage",
    "statistics",
    "geometry",
    "href"
  ],
  "$defs": {
    "Centroid": {
      "properties": {
        "lat": {
          "type": "number",
          "title": "Lat",
          "description": "Latitude, in WGS 84."
        },
        "lon": {
          "type": "number",
          "title": "Lon",
          "description": "Longitude, in WGS 84."
        }
      },
      "type": "object",
      "required": [
        "lat",
        "lon"
      ],
      "title": "Centroid",
      "description": "A point inside the boundary."
    },
    "Coverage": {
      "properties": {
        "parcel": {
          "anyOf": [
            {
              "$ref": "#/$defs/Held"
            },
            {
              "type": "null"
            }
          ],
          "description": "Parcels. Null when there are none."
        },
        "zoning": {
          "anyOf": [
            {
              "$ref": "#/$defs/Held"
            },
            {
              "type": "null"
            }
          ],
          "description": "Zoning classifications. Null when there are none."
        },
        "permit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Held"
            },
            {
              "type": "null"
            }
          ],
          "description": "Building and trade permits. Null when there are none."
        },
        "case": {
          "anyOf": [
            {
              "$ref": "#/$defs/Held"
            },
            {
              "type": "null"
            }
          ],
          "description": "Zoning and development cases. Null when there are none."
        }
      },
      "type": "object",
      "title": "Coverage",
      "description": "Data available for a jurisdiction, by kind of record."
    },
    "Fips": {
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "state",
            "county",
            "county_subdivision",
            "place"
          ],
          "title": "Level",
          "description": "Census level. One of `state`, `county`, `county_subdivision` or `place`."
        },
        "code": {
          "type": "string",
          "title": "Code",
          "description": "Full GEOID, such as `37`, `37183` or `3755000`."
        },
        "state": {
          "type": "string",
          "title": "State",
          "description": "Two-digit state FIPS code."
        },
        "county": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "County",
          "description": "Five-digit county FIPS code. Null for a state or a place."
        }
      },
      "type": "object",
      "required": [
        "level",
        "code",
        "state"
      ],
      "title": "Fips",
      "description": "A Census GEOID and its parts."
    },
    "Geometry": {
      "properties": {
        "type": {
          "type": "string",
          "title": "Type",
          "description": "Geometry type. One of `Polygon` or `MultiPolygon`."
        },
        "coordinates": {
          "items": {},
          "type": "array",
          "title": "Coordinates",
          "description": "Coordinates, as `[longitude, latitude]` positions nested by geometry type."
        }
      },
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "title": "Geometry",
      "description": "A GeoJSON geometry in WGS 84, longitude first."
    },
    "Held": {
      "properties": {
        "records": {
          "type": "integer",
          "title": "Records",
          "description": "Number of records for the jurisdiction and every jurisdiction within it."
        },
        "as_of": {
          "type": "string",
          "format": "date",
          "title": "As Of",
          "description": "The most recent `as_of` among those records."
        }
      },
      "type": "object",
      "required": [
        "records",
        "as_of"
      ],
      "title": "Held",
      "description": "Record count and freshness for one kind of record."
    },
    "LandUseCount": {
      "properties": {
        "category": {
          "type": "string",
          "title": "Category",
          "description": "Standard land use category, such as `residential`, `commercial` or `vacant`."
        },
        "parcels": {
          "type": "integer",
          "title": "Parcels",
          "description": "Number of parcels in the category."
        }
      },
      "type": "object",
      "required": [
        "category",
        "parcels"
      ],
      "title": "LandUseCount",
      "description": "Parcels in one standard land use category."
    },
    "ParcelStatistics": {
      "properties": {
        "parcels": {
          "type": "integer",
          "title": "Parcels",
          "description": "Number of parcels the figures are computed from."
        },
        "median_market_value": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Median Market Value",
          "description": "Median total market value, in US dollars. Null when no parcel has one."
        },
        "median_acres": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Median Acres",
          "description": "Median parcel size, in acres. Null when no parcel has a boundary."
        },
        "median_year_built": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Median Year Built",
          "description": "Median year the main building was built. Null when no parcel has one."
        },
        "sales_last_year": {
          "type": "integer",
          "title": "Sales Last Year",
          "description": "Number of parcels whose most recent sale was in the 365 days before `computed`."
        },
        "median_sale_price": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Median Sale Price",
          "description": "Median price of those sales, in US dollars. Null when none has a price."
        },
        "land_use": {
          "items": {
            "$ref": "#/$defs/LandUseCount"
          },
          "type": "array",
          "title": "Land Use",
          "description": "Parcels by standard land use category, most first. Parcels with no standard land use are not counted."
        },
        "computed": {
          "type": "string",
          "format": "date",
          "title": "Computed",
          "description": "Date the figures were computed. They are computed again each day."
        }
      },
      "type": "object",
      "required": [
        "parcels",
        "sales_last_year",
        "land_use",
        "computed"
      ],
      "title": "ParcelStatistics",
      "description": "Figures computed from the parcels held for a county."
    },
    "Statistics": {
      "properties": {
        "parcel": {
          "anyOf": [
            {
              "$ref": "#/$defs/ParcelStatistics"
            },
            {
              "type": "null"
            }
          ],
          "description": "Figures from the county's parcels. Null for a jurisdiction that is not a county, and for a county with no parcels."
        }
      },
      "type": "object",
      "title": "Statistics",
      "description": "Figures computed from the records held for a jurisdiction."
    },
    "jurisdiction__Identifier": {
      "properties": {
        "scheme": {
          "type": "string",
          "title": "Scheme",
          "description": "Identifier scheme. One of `census_geoid`, `census_geoid_fq` or `gnis`."
        },
        "value": {
          "type": "string",
          "title": "Value",
          "description": "The identifier, formatted for its scheme."
        }
      },
      "type": "object",
      "required": [
        "scheme",
        "value"
      ],
      "title": "Identifier",
      "description": "A jurisdiction identifier under one scheme."
    },
    "jurisdiction__Within": {
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^jur_[0-7][0-9a-hjkmnp-tv-z]{25}$",
          "title": "Id",
          "description": "A jurisdiction id."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "The jurisdiction's common name."
        },
        "tier": {
          "type": "string",
          "enum": [
            "national",
            "region",
            "subregion",
            "local"
          ],
          "title": "Tier",
          "description": "Level of government. One of `national`, `region` (a state or province), `subregion` (a county or district) or `local` (a city, town, village or township)."
        },
        "type": {
          "type": "string",
          "title": "Type",
          "description": "Kind of jurisdiction, in local terms, such as `county`, `parish`, `city` or `town`."
        },
        "fips": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fips",
          "description": "The Census GEOID. Null outside the US."
        },
        "partial": {
          "type": "boolean",
          "title": "Partial",
          "description": "Whether the jurisdiction lies only partly inside the containing one."
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "tier",
        "type",
        "partial"
      ],
      "title": "Within",
      "description": "A jurisdiction that contains another."
    }
  }
}