{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "OpenPlaceRules static API",
    "version": "1.2.0",
    "summary": "Read-only JSON files describing what public sources say about camera glasses, recording, AI capture, robots and drones at places.",
    "description": "Every endpoint is a static file generated when the site is built, served by GitHub Pages over HTTPS with `Access-Control-Allow-Origin: *`. There is no query string, no authentication and no rate limit beyond the host's. Data is informational, not legal advice or permission: an omitted activity is unspecified and never means allowed, and local law and on-site signs prevail. Data licence ODbL-1.0; please credit \"OpenPlaceRules\" and keep the per-entry source links. See https://openplacerules.org/developers/.",
    "termsOfService": "https://openplacerules.org/terms.html",
    "contact": {
      "name": "OpenPlaceRules",
      "email": "hello@openplacerules.org",
      "url": "https://openplacerules.org/developers/"
    },
    "license": {
      "name": "Data: ODbL-1.0",
      "url": "https://opendatacommons.org/licenses/odbl/1-0/"
    }
  },
  "servers": [
    {
      "url": "https://openplacerules.org/api/v1",
      "description": "GitHub Pages"
    }
  ],
  "externalDocs": {
    "description": "Developer guide",
    "url": "https://openplacerules.org/developers/"
  },
  "paths": {
    "/index.json": {
      "get": {
        "operationId": "getIndex",
        "summary": "API index: version, build time, counts, endpoint URLs and the near-tile scheme.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "$ref": "#/components/headers/CORS"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIndex"
                }
              }
            }
          }
        }
      }
    },
    "/places.json": {
      "get": {
        "operationId": "listPlaces",
        "summary": "Every entry as a compact record (no geometry). About 0.5 MB.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "$ref": "#/components/headers/CORS"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlacesList"
                }
              }
            }
          }
        }
      }
    },
    "/places/{id}.json": {
      "get": {
        "operationId": "getPlace",
        "summary": "One full entry, with geometry and zones.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "$ref": "#/components/headers/CORS"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceFile"
                }
              }
            }
          },
          "404": {
            "description": "No such file (unknown id or code, or an empty tile)."
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "Entry id, as in /p/{id}/.",
          "schema": {
            "$ref": "#/components/schemas/Id"
          },
          "example": "rijksmuseum"
        }
      ]
    },
    "/countries.json": {
      "get": {
        "operationId": "listCountries",
        "summary": "Every jurisdiction with its entry count.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "$ref": "#/components/headers/CORS"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountriesList"
                }
              }
            }
          }
        }
      }
    },
    "/countries/{cc}.json": {
      "get": {
        "operationId": "getCountry",
        "summary": "All entries for one jurisdiction, including organisation- and nationwide rules that have no map point.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "$ref": "#/components/headers/CORS"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountryFile"
                }
              }
            }
          },
          "404": {
            "description": "No such file (unknown id or code, or an empty tile)."
          }
        }
      },
      "parameters": [
        {
          "name": "cc",
          "in": "path",
          "required": true,
          "description": "Lower-case ISO 3166-1 alpha-2 code, or eu.",
          "schema": {
            "type": "string",
            "pattern": "^[a-z]{2}$"
          },
          "example": "th"
        }
      ]
    },
    "/near/index.json": {
      "get": {
        "operationId": "listTiles",
        "summary": "Keys (\"lat/lng\") of every published tile, plus the URL template.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "$ref": "#/components/headers/CORS"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NearIndex"
                }
              }
            }
          }
        }
      }
    },
    "/near/{lat}/{lng}.json": {
      "get": {
        "operationId": "getTile",
        "summary": "Entries whose point is in, or whose area touches, one 1x1 degree tile.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "$ref": "#/components/headers/CORS"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tile"
                }
              }
            }
          },
          "404": {
            "description": "No such file (unknown id or code, or an empty tile)."
          }
        },
        "description": "lat = floor(latitude) in -90..89, lng = floor(longitude) in -180..179. For nearest-place lookups read this tile and its neighbours (listed in the response). Empty tiles are not published and return 404."
      },
      "parameters": [
        {
          "name": "lat",
          "in": "path",
          "required": true,
          "description": "floor(latitude)",
          "schema": {
            "type": "integer",
            "minimum": -90,
            "maximum": 89
          },
          "example": 13
        },
        {
          "name": "lng",
          "in": "path",
          "required": true,
          "description": "floor(longitude)",
          "schema": {
            "type": "integer",
            "minimum": -180,
            "maximum": 179
          },
          "example": 100
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "RuleValue": {
        "enum": [
          "allowed",
          "restricted",
          "prohibited"
        ],
        "description": "What the source says. 'allowed' means the source states it is permitted."
      },
      "Rules": {
        "type": "object",
        "description": "Activity -> value. An omitted activity is unspecified: it never means allowed.",
        "additionalProperties": false,
        "properties": {
          "camera_glasses": {
            "$ref": "#/components/schemas/RuleValue"
          },
          "recording": {
            "$ref": "#/components/schemas/RuleValue"
          },
          "ai_capture": {
            "$ref": "#/components/schemas/RuleValue"
          },
          "robots": {
            "$ref": "#/components/schemas/RuleValue"
          },
          "drones": {
            "$ref": "#/components/schemas/RuleValue"
          }
        }
      },
      "Id": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9-]*$"
      },
      "Country": {
        "type": "string",
        "pattern": "^[A-Z]{2}$",
        "description": "ISO 3166-1 alpha-2 (EU for the European Union)."
      },
      "Source": {
        "type": "object",
        "required": [
          "url",
          "publisher",
          "type"
        ],
        "properties": {
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "publisher": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "official, secondary or owner"
          },
          "found_via": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "Geometry": {
        "description": "A circle (center [lat, lng] + radius) or a GeoJSON Polygon/MultiPolygon ([lng, lat]).",
        "oneOf": [
          {
            "type": "object",
            "required": [
              "type",
              "center",
              "radius_m"
            ],
            "properties": {
              "type": {
                "const": "circle"
              },
              "center": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  }
                ],
                "minItems": 2,
                "maxItems": 2,
                "description": "[lat, lng]"
              },
              "radius_m": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "coordinates"
            ],
            "properties": {
              "type": {
                "const": "Polygon"
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "number",
                        "minimum": -180,
                        "maximum": 180
                      },
                      {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 90
                      }
                    ],
                    "minItems": 2,
                    "description": "[lng, lat]"
                  },
                  "minItems": 4
                },
                "minItems": 1
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "coordinates"
            ],
            "properties": {
              "type": {
                "const": "MultiPolygon"
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        {
                          "type": "number",
                          "minimum": -90,
                          "maximum": 90
                        }
                      ],
                      "minItems": 2,
                      "description": "[lng, lat]"
                    },
                    "minItems": 4
                  },
                  "minItems": 1
                },
                "minItems": 1
              }
            }
          }
        ]
      },
      "Meta": {
        "type": "object",
        "required": [
          "api",
          "version",
          "generated_at",
          "data_generated",
          "licence",
          "licence_url",
          "attribution",
          "disclaimer",
          "terms"
        ],
        "properties": {
          "api": {
            "type": "string",
            "const": "OpenPlaceRules static API"
          },
          "version": {
            "type": "string",
            "const": "v1"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this file was built."
          },
          "data_generated": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the underlying dataset was generated."
          },
          "licence": {
            "type": "string",
            "const": "ODbL-1.0"
          },
          "licence_url": {
            "type": "string",
            "format": "uri"
          },
          "attribution": {
            "type": "string"
          },
          "disclaimer": {
            "type": "string",
            "description": "Information only, not legal advice or permission."
          },
          "terms": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": true,
        "description": "Fields every /api/v1 file except the near tiles carries."
      },
      "TileMeta": {
        "type": "object",
        "required": [
          "version",
          "generated_at",
          "licence",
          "attribution",
          "terms"
        ],
        "properties": {
          "version": {
            "type": "string",
            "const": "v1"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this file was built."
          },
          "licence": {
            "type": "string",
            "const": "ODbL-1.0"
          },
          "attribution": {
            "type": "string"
          },
          "terms": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": true,
        "description": "Shorter header used by near tiles."
      },
      "PlaceSummary": {
        "type": "object",
        "required": [
          "id",
          "name",
          "kind",
          "scope",
          "country",
          "region",
          "lat",
          "lng",
          "precision",
          "geometry_type",
          "rules",
          "status",
          "effective_from",
          "expires",
          "temporary",
          "reported_date",
          "owner_verified",
          "verification",
          "summary",
          "source",
          "retrieved",
          "page",
          "url",
          "owner_verification"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "e.g. museum, court, airport, jurisdiction, owner_published"
          },
          "scope": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "$ref": "#/components/schemas/Country"
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -180,
            "maximum": 180
          },
          "precision": {
            "type": [
              "string",
              "null"
            ],
            "description": "official_coordinates, landmark, representative_point, admin_boundary, owner_geometry or none"
          },
          "geometry_type": {
            "enum": [
              "circle",
              "Polygon",
              "MultiPolygon",
              null
            ]
          },
          "rules": {
            "$ref": "#/components/schemas/Rules"
          },
          "status": {
            "$ref": "#/components/schemas/EntryStatus"
          },
          "effective_from": {
            "$ref": "#/components/schemas/PartialDate"
          },
          "expires": {
            "$ref": "#/components/schemas/PartialDate"
          },
          "temporary": {
            "type": "boolean"
          },
          "reported_date": {
            "$ref": "#/components/schemas/PartialDate"
          },
          "owner_verified": {
            "type": "boolean",
            "description": "True when the entry is verified by owner: built from an owner's place-rules.json (claim flow) or verified on /verify/ (see owner_verification)."
          },
          "verification": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "retrieved": {
            "type": [
              "string",
              "null"
            ]
          },
          "page": {
            "type": "string",
            "format": "uri",
            "description": "Human page for this entry."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "This entry's /api/v1/places/{id}.json."
          },
          "owner_verification": {
            "$ref": "#/components/schemas/OwnerVerification"
          },
          "applies_at": {
            "$ref": "#/components/schemas/AppliesAt"
          },
          "sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Site"
            },
            "description": "Added in API 1.2.0. Listed sites for own_sites entries (often empty: the registry has no site locations for most chains). Always empty for area entries."
          }
        },
        "additionalProperties": false
      },
      "TilePlace": {
        "type": "object",
        "required": [
          "id",
          "name",
          "kind",
          "country",
          "lat",
          "lng",
          "geometry_type",
          "rules",
          "status",
          "expires",
          "owner_verified",
          "url",
          "match"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "e.g. museum, court, airport, jurisdiction, owner_published"
          },
          "country": {
            "$ref": "#/components/schemas/Country"
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -180,
            "maximum": 180
          },
          "geometry_type": {
            "enum": [
              "circle",
              "Polygon",
              "MultiPolygon",
              null
            ]
          },
          "rules": {
            "$ref": "#/components/schemas/Rules"
          },
          "status": {
            "$ref": "#/components/schemas/EntryStatus"
          },
          "expires": {
            "$ref": "#/components/schemas/PartialDate"
          },
          "owner_verified": {
            "type": "boolean",
            "description": "True when the entry is verified by owner: built from an owner's place-rules.json (claim flow) or verified on /verify/ (see owner_verification)."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "This entry's /api/v1/places/{id}.json."
          },
          "match": {
            "enum": [
              "point",
              "area",
              "site",
              "operator"
            ],
            "description": "point: the entry's map point is in this tile; area: only its circle or polygon touches it. site (API 1.2.0): a listed site of a chain or operator lies in this tile; lat/lng and site give that site. operator (API 1.2.0): only in the tile's operators list."
          },
          "applies_at": {
            "$ref": "#/components/schemas/AppliesAt"
          },
          "site": {
            "$ref": "#/components/schemas/Site",
            "description": "Added in API 1.2.0. For match \"site\": the listed site in this tile (lat/lng are this site's)."
          }
        },
        "additionalProperties": false
      },
      "Place": {
        "type": "object",
        "required": [
          "id",
          "name",
          "kind",
          "country",
          "location",
          "rules",
          "source",
          "verification",
          "owner_verified",
          "page",
          "url"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Id"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "country": {
            "$ref": "#/components/schemas/Country"
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": "object",
            "properties": {
              "lat": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "precision": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "radius_m": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "lat",
              "lng"
            ]
          },
          "geometry": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Geometry"
              },
              {
                "type": "null"
              }
            ]
          },
          "rules": {
            "$ref": "#/components/schemas/Rules"
          },
          "zones": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A named zone with its own activity values (and optional hours or geometry).",
              "properties": {
                "zone": {
                  "type": "string"
                }
              }
            }
          },
          "summary": {
            "type": "string"
          },
          "effective_or_reported_date": {
            "$ref": "#/components/schemas/PartialDate"
          },
          "status": {
            "$ref": "#/components/schemas/EntryStatus"
          },
          "effective_from": {
            "$ref": "#/components/schemas/PartialDate"
          },
          "expires": {
            "$ref": "#/components/schemas/PartialDate"
          },
          "temporary": {
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "verification": {
            "type": "string",
            "description": "'reported, unverified by owner', or 'verified by owner (<method>, <YYYY-MM-DD>)'."
          },
          "retrieved": {
            "type": [
              "string",
              "null"
            ]
          },
          "owner_verified": {
            "type": "boolean"
          },
          "page": {
            "type": "string",
            "format": "uri"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "owner_verification": {
            "$ref": "#/components/schemas/OwnerVerification"
          },
          "applies_at": {
            "$ref": "#/components/schemas/AppliesAt"
          },
          "sites": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A Site plus coordinates_source (how the coordinates were made).",
              "required": [
                "name",
                "lat",
                "lng"
              ]
            }
          }
        },
        "additionalProperties": true,
        "description": "A full registry entry, including geometry and zones. Owner-published entries may also carry contact, exceptions, supersedes and stale."
      },
      "ApiIndex": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "stats",
              "endpoints",
              "near_tiles"
            ],
            "properties": {
              "stats": {
                "type": "object",
                "required": [
                  "entries",
                  "jurisdictions",
                  "owner_verified",
                  "tiles"
                ],
                "properties": {
                  "entries": {
                    "type": "integer"
                  },
                  "jurisdictions": {
                    "type": "integer"
                  },
                  "owner_verified": {
                    "type": "integer"
                  },
                  "tiles": {
                    "type": "integer"
                  }
                }
              },
              "endpoints": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "near_tiles": {
                "type": "object",
                "required": [
                  "tile_size_deg",
                  "key",
                  "url_template",
                  "membership",
                  "neighbours",
                  "missing_tiles"
                ],
                "properties": {
                  "tile_size_deg": {
                    "const": 1
                  },
                  "key": {
                    "type": "string"
                  },
                  "url_template": {
                    "type": "string"
                  },
                  "membership": {
                    "type": "string"
                  },
                  "neighbours": {
                    "type": "string"
                  },
                  "missing_tiles": {
                    "type": "string"
                  },
                  "chains_and_operators": {
                    "type": "string"
                  }
                }
              },
              "cors": {
                "type": "string"
              },
              "country_codes": {
                "type": "string"
              }
            }
          }
        ]
      },
      "PlacesList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "count",
              "places"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0
              },
              "places": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PlaceSummary"
                }
              }
            }
          }
        ]
      },
      "PlaceFile": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "place"
            ],
            "properties": {
              "place": {
                "$ref": "#/components/schemas/Place"
              }
            }
          }
        ]
      },
      "CountriesList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "count",
              "countries"
            ],
            "properties": {
              "count": {
                "type": "integer"
              },
              "countries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "count",
                    "url"
                  ],
                  "properties": {
                    "code": {
                      "$ref": "#/components/schemas/Country"
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        ]
      },
      "CountryFile": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "code",
              "count",
              "places"
            ],
            "properties": {
              "code": {
                "$ref": "#/components/schemas/Country"
              },
              "count": {
                "type": "integer",
                "minimum": 1
              },
              "places": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PlaceSummary"
                }
              }
            }
          }
        ]
      },
      "NearIndex": {
        "type": "object",
        "description": "Compact list of the published near tiles. Build a tile URL by putting a key's lat and lng into url_template.",
        "required": [
          "version",
          "generated_at",
          "tile_size",
          "url_template",
          "count",
          "tiles"
        ],
        "additionalProperties": false,
        "properties": {
          "version": {
            "type": "string",
            "const": "v1"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "tile_size": {
            "const": 1,
            "description": "Tile edge in degrees."
          },
          "url_template": {
            "type": "string",
            "description": "e.g. https://openplacerules.org/api/v1/near/{lat}/{lng}.json"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "tiles": {
            "type": "array",
            "uniqueItems": true,
            "description": "Keys \"lat/lng\" (floor of latitude / floor of longitude) of every published tile, sorted by lat then lng.",
            "items": {
              "type": "string",
              "pattern": "^-?\\d{1,2}/-?\\d{1,3}$"
            }
          }
        }
      },
      "Tile": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TileMeta"
          },
          {
            "type": "object",
            "required": [
              "tile",
              "neighbours",
              "count",
              "places"
            ],
            "properties": {
              "tile": {
                "type": "object",
                "required": [
                  "lat",
                  "lng",
                  "bbox",
                  "size_deg"
                ],
                "properties": {
                  "lat": {
                    "type": "integer",
                    "minimum": -90,
                    "maximum": 89
                  },
                  "lng": {
                    "type": "integer",
                    "minimum": -180,
                    "maximum": 179
                  },
                  "bbox": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "minItems": 4,
                    "maxItems": 4,
                    "description": "[west, south, east, north]"
                  },
                  "size_deg": {
                    "const": 1
                  }
                }
              },
              "neighbours": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "lat",
                    "lng",
                    "url"
                  ],
                  "properties": {
                    "lat": {
                      "type": "integer",
                      "minimum": -90,
                      "maximum": 89
                    },
                    "lng": {
                      "type": "integer",
                      "minimum": -180,
                      "maximum": 179
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 8,
                "description": "The published tiles among the 8 around this one."
              },
              "count": {
                "type": "integer",
                "minimum": 0,
                "description": "Number of entries in places. Can be 0 (API 1.2.0) when the tile holds only operators."
              },
              "places": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TilePlace"
                },
                "description": "Entries that apply in this tile: venue and area entries, and chains or operators only through a listed site in this tile (match \"site\"). Use these to decide what applies near a point."
              },
              "operators": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TilePlace"
                },
                "description": "Added in API 1.2.0. Chains and operators (applies_at own_sites) with no listed sites whose representative point is in this tile. They apply only at their own sites: list them separately (for example as 'Chains and operators with rules here') and never use them to decide what applies across the tile or at a point. Chains with listed sites appear in places at those sites instead."
              }
            }
          }
        ]
      },
      "PartialDate": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^\\d{4}(-\\d{2}(-\\d{2})?)?$",
        "description": "YYYY, YYYY-MM or YYYY-MM-DD (sources are not always day-precise)."
      },
      "OwnerVerification": {
        "type": [
          "object",
          "null"
        ],
        "description": "Self-serve owner verification (SPEC section 7.3, https://openplacerules.org/verify/). null when nobody has verified the entry. status 'verified' means the place proved control of `domain`; 'lapsed' means the proof disappeared and the entry is shown as reported again.",
        "required": [
          "status",
          "domain"
        ],
        "properties": {
          "status": {
            "enum": [
              "verified",
              "lapsed"
            ]
          },
          "domain": {
            "type": "string"
          },
          "method": {
            "enum": [
              "well-known",
              "dns",
              null
            ]
          },
          "verified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "last_checked": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "lapsed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "rules_from_owner": {
            "type": "boolean",
            "description": "True when the rules come from the owner's own valid place-rules.json."
          }
        }
      },
      "EntryStatus": {
        "enum": [
          "in_force",
          "in_force_temporary",
          "starts_soon",
          "proposed",
          null
        ],
        "description": "Entry status. in_force; in_force_temporary (in force for a limited time); starts_soon (adopted, not yet in force); proposed (added in API 1.2.0: the official record shows the rule under consideration, not adopted; it never decides a lookup). Clients should treat any value other than in_force and in_force_temporary as not in force."
      },
      "AppliesAt": {
        "enum": [
          "area",
          "own_sites"
        ],
        "description": "Added in API 1.2.0. own_sites: a chain, operator or system (multi-site entry, organisation-wide rule, exam rooms, a court or school system) whose rule applies only at its own sites. Its lat/lng is a representative point, not a site: do not apply it by distance from that point and do not let it decide what applies across an area. Use its listed sites instead. area: every other entry (a venue point, a mapped circle or polygon, or an area-wide law)."
      },
      "Site": {
        "type": "object",
        "required": [
          "name",
          "lat",
          "lng"
        ],
        "additionalProperties": false,
        "description": "Added in API 1.2.0. One site of a chain or operator, from an address or name printed on an official page. Coordinates are an OpenStreetMap geocode of that address.",
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          },
          "address_source": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Official page that gives the site's name or address."
          }
        }
      }
    },
    "headers": {
      "CORS": {
        "description": "GitHub Pages sends * for static files.",
        "schema": {
          "type": "string",
          "const": "*"
        }
      }
    }
  }
}
