{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/geoapify/json-schema/geoapify-boundary-feature-collection-schema.json",
  "title": "BoundaryFeatureCollection",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/geoapify-boundaries-api-openapi.yml#/components/schemas/BoundaryFeatureCollection",
  "type": "object",
  "required": [
    "type",
    "features"
  ],
  "properties": {
    "type": {
      "const": "FeatureCollection"
    },
    "features": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BoundaryFeature"
      }
    }
  },
  "$defs": {
    "BooleanMap": {
      "type": "object",
      "additionalProperties": {
        "type": "boolean"
      }
    },
    "BoundaryFeature": {
      "type": "object",
      "required": [
        "type",
        "properties",
        "geometry"
      ],
      "properties": {
        "type": {
          "const": "Feature"
        },
        "properties": {
          "$ref": "#/$defs/BoundaryProperties"
        },
        "geometry": {
          "$ref": "#/$defs/GeoJsonGeometry"
        },
        "bbox": {
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "items": {
            "type": "number"
          }
        }
      }
    },
    "BoundaryProperties": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "continent": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "state_code": {
          "type": "string"
        },
        "state_COG": {
          "type": "string"
        },
        "department_COG": {
          "type": "string"
        },
        "state_district": {
          "type": "string"
        },
        "province": {
          "type": "string"
        },
        "department": {
          "type": "string"
        },
        "arrondissement": {
          "type": "string"
        },
        "county": {
          "type": "string"
        },
        "county_code": {
          "type": "string"
        },
        "county_district": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "city_district": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "postal_code": {
          "type": "string"
        },
        "openGeoDB:postal_codes": {
          "type": "string"
        },
        "district": {
          "type": "string"
        },
        "suburb": {
          "type": "string"
        },
        "municipality": {
          "type": "string"
        },
        "commune": {
          "type": "string"
        },
        "subdistrict": {
          "type": "string"
        },
        "city_block": {
          "type": "string"
        },
        "neighbourhood": {
          "type": "string"
        },
        "quarter": {
          "type": "string"
        },
        "section": {
          "type": "string"
        },
        "sector": {
          "type": "string"
        },
        "subdivision": {
          "type": "string"
        },
        "croft": {
          "type": "string"
        },
        "allotments": {
          "type": "string"
        },
        "residental": {
          "type": "string"
        },
        "farm": {
          "type": "string"
        },
        "farmyard": {
          "type": "string"
        },
        "industrial": {
          "type": "string"
        },
        "retail": {
          "type": "string"
        },
        "borough": {
          "type": "string"
        },
        "town": {
          "type": "string"
        },
        "township": {
          "type": "string"
        },
        "village": {
          "type": "string"
        },
        "hamlet": {
          "type": "string"
        },
        "locality": {
          "type": "string"
        },
        "isolated_dwelling": {
          "type": "string"
        },
        "street": {
          "type": "string"
        },
        "road": {
          "type": "string"
        },
        "footway": {
          "type": "string"
        },
        "pedestrian": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "housenumber": {
          "type": "string"
        },
        "house_number": {
          "type": "string"
        },
        "house_name": {
          "type": "string"
        },
        "old_name": {
          "type": "string"
        },
        "other": {
          "type": "string"
        },
        "formatted": {
          "type": "string"
        },
        "address_line1": {
          "type": "string"
        },
        "address_line2": {
          "type": "string"
        },
        "unlocode": {
          "type": "string"
        },
        "iso3166_2": {
          "type": "string"
        },
        "iso3166_2_sublevel": {
          "type": "string"
        },
        "iso3166_sublevel": {
          "type": "string"
        },
        "plus_code": {
          "type": "string"
        },
        "plus_code_short": {
          "type": "string"
        },
        "postcodes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "other_names": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "lon": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "lat": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "parent_as_place_id": {
          "type": "boolean"
        },
        "timezone": {
          "$ref": "#/$defs/TimezoneOutput"
        },
        "population": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "$ref": "#/$defs/WikiPopulation"
            }
          ]
        },
        "distance": {
          "type": "number"
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "details": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "datasource": {
          "$ref": "#/$defs/PlacesDatasource"
        },
        "mappedTo": {
          "type": "object",
          "properties": {
            "lon": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            },
            "lat": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          }
        },
        "place_id": {
          "type": "string",
          "minLength": 3,
          "maxLength": 2048
        },
        "website": {
          "type": "string"
        },
        "opening_hours": {
          "type": "string"
        },
        "opening_hours_covid19": {
          "type": "string"
        },
        "brand": {
          "type": "string"
        },
        "operator": {
          "type": "string"
        },
        "branch": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "craft": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "int_ref": {
          "type": "string"
        },
        "ele": {
          "type": "string"
        },
        "color": {
          "type": "string"
        },
        "water_source": {
          "type": "string"
        },
        "website_other": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "website_international": {
          "$ref": "#/$defs/StringMap"
        },
        "description_international": {
          "$ref": "#/$defs/StringMap"
        },
        "name_international": {
          "$ref": "#/$defs/StringMap"
        },
        "cuisine_international": {
          "$ref": "#/$defs/StringMap"
        },
        "ref_other": {
          "$ref": "#/$defs/StringMap"
        },
        "disused": {
          "type": "boolean"
        },
        "commercial": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/$defs/PlaceDetailGroup"
            }
          ]
        },
        "payment_options": {
          "$ref": "#/$defs/BooleanMap"
        },
        "recycling_options": {
          "$ref": "#/$defs/BooleanMap"
        },
        "fuel_options": {
          "$ref": "#/$defs/BooleanMap"
        },
        "targeted_for": {
          "$ref": "#/$defs/BooleanMap"
        },
        "socket_options": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PlaceDetailGroup"
          }
        },
        "brand_details": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "operator_details": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "network_details": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "owner_details": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "name_other": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "contact": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "facilities": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "wiki_and_media": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "historic": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "heritage": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "artwork": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "accommodation": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "catering": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "parking": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "airport": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "power": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "way": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "building": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "place_of_worship": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "fire_hydrant": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "defibrilator": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "restrictions": {
          "$ref": "#/$defs/PlaceDetailGroup"
        },
        "production": {
          "$ref": "#/$defs/PlaceDetailGroup"
        }
      }
    },
    "GeoJsonGeometry": {
      "oneOf": [
        {
          "$ref": "#/$defs/PointGeometry"
        },
        {
          "$ref": "#/$defs/LineStringGeometry"
        },
        {
          "$ref": "#/$defs/PolygonGeometry"
        },
        {
          "$ref": "#/$defs/MultiPointGeometry"
        },
        {
          "$ref": "#/$defs/MultiLineStringGeometry"
        },
        {
          "$ref": "#/$defs/MultiPolygonGeometry"
        },
        {
          "$ref": "#/$defs/GeometryCollection"
        }
      ]
    },
    "GeometryCollection": {
      "type": "object",
      "required": [
        "type",
        "geometries"
      ],
      "properties": {
        "type": {
          "const": "GeometryCollection"
        },
        "geometries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GeoJsonGeometry"
          }
        }
      }
    },
    "LineStringGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "LineString"
        },
        "coordinates": {
          "type": "array",
          "minItems": 2,
          "items": {
            "$ref": "#/$defs/Position"
          }
        }
      }
    },
    "MultiLineStringGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "MultiLineString"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "array",
            "minItems": 2,
            "items": {
              "$ref": "#/$defs/Position"
            }
          }
        }
      }
    },
    "MultiPointGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "MultiPoint"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Position"
          }
        }
      }
    },
    "MultiPolygonGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "MultiPolygon"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "array",
              "minItems": 4,
              "items": {
                "$ref": "#/$defs/Position"
              }
            }
          }
        }
      }
    },
    "PlaceDetailGroup": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/PlaceDetailValue"
      }
    },
    "PlaceDetailValue": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PlaceDetailValue"
          }
        },
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PlaceDetailValue"
          }
        }
      ]
    },
    "PlacesDatasource": {
      "type": "object",
      "required": [
        "raw"
      ],
      "properties": {
        "sourcename": {
          "type": "string"
        },
        "attribution": {
          "type": "string"
        },
        "license": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "raw": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "PointGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "Point"
        },
        "coordinates": {
          "$ref": "#/$defs/Position"
        }
      }
    },
    "PolygonGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "Polygon"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "array",
            "minItems": 4,
            "items": {
              "$ref": "#/$defs/Position"
            }
          }
        }
      }
    },
    "Position": {
      "type": "array",
      "minItems": 2,
      "maxItems": 3,
      "prefixItems": [
        {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        {
          "type": "number"
        }
      ],
      "items": false
    },
    "StringMap": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "TimezoneOutput": {
      "type": "object",
      "required": [
        "name",
        "offset_STD",
        "offset_DST",
        "offset_STD_seconds",
        "offset_DST_seconds"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "name_alt": {
          "type": "string"
        },
        "country_codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "offset_STD": {
          "type": "string"
        },
        "offset_DST": {
          "type": "string"
        },
        "offset_STD_seconds": {
          "type": "number"
        },
        "offset_DST_seconds": {
          "type": "number"
        },
        "abbreviation_STD": {
          "type": "string"
        },
        "abbreviation_DST": {
          "type": "string"
        }
      }
    },
    "WikiPopulation": {
      "type": "object",
      "required": [
        "actual",
        "by_years"
      ],
      "properties": {
        "actual": {
          "type": "string"
        },
        "by_years": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}