landfeedAPI · MCP · 2.0.0Agent Markdown

Six MCP tools

Compact shared local schemas. Bundle reachable $defs per tool before use; never fetch refs. Examples and detailed guidance: mcp-examples.md.

Cost

Costs are x-request-cost, in requests per call.

ToolREST bindingCost
checkGET /v1/check1
eventsGET /v1/events1
layerGET /v1/layer/{layer}1
parcelGET /v1/parcel1
resolveGET /v1/resolve1
searchGET /v1/search1

Inputs

Dokładnie jeden z parametrów q, id, point (lat i lng razem liczą się jako point). Wszystkie punkty odczytu API i wszystkie narzędzia obsługują te trzy warianty.

{
  "AreaV2": {
    "additionalProperties": false,
    "allOf": [
      {
        "else": {
          "properties": {
            "official_m2": {
              "exclusiveMinimum": 0,
              "type": "number"
            }
          }
        },
        "if": {
          "properties": {
            "source": {
              "const": "computed"
            }
          }
        },
        "then": {
          "properties": {
            "note": {
              "const": "Powierzchnię obliczono z geometrii działki; powierzchnia urzędowa EGiB jest niedostępna."
            },
            "official_m2": {
              "type": "null"
            }
          }
        }
      }
    ],
    "properties": {
      "geometry_m2": {
        "exclusiveMinimum": 0,
        "type": "number"
      },
      "note": {
        "minLength": 1,
        "type": "string"
      },
      "official_m2": {
        "anyOf": [
          {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          {
            "type": "null"
          }
        ]
      },
      "provenance": {
        "$ref": "#/$defs/SourceRef"
      },
      "source": {
        "enum": [
          "egib",
          "computed"
        ],
        "type": "string"
      }
    },
    "required": [
      "official_m2",
      "geometry_m2",
      "source",
      "provenance",
      "note"
    ],
    "type": "object"
  },
  "Auth": {
    "additionalProperties": false,
    "properties": {
      "kind": {
        "enum": [
          "api_key",
          "oauth_connector"
        ],
        "type": "string"
      }
    },
    "required": [
      "kind"
    ],
    "type": "object"
  },
  "BatchCheckItem": {
    "additionalProperties": false,
    "allOf": [
      {
        "else": {
          "properties": {
            "result": {
              "type": "null"
            }
          }
        },
        "if": {
          "properties": {
            "status": {
              "const": "ok"
            }
          }
        },
        "then": {
          "properties": {
            "error": {
              "type": "null"
            },
            "result": {
              "$ref": "#/$defs/CheckResultV2"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "status": {
              "const": "error"
            }
          }
        },
        "then": {
          "properties": {
            "error": {
              "$ref": "#/$defs/Error"
            }
          }
        }
      }
    ],
    "properties": {
      "billing": {
        "allOf": [
          {
            "$ref": "#/$defs/BillingV2"
          },
          {
            "properties": {
              "cost": {
                "const": 1
              }
            }
          }
        ]
      },
      "error": {
        "anyOf": [
          {
            "$ref": "#/$defs/Error"
          },
          {
            "type": "null"
          }
        ]
      },
      "parcel_id": {
        "$ref": "#/$defs/ParcelId"
      },
      "result": {
        "anyOf": [
          {
            "$ref": "#/$defs/CheckResultV2"
          },
          {
            "type": "null"
          }
        ]
      },
      "status": {
        "enum": [
          "ok",
          "not_found",
          "not_covered",
          "error"
        ],
        "type": "string"
      }
    },
    "required": [
      "parcel_id",
      "status",
      "result",
      "billing",
      "error"
    ],
    "type": "object"
  },
  "BatchCheckJob": {
    "additionalProperties": false,
    "allOf": [
      {
        "if": {
          "properties": {
            "state": {
              "const": "completed"
            }
          }
        },
        "then": {
          "properties": {
            "error": {
              "type": "null"
            },
            "results_url": {
              "pattern": "^/v1/check/jobs/[^/]+/results$",
              "type": "string"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "state": {
              "const": "failed"
            }
          }
        },
        "then": {
          "properties": {
            "error": {
              "$ref": "#/$defs/Error"
            }
          }
        }
      }
    ],
    "properties": {
      "completed": {
        "maximum": 10000,
        "minimum": 0,
        "type": "integer"
      },
      "error": {
        "anyOf": [
          {
            "$ref": "#/$defs/Error"
          },
          {
            "type": "null"
          }
        ]
      },
      "id": {
        "pattern": "^check_[A-Za-z0-9_-]+$",
        "type": "string"
      },
      "results_url": {
        "anyOf": [
          {
            "pattern": "^/v1/check/jobs/[^/]+/results$",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "state": {
        "enum": [
          "queued",
          "running",
          "completed",
          "failed"
        ],
        "type": "string"
      },
      "submitted_at": {
        "format": "date-time",
        "type": "string"
      },
      "total": {
        "maximum": 10000,
        "minimum": 1,
        "type": "integer"
      },
      "updated_at": {
        "format": "date-time",
        "type": "string"
      }
    },
    "required": [
      "id",
      "state",
      "submitted_at",
      "updated_at",
      "total",
      "completed",
      "results_url",
      "error"
    ],
    "type": "object"
  },
  "BatchCheckRequest": {
    "additionalProperties": false,
    "properties": {
      "parcel_ids": {
        "items": {
          "$ref": "#/$defs/ParcelId"
        },
        "maxItems": 10000,
        "minItems": 1,
        "type": "array",
        "uniqueItems": true
      }
    },
    "required": [
      "parcel_ids"
    ],
    "type": "object",
    "x-runtime-supported": false
  },
  "BatchCheckResults": {
    "additionalProperties": false,
    "properties": {
      "items": {
        "items": {
          "$ref": "#/$defs/BatchCheckItem"
        },
        "maxItems": 1000,
        "type": "array"
      },
      "job_id": {
        "pattern": "^check_[A-Za-z0-9_-]+$",
        "type": "string"
      },
      "page": {
        "$ref": "#/$defs/Page"
      }
    },
    "required": [
      "job_id",
      "items",
      "page"
    ],
    "type": "object"
  },
  "Billing": {
    "additionalProperties": false,
    "properties": {
      "charged": {
        "minimum": 0,
        "type": "integer"
      },
      "cost": {
        "minimum": 0,
        "type": "integer"
      },
      "credits": {
        "minimum": 0,
        "type": "integer"
      },
      "refunded": {
        "minimum": 0,
        "type": "integer"
      },
      "rule": {
        "enum": [
          "charged",
          "free_operation",
          "free_invalid_input",
          "free_unauthorized",
          "free_not_modified",
          "refunded_client_error",
          "refunded_server_error",
          "refunded_not_covered",
          "refunded_not_computed",
          "batch_mixed"
        ],
        "type": "string"
      }
    },
    "required": [
      "cost",
      "charged",
      "refunded",
      "rule"
    ],
    "type": "object"
  },
  "BillingV2": {
    "allOf": [
      {
        "$ref": "#/$defs/Billing"
      },
      {
        "required": [
          "credits"
        ]
      }
    ]
  },
  "Candidate": {
    "additionalProperties": false,
    "properties": {
      "area_m2": {
        "type": [
          "number",
          "null"
        ]
      },
      "centroid": {
        "$ref": "#/$defs/LonLat"
      },
      "confidence": {
        "maximum": 1,
        "minimum": 0,
        "type": "number"
      },
      "gmina_name": {
        "type": "string"
      },
      "gmina_teryt": {
        "pattern": "^[0-9]{7}$",
        "type": "string"
      },
      "held": {
        "type": "boolean"
      },
      "id": {
        "type": "string"
      },
      "kind": {
        "enum": [
          "parcel",
          "obreb",
          "gmina",
          "address"
        ],
        "type": "string"
      },
      "label": {
        "type": "string"
      },
      "match_reason": {
        "type": "string"
      },
      "number": {
        "type": "string"
      },
      "obreb_id": {
        "type": "string"
      },
      "obreb_name": {
        "type": "string"
      },
      "powiat_name": {
        "type": "string"
      },
      "voivodeship": {
        "pattern": "^[0-9]{2}$",
        "type": "string"
      }
    },
    "required": [
      "id",
      "kind",
      "label",
      "confidence"
    ],
    "type": "object"
  },
  "CheckResultV2": {
    "additionalProperties": false,
    "allOf": [
      {
        "if": {
          "properties": {
            "verdict": {
              "const": "pass"
            }
          },
          "required": [
            "verdict"
          ]
        },
        "then": {
          "properties": {
            "checks": {
              "items": {
                "properties": {
                  "result": {
                    "const": "pass"
                  }
                }
              },
              "maxItems": 8,
              "minItems": 8
            },
            "record": {
              "properties": {
                "layers": {
                  "properties": {
                    "flood": {
                      "properties": {
                        "coverage": {
                          "enum": [
                            "covered",
                            "covered_no_data"
                          ]
                        }
                      }
                    },
                    "landslide": {
                      "properties": {
                        "coverage": {
                          "enum": [
                            "covered",
                            "covered_no_data"
                          ]
                        }
                      }
                    },
                    "mpzp": {
                      "properties": {
                        "coverage": {
                          "enum": [
                            "covered",
                            "covered_no_data"
                          ]
                        }
                      }
                    },
                    "pog": {
                      "properties": {
                        "coverage": {
                          "enum": [
                            "covered",
                            "covered_no_data"
                          ]
                        }
                      }
                    },
                    "protected": {
                      "properties": {
                        "coverage": {
                          "enum": [
                            "covered",
                            "covered_no_data"
                          ]
                        }
                      }
                    },
                    "road_access": {
                      "properties": {
                        "coverage": {
                          "enum": [
                            "covered",
                            "covered_no_data"
                          ]
                        }
                      }
                    },
                    "wz": {
                      "properties": {
                        "coverage": {
                          "enum": [
                            "covered",
                            "covered_no_data"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "pog",
                    "wz",
                    "mpzp",
                    "flood",
                    "landslide",
                    "protected",
                    "road_access"
                  ]
                }
              }
            }
          }
        }
      }
    ],
    "properties": {
      "checks": {
        "items": {
          "additionalProperties": false,
          "properties": {
            "basis": {
              "type": [
                "string",
                "null"
              ]
            },
            "detail": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "enum": [
                "pog_zone",
                "wz_possible",
                "mpzp_status",
                "mpzp_params",
                "flood_q100",
                "landslide",
                "protected",
                "road_access"
              ],
              "type": "string"
            },
            "layer": {
              "$ref": "#/$defs/LayerKey"
            },
            "result": {
              "enum": [
                "pass",
                "fail",
                "warn",
                "unknown"
              ],
              "type": "string"
            },
            "source": {
              "$ref": "#/$defs/SourceRef"
            },
            "value": {}
          },
          "required": [
            "id",
            "layer",
            "result",
            "source"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "disclaimer": {
        "type": "string"
      },
      "id": {
        "$ref": "#/$defs/ParcelId"
      },
      "record": {
        "$ref": "#/$defs/ParcelRecordV2"
      },
      "verdict": {
        "enum": [
          "pass",
          "conditional",
          "fail",
          "unknown"
        ],
        "type": "string"
      }
    },
    "required": [
      "verdict",
      "checks",
      "record",
      "disclaimer"
    ],
    "type": "object"
  },
  "ContractV2Marker": {
    "properties": {
      "meta": {
        "properties": {
          "contract_version": {
            "const": "2.0.0"
          }
        },
        "required": [
          "contract_version"
        ]
      }
    },
    "required": [
      "meta"
    ]
  },
  "CorpusCoverage": {
    "additionalProperties": false,
    "properties": {
      "as_of": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "held_parcels": {
        "type": "integer"
      },
      "held_pct": {
        "maximum": 100,
        "minimum": 0,
        "type": [
          "number",
          "null"
        ]
      },
      "note": {
        "type": "string"
      },
      "scope": {
        "type": "string"
      },
      "source_parcels": {
        "type": [
          "integer",
          "null"
        ]
      }
    },
    "required": [
      "scope",
      "source_parcels",
      "held_parcels",
      "held_pct",
      "as_of",
      "note"
    ],
    "type": "object"
  },
  "Coverage": {
    "enum": [
      "covered",
      "covered_no_data",
      "not_covered",
      "not_computed"
    ],
    "type": "string"
  },
  "CoverageLayerSummary": {
    "additionalProperties": false,
    "properties": {
      "gminas": {
        "minimum": 0,
        "type": "integer"
      },
      "newest_as_of": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "oldest_as_of": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "voivodeships": {
        "maximum": 16,
        "minimum": 0,
        "type": "integer"
      }
    },
    "required": [
      "gminas",
      "voivodeships",
      "oldest_as_of",
      "newest_as_of"
    ],
    "type": "object"
  },
  "Envelope": {
    "additionalProperties": false,
    "allOf": [
      {
        "if": {
          "properties": {
            "status": {
              "const": "error"
            }
          },
          "required": [
            "status"
          ]
        },
        "then": {
          "properties": {
            "error": {
              "type": "object"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "status": {
              "const": "ambiguous"
            }
          },
          "required": [
            "status"
          ]
        },
        "then": {
          "properties": {
            "candidates": {
              "minItems": 1
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "status": {
              "not": {
                "const": "ok"
              }
            }
          },
          "required": [
            "status"
          ]
        },
        "then": {
          "properties": {
            "result": {
              "type": "null"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "query": {
              "properties": {
                "kind": {
                  "const": "invalid"
                }
              },
              "required": [
                "kind"
              ]
            }
          },
          "required": [
            "query"
          ]
        },
        "then": {
          "properties": {
            "status": {
              "const": "error"
            }
          }
        }
      },
      {
        "if": {
          "$ref": "#/$defs/ContractV2Marker"
        },
        "then": {
          "properties": {
            "billing": {
              "required": [
                "credits"
              ]
            },
            "links": {
              "properties": {
                "sheet": {
                  "$ref": "#/$defs/SignedLink"
                }
              }
            },
            "meta": {
              "required": [
                "operation"
              ]
            },
            "query": {
              "additionalProperties": false,
              "allOf": [
                {
                  "if": {
                    "not": {
                      "required": [
                        "kind"
                      ]
                    }
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/QueryInput"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "q"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/QueryInput",
                        "required": [
                          "q"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "id"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/QueryInput",
                        "required": [
                          "id"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "point"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/QueryInput",
                        "anyOf": [
                          {
                            "required": [
                              "point"
                            ]
                          },
                          {
                            "required": [
                              "lat",
                              "lng"
                            ]
                          }
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "enum": [
                          "none",
                          "bbox",
                          "polygon",
                          "path"
                        ]
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/NoQueryInput"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "bbox"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "required": [
                          "bbox"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "polygon"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "required": [
                          "polygon"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "path"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "required": [
                          "teryt"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "batch"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "properties": {
                          "items": {
                            "maxItems": 1000,
                            "minItems": 1,
                            "type": "array"
                          }
                        },
                        "required": [
                          "items"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "search"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/SearchRequestV2"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "events"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/EventsRequestV2"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "listing"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/ListingResolveRequest"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "check_batch"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/BatchCheckRequest"
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "kind": {
                        "const": "job"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "then": {
                    "properties": {
                      "input": {
                        "$ref": "#/$defs/JobQuery"
                      }
                    }
                  }
                }
              ],
              "properties": {
                "input": {
                  "additionalProperties": false,
                  "properties": {
                    "area": {
                      "$ref": "#/$defs/SearchArea"
                    },
                    "bbox": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "filters": {
                      "$ref": "#/$defs/SearchFilters"
                    },
                    "format": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "geometry": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "idempotency_key": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "items": {
                      "items": {
                        "$ref": "#/$defs/QueryInput",
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "$ref": "#/$defs/ParcelIdInput"
                          },
                          "lat": {
                            "maximum": 55.0,
                            "minimum": 49.0,
                            "type": "number"
                          },
                          "lng": {
                            "maximum": 24.5,
                            "minimum": 14.0,
                            "type": "number"
                          },
                          "point": {
                            "pattern": "^-?[0-9]{1,2}(\\.[0-9]+)?, ?-?[0-9]{1,3}(\\.[0-9]+)?$",
                            "type": "string"
                          },
                          "q": {
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                          }
                        }
                      },
                      "type": "array"
                    },
                    "job_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lat": {
                      "type": "number"
                    },
                    "layer": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "layers": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "limit": {
                      "type": "number"
                    },
                    "listing_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lng": {
                      "type": "number"
                    },
                    "parcel_ids": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "point": {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    "polygon": {
                      "$ref": "#/$defs/SearchPolygon"
                    },
                    "q": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "radius_m": {
                      "type": "number"
                    },
                    "results": {
                      "type": "boolean"
                    },
                    "since": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "teryt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "types": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "kind": {
                  "enum": [
                    "q",
                    "id",
                    "point",
                    "none",
                    "bbox",
                    "polygon",
                    "path",
                    "batch",
                    "invalid",
                    "search",
                    "events",
                    "listing",
                    "check_batch",
                    "job"
                  ],
                  "type": "string"
                },
                "resolved": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "confidence": {
                          "maximum": 1,
                          "minimum": 0,
                          "type": "number"
                        },
                        "from": {
                          "enum": [
                            "q",
                            "id",
                            "point"
                          ],
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "method": {
                          "enum": [
                            "exact_id",
                            "normalised_id",
                            "text_parcel",
                            "text_parcel_fuzzy",
                            "text_address",
                            "text_gmina",
                            "point_in_polygon"
                          ],
                          "type": "string"
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "from",
                        "method",
                        "id",
                        "confidence"
                      ],
                      "type": "object"
                    }
                  ]
                }
              },
              "required": [
                "input",
                "resolved"
              ],
              "type": "object"
            }
          },
          "required": [
            "auth",
            "plan"
          ]
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "parcel"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                },
                "status": {
                  "const": "ok"
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "result": {
              "$ref": "#/$defs/ParcelRecordV2",
              "required": [
                "display_geometry",
                "display_simplified",
                "adjacent_parcel_ids",
                "adjacent_parcel_ids_truncated"
              ]
            }
          }
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "layer"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                },
                "status": {
                  "const": "ok"
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "result": {
              "additionalProperties": false,
              "properties": {
                "answer": {
                  "$ref": "#/$defs/LayerAnswerV2"
                },
                "id": {
                  "$ref": "#/$defs/ParcelId"
                }
              },
              "required": [
                "id",
                "answer"
              ],
              "type": "object"
            }
          }
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "check"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                },
                "status": {
                  "const": "ok"
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "result": {
              "$ref": "#/$defs/CheckResultV2"
            }
          }
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "search"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                },
                "status": {
                  "const": "ok"
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "result": {
              "$ref": "#/$defs/SearchResultV2"
            }
          }
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "events"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                },
                "status": {
                  "const": "ok"
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "result": {
              "items": {
                "$ref": "#/$defs/EventV2"
              },
              "type": "array"
            }
          }
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "check_batch"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                },
                "status": {
                  "const": "ok"
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "result": {
              "$ref": "#/$defs/BatchCheckJob"
            }
          }
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "check_job"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                },
                "status": {
                  "const": "ok"
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "result": {
              "$ref": "#/$defs/BatchCheckJob"
            }
          }
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "check_results"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                },
                "status": {
                  "const": "ok"
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "result": {
              "$ref": "#/$defs/BatchCheckResults"
            }
          }
        }
      },
      {
        "if": {
          "allOf": [
            {
              "$ref": "#/$defs/ContractV2Marker"
            },
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "resolve_listing"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                }
              }
            }
          ]
        },
        "then": {
          "allOf": [
            {
              "if": {
                "properties": {
                  "status": {
                    "const": "ok"
                  }
                }
              },
              "then": {
                "properties": {
                  "status": {
                    "const": "ambiguous"
                  }
                }
              }
            }
          ],
          "properties": {
            "candidates": {
              "items": {
                "$ref": "#/$defs/ListingCandidate"
              },
              "type": "array"
            },
            "query": {
              "properties": {
                "resolved": {
                  "type": "null"
                }
              }
            },
            "result": {
              "type": "null"
            }
          }
        }
      },
      {
        "if": {
          "anyOf": [
            {
              "properties": {
                "meta": {
                  "properties": {
                    "operation": {
                      "const": "resolve_listing"
                    }
                  },
                  "required": [
                    "operation"
                  ]
                }
              },
              "required": [
                "meta"
              ]
            },
            {
              "properties": {
                "query": {
                  "properties": {
                    "kind": {
                      "const": "listing"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                }
              },
              "required": [
                "query"
              ]
            },
            {
              "properties": {
                "query": {
                  "properties": {
                    "input": {
                      "required": [
                        "listing_url"
                      ]
                    }
                  },
                  "required": [
                    "input"
                  ]
                }
              },
              "required": [
                "query"
              ]
            }
          ]
        },
        "then": {
          "properties": {
            "candidates": {
              "items": {
                "$ref": "#/$defs/ListingCandidate"
              },
              "type": "array"
            },
            "meta": {
              "properties": {
                "operation": {
                  "const": "resolve_listing"
                }
              },
              "required": [
                "operation"
              ]
            },
            "query": {
              "properties": {
                "input": {
                  "$ref": "#/$defs/ListingResolveRequest"
                },
                "kind": {
                  "const": "listing"
                },
                "resolved": {
                  "type": "null"
                }
              },
              "required": [
                "kind"
              ]
            },
            "result": {
              "type": "null"
            },
            "status": {
              "enum": [
                "ambiguous",
                "not_found",
                "error",
                "not_covered"
              ]
            }
          }
        }
      },
      {
        "if": {
          "anyOf": [
            {
              "properties": {
                "query": {
                  "properties": {
                    "kind": {
                      "const": "search"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                }
              },
              "required": [
                "query"
              ]
            },
            {
              "properties": {
                "query": {
                  "properties": {
                    "input": {
                      "required": [
                        "filters"
                      ]
                    }
                  }
                }
              }
            }
          ]
        },
        "then": {
          "properties": {
            "meta": {
              "properties": {
                "operation": {
                  "const": "search"
                }
              },
              "required": [
                "operation"
              ]
            },
            "query": {
              "properties": {
                "input": {
                  "$ref": "#/$defs/SearchRequestV2"
                },
                "kind": {
                  "const": "search"
                }
              },
              "required": [
                "kind"
              ]
            }
          }
        }
      }
    ],
    "properties": {
      "auth": {
        "$ref": "#/$defs/Auth"
      },
      "billing": {
        "$ref": "#/$defs/Billing"
      },
      "candidates": {
        "items": {
          "oneOf": [
            {
              "$ref": "#/$defs/Candidate"
            },
            {
              "$ref": "#/$defs/ListingCandidate"
            }
          ]
        },
        "type": "array"
      },
      "corpus_coverage": {
        "$ref": "#/$defs/CorpusCoverage"
      },
      "coverage_summary": {
        "additionalProperties": false,
        "properties": {
          "generated_at": {
            "format": "date-time",
            "type": "string"
          },
          "gminas": {
            "minimum": 0,
            "type": "integer"
          },
          "layers": {
            "additionalProperties": false,
            "properties": {
              "buildings": {
                "$ref": "#/$defs/CoverageLayerSummary"
              },
              "flood": {
                "$ref": "#/$defs/CoverageLayerSummary"
              },
              "landslide": {
                "$ref": "#/$defs/CoverageLayerSummary"
              },
              "mpzp": {
                "$ref": "#/$defs/CoverageLayerSummary"
              },
              "parcel": {
                "$ref": "#/$defs/CoverageLayerSummary"
              },
              "pog": {
                "$ref": "#/$defs/CoverageLayerSummary"
              },
              "protected": {
                "$ref": "#/$defs/CoverageLayerSummary"
              },
              "wz": {
                "$ref": "#/$defs/CoverageLayerSummary"
              }
            },
            "required": [
              "parcel",
              "pog",
              "wz",
              "mpzp",
              "flood",
              "landslide",
              "protected",
              "buildings"
            ],
            "type": "object"
          },
          "line": {
            "minLength": 1,
            "type": "string"
          },
          "newest_as_of": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "minLength": 1,
            "type": "string"
          },
          "oldest_as_of": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "unmeasured_layers": {
            "items": {
              "$ref": "#/$defs/LayerKey"
            },
            "type": "array",
            "uniqueItems": true
          },
          "voivodeships": {
            "maximum": 16,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "gminas",
          "voivodeships",
          "oldest_as_of",
          "newest_as_of",
          "layers",
          "unmeasured_layers",
          "generated_at",
          "line",
          "note"
        ],
        "type": "object"
      },
      "error": {
        "oneOf": [
          {
            "type": "null"
          },
          {
            "$ref": "#/$defs/Error"
          }
        ]
      },
      "links": {
        "additionalProperties": {
          "$ref": "#/$defs/Link"
        },
        "properties": {
          "map": {
            "$ref": "#/$defs/Link"
          },
          "sheet": {
            "anyOf": [
              {
                "$ref": "#/$defs/Link"
              },
              {
                "$ref": "#/$defs/SignedLink"
              }
            ]
          },
          "tiles": {
            "$ref": "#/$defs/Link"
          }
        },
        "type": "object"
      },
      "meta": {
        "$ref": "#/$defs/Meta"
      },
      "needs_obreb": {
        "type": "boolean"
      },
      "page": {
        "$ref": "#/$defs/Page"
      },
      "plan": {
        "$ref": "#/$defs/Plan"
      },
      "query": {
        "$ref": "#/$defs/QueryEcho"
      },
      "result": {
        "type": [
          "object",
          "array",
          "null"
        ]
      },
      "search_facets": {
        "$ref": "#/$defs/FeatureSearchFacets"
      },
      "sources": {
        "items": {
          "$ref": "#/$defs/SourceRef"
        },
        "type": "array"
      },
      "status": {
        "$ref": "#/$defs/Status"
      }
    },
    "required": [
      "status",
      "query",
      "result",
      "candidates",
      "sources",
      "billing",
      "error",
      "meta"
    ],
    "type": "object",
    "x-contract-version": "2.0.0"
  },
  "Error": {
    "additionalProperties": false,
    "properties": {
      "code": {
        "enum": [
          "invalid_input",
          "not_found",
          "ambiguous",
          "not_covered",
          "unauthorized",
          "rate_limited",
          "source_unavailable",
          "internal"
        ],
        "type": "string"
      },
      "docs": {
        "type": "string"
      },
      "example_id": {
        "type": [
          "string",
          "null"
        ]
      },
      "field": {
        "type": [
          "string",
          "null"
        ]
      },
      "hint": {
        "minLength": 1,
        "type": "string"
      },
      "message": {
        "type": "string"
      },
      "signup_url": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "code",
      "message",
      "hint",
      "docs"
    ],
    "type": "object"
  },
  "EventTypeV2": {
    "enum": [
      "gunb_permit",
      "plan_general_adopted",
      "mpzp_status_changed",
      "rcn_transaction_aggregate",
      "listing_seen",
      "source_refreshed",
      "coverage_changed"
    ],
    "type": "string"
  },
  "EventV2": {
    "additionalProperties": false,
    "allOf": [
      {
        "if": {
          "properties": {
            "type": {
              "const": "gunb_permit"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "additionalProperties": false,
              "properties": {
                "permit_id": {
                  "minLength": 1,
                  "type": "string"
                },
                "status": {
                  "enum": [
                    "applied",
                    "issued",
                    "refused",
                    "withdrawn"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "permit_id",
                "status"
              ],
              "type": "object"
            }
          },
          "required": [
            "data"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "plan_general_adopted"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "additionalProperties": false,
              "properties": {
                "gmina_teryt": {
                  "pattern": "^[0-9]{6}[123]$",
                  "type": "string"
                },
                "resolution_id": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "gmina_teryt",
                "resolution_id"
              ],
              "type": "object"
            }
          },
          "required": [
            "data"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "mpzp_status_changed"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "additionalProperties": false,
              "allOf": [
                {
                  "if": {
                    "properties": {
                      "status": {
                        "type": "null"
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "effective_from": {
                        "type": "null"
                      }
                    }
                  }
                }
              ],
              "properties": {
                "effective_from": {
                  "anyOf": [
                    {
                      "format": "date",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "plan_id": {
                  "minLength": 1,
                  "type": "string"
                },
                "status": {
                  "$ref": "#/$defs/MpzpStatus"
                }
              },
              "required": [
                "plan_id",
                "status",
                "effective_from"
              ],
              "type": "object"
            }
          },
          "required": [
            "data"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "rcn_transaction_aggregate"
            }
          }
        },
        "then": {
          "not": {
            "required": [
              "parcel_ids"
            ]
          },
          "properties": {
            "data": {
              "$ref": "#/$defs/RcnAggregate"
            }
          },
          "required": [
            "data",
            "area"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "source_refreshed"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "additionalProperties": false,
              "properties": {
                "layer_version": {
                  "minLength": 1,
                  "type": "string"
                },
                "source_id": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "source_id",
                "layer_version"
              ],
              "type": "object"
            }
          },
          "required": [
            "data"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "coverage_changed"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "additionalProperties": false,
              "properties": {
                "after": {
                  "$ref": "#/$defs/Coverage"
                },
                "before": {
                  "$ref": "#/$defs/Coverage"
                },
                "layer": {
                  "$ref": "#/$defs/LayerKey"
                }
              },
              "required": [
                "layer",
                "before",
                "after"
              ],
              "type": "object"
            }
          },
          "required": [
            "data"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "listing_seen"
            }
          }
        },
        "then": {
          "not": {
            "anyOf": [
              {
                "required": [
                  "area"
                ]
              },
              {
                "required": [
                  "data"
                ]
              }
            ]
          },
          "required": [
            "parcel_ids"
          ]
        }
      }
    ],
    "oneOf": [
      {
        "not": {
          "required": [
            "area"
          ]
        },
        "required": [
          "parcel_ids"
        ]
      },
      {
        "not": {
          "required": [
            "parcel_ids"
          ]
        },
        "required": [
          "area"
        ]
      }
    ],
    "properties": {
      "area": {
        "$ref": "#/$defs/SearchArea"
      },
      "as_of": {
        "anyOf": [
          {
            "format": "date",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "data": {},
      "id": {
        "minLength": 1,
        "type": "string"
      },
      "observed_at": {
        "format": "date-time",
        "type": "string"
      },
      "occurred_at": {
        "anyOf": [
          {
            "format": "date-time",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "parcel_ids": {
        "items": {
          "$ref": "#/$defs/ParcelId"
        },
        "maxItems": 10000,
        "minItems": 1,
        "type": "array",
        "uniqueItems": true
      },
      "source": {
        "$ref": "#/$defs/SourceRef"
      },
      "type": {
        "$ref": "#/$defs/EventTypeV2"
      }
    },
    "required": [
      "id",
      "type",
      "occurred_at",
      "observed_at",
      "source",
      "as_of"
    ],
    "type": "object"
  },
  "EventsRequestV2": {
    "additionalProperties": false,
    "oneOf": [
      {
        "not": {
          "required": [
            "parcel_ids"
          ]
        },
        "required": [
          "area"
        ]
      },
      {
        "not": {
          "required": [
            "area"
          ]
        },
        "required": [
          "parcel_ids"
        ]
      }
    ],
    "properties": {
      "area": {
        "$ref": "#/$defs/SearchArea"
      },
      "cursor": {
        "anyOf": [
          {
            "minLength": 1,
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "limit": {
        "maximum": 1000,
        "minimum": 1,
        "type": "integer"
      },
      "parcel_ids": {
        "items": {
          "$ref": "#/$defs/ParcelId"
        },
        "maxItems": 10000,
        "minItems": 1,
        "type": "array",
        "uniqueItems": true
      },
      "since": {
        "format": "date-time",
        "type": "string"
      },
      "types": {
        "items": {
          "$ref": "#/$defs/EventTypeV2"
        },
        "minItems": 1,
        "type": "array",
        "uniqueItems": true
      }
    },
    "required": [],
    "type": "object"
  },
  "ExportV2": {
    "additionalProperties": false,
    "properties": {
      "format": {
        "enum": [
          "csv",
          "geojson"
        ],
        "type": "string"
      },
      "link": {
        "$ref": "#/$defs/SignedLink"
      },
      "rows": {
        "maximum": 2000,
        "minimum": 0,
        "type": "integer"
      }
    },
    "required": [
      "format",
      "rows",
      "link"
    ],
    "type": "object"
  },
  "FeatureAnswer": {
    "additionalProperties": false,
    "allOf": [
      {
        "if": {
          "properties": {
            "coverage": {
              "enum": [
                "not_covered",
                "not_computed"
              ]
            }
          }
        },
        "then": {
          "properties": {
            "value": {
              "type": "null"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "coverage": {
              "enum": [
                "covered",
                "covered_no_data"
              ]
            }
          }
        },
        "then": {
          "properties": {
            "as_of": {
              "format": "date",
              "type": "string"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "coverage": {
              "const": "covered"
            }
          }
        },
        "then": {
          "properties": {
            "value": {
              "not": {
                "type": "null"
              }
            }
          }
        }
      }
    ],
    "properties": {
      "as_of": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "coverage": {
        "$ref": "#/$defs/Coverage"
      },
      "method": {
        "minLength": 1,
        "type": "string"
      },
      "note": {
        "minLength": 1,
        "type": "string"
      },
      "source": {
        "$ref": "#/$defs/SourceRef"
      },
      "sources": {
        "items": {
          "$ref": "#/$defs/SourceRef"
        },
        "minItems": 1,
        "type": "array"
      },
      "unit": {
        "type": [
          "string",
          "null"
        ]
      },
      "value": {}
    },
    "required": [
      "value",
      "unit",
      "source",
      "as_of",
      "method",
      "coverage",
      "note"
    ],
    "type": "object"
  },
  "FeatureFilterFacet": {
    "additionalProperties": false,
    "properties": {
      "coverage_semantics": {
        "const": "unknown_excluded_and_counted; independent_scope_before_other_filters_and_pagination"
      },
      "excluded_known": {
        "minimum": 0,
        "type": "integer"
      },
      "excluded_unknown": {
        "minimum": 0,
        "type": "integer"
      },
      "matched": {
        "minimum": 0,
        "type": "integer"
      }
    },
    "required": [
      "matched",
      "excluded_unknown",
      "excluded_known",
      "coverage_semantics"
    ],
    "type": "object"
  },
  "FeatureSearchFacets": {
    "additionalProperties": false,
    "properties": {
      "filters": {
        "additionalProperties": {
          "$ref": "#/$defs/FeatureFilterFacet"
        },
        "propertyNames": {
          "enum": [
            "area_min_m2",
            "area_max_m2",
            "land_use_class",
            "shape_regularity_min",
            "frontage_min_m",
            "road_access",
            "buildings_present",
            "public_road_max_m",
            "rcn_price_min_pln_m2",
            "rcn_price_max_pln_m2",
            "gunb_activity_min",
            "pog_zone_class"
          ]
        },
        "type": "object"
      },
      "matched_count": {
        "minimum": 0,
        "type": "integer"
      },
      "scope_count": {
        "minimum": 0,
        "type": "integer"
      }
    },
    "required": [
      "scope_count",
      "matched_count",
      "filters"
    ],
    "type": "object"
  },
  "JobQuery": {
    "additionalProperties": false,
    "properties": {
      "cursor": {
        "minLength": 1,
        "type": [
          "string",
          "null"
        ]
      },
      "job_id": {
        "pattern": "^check_[A-Za-z0-9_-]+$",
        "type": "string"
      },
      "limit": {
        "maximum": 1000,
        "minimum": 1,
        "type": "integer"
      }
    },
    "required": [
      "job_id"
    ],
    "type": "object"
  },
  "LayerAnswer": {
    "additionalProperties": false,
    "allOf": [
      {
        "else": {
          "properties": {
            "value": {
              "type": "object"
            }
          }
        },
        "if": {
          "properties": {
            "coverage": {
              "enum": [
                "not_covered",
                "not_computed"
              ]
            }
          }
        },
        "then": {
          "properties": {
            "value": {
              "type": "null"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "coverage": {
              "enum": [
                "covered",
                "covered_no_data"
              ]
            },
            "layer": {
              "const": "mpzp"
            }
          }
        },
        "then": {
          "properties": {
            "value": {
              "$ref": "#/$defs/MpzpValue"
            }
          }
        }
      }
    ],
    "properties": {
      "as_of": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "basis": {
        "type": [
          "string",
          "null"
        ]
      },
      "confidence": {
        "maximum": 1,
        "minimum": 0,
        "type": "number"
      },
      "coverage": {
        "$ref": "#/$defs/Coverage"
      },
      "hash": {
        "type": [
          "string",
          "null"
        ]
      },
      "layer": {
        "$ref": "#/$defs/LayerKey"
      },
      "layer_version": {
        "type": "string"
      },
      "licence": {
        "$ref": "#/$defs/Licence"
      },
      "method": {
        "$ref": "#/$defs/Method"
      },
      "note": {
        "minLength": 1,
        "type": "string"
      },
      "scope": {
        "$ref": "#/$defs/Scope"
      },
      "source": {
        "$ref": "#/$defs/SourceRef"
      },
      "threshold": {
        "maximum": 1,
        "minimum": 0,
        "type": "number"
      },
      "value": {
        "type": [
          "object",
          "null"
        ]
      }
    },
    "required": [
      "layer",
      "coverage",
      "value",
      "note",
      "source",
      "as_of",
      "layer_version"
    ],
    "type": "object"
  },
  "LayerAnswerV2": {
    "allOf": [
      {
        "$ref": "#/$defs/LayerAnswer"
      },
      {
        "required": [
          "licence",
          "scope",
          "method"
        ]
      },
      {
        "if": {
          "properties": {
            "method": {
              "const": "extracted"
            }
          },
          "required": [
            "method"
          ]
        },
        "then": {
          "required": [
            "confidence",
            "threshold"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "coverage": {
              "enum": [
                "covered",
                "covered_no_data"
              ]
            },
            "layer": {
              "const": "prices"
            }
          }
        },
        "then": {
          "properties": {
            "value": {
              "$ref": "#/$defs/RcnAggregate"
            }
          }
        }
      }
    ]
  },
  "LayerKey": {
    "enum": [
      "parcel",
      "admin",
      "address",
      "buildings",
      "planning",
      "pog",
      "wz",
      "mpzp",
      "flood",
      "landslide",
      "protected",
      "road_access",
      "permits",
      "prices",
      "soil"
    ],
    "type": "string"
  },
  "Licence": {
    "additionalProperties": false,
    "properties": {
      "approved_at": {
        "const": "2026-10-16"
      },
      "approved_by": {
        "const": "operator"
      },
      "attribution": {
        "minLength": 1,
        "type": "string"
      },
      "position": {
        "enum": [
          "cc0",
          "cc_by_4_0",
          "local_law_no_copyright",
          "open_data",
          "own_computation",
          "statutory_open_data"
        ],
        "type": "string"
      },
      "review_ref": {
        "minLength": 1,
        "type": "string"
      },
      "terms_url": {
        "anyOf": [
          {
            "format": "uri",
            "pattern": "^https://",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "position",
      "attribution",
      "terms_url",
      "review_ref"
    ],
    "type": "object"
  },
  "Link": {
    "additionalProperties": false,
    "properties": {
      "cost": {
        "minimum": 0,
        "type": "integer"
      },
      "href": {
        "type": "string"
      }
    },
    "required": [
      "href",
      "cost"
    ],
    "type": "object"
  },
  "ListingCandidate": {
    "additionalProperties": false,
    "properties": {
      "distance_m": {
        "minimum": 0,
        "type": "number"
      },
      "parcel_id": {
        "$ref": "#/$defs/ParcelId"
      },
      "reason": {
        "maxLength": 500,
        "minLength": 1,
        "type": "string"
      },
      "score": {
        "maximum": 1,
        "minimum": 0,
        "type": "number"
      }
    },
    "required": [
      "parcel_id",
      "score",
      "reason",
      "distance_m"
    ],
    "type": "object"
  },
  "ListingResolveRequest": {
    "additionalProperties": false,
    "properties": {
      "listing_url": {
        "format": "uri",
        "maxLength": 2048,
        "pattern": "^https://",
        "type": "string"
      }
    },
    "required": [
      "listing_url"
    ],
    "type": "object"
  },
  "LonLat": {
    "items": {
      "type": "number"
    },
    "maxItems": 2,
    "minItems": 2,
    "type": "array"
  },
  "Meta": {
    "additionalProperties": false,
    "properties": {
      "api_version": {
        "const": "v1",
        "type": "string"
      },
      "calls": {
        "minimum": 1,
        "type": "integer"
      },
      "contract_version": {
        "const": "2.0.0"
      },
      "disclaimer": {
        "type": [
          "string",
          "null"
        ]
      },
      "etag": {
        "type": [
          "string",
          "null"
        ]
      },
      "excluded": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "generated_at": {
        "format": "date-time",
        "type": "string"
      },
      "operation": {
        "enum": [
          "parcel",
          "layer",
          "check",
          "resolve",
          "resolve_listing",
          "search",
          "events",
          "check_batch",
          "check_job",
          "check_results",
          "sources",
          "planning"
        ],
        "type": "string"
      },
      "request_id": {
        "type": "string"
      }
    },
    "required": [
      "request_id",
      "api_version",
      "generated_at",
      "calls"
    ],
    "type": "object"
  },
  "Method": {
    "enum": [
      "official",
      "derived",
      "computed",
      "extracted"
    ],
    "type": "string"
  },
  "MpzpStatus": {
    "anyOf": [
      {
        "$ref": "#/$defs/PlanStatus"
      },
      {
        "type": "null"
      }
    ]
  },
  "MpzpValue": {
    "allOf": [
      {
        "if": {
          "properties": {
            "status": {
              "type": "null"
            }
          }
        },
        "then": {
          "properties": {
            "effective_from": {
              "type": "null"
            }
          }
        }
      }
    ],
    "properties": {
      "effective_from": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "plans": {
        "items": {
          "type": "object"
        },
        "type": "array"
      },
      "status": {
        "$ref": "#/$defs/MpzpStatus"
      },
      "symbol": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "status",
      "symbol",
      "plans",
      "effective_from"
    ],
    "type": "object"
  },
  "NoQueryInput": {
    "not": {
      "anyOf": [
        {
          "required": [
            "q"
          ]
        },
        {
          "required": [
            "id"
          ]
        },
        {
          "required": [
            "point"
          ]
        },
        {
          "required": [
            "lat"
          ]
        },
        {
          "required": [
            "lng"
          ]
        }
      ]
    },
    "type": "object"
  },
  "Page": {
    "additionalProperties": false,
    "properties": {
      "has_more": {
        "type": "boolean"
      },
      "limit": {
        "maximum": 1000,
        "minimum": 1,
        "type": "integer"
      },
      "next_cursor": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "limit",
      "has_more",
      "next_cursor"
    ],
    "type": "object"
  },
  "ParcelFeatures": {
    "additionalProperties": false,
    "properties": {
      "access_and_roads": {
        "additionalProperties": false,
        "properties": {
          "frontage_m": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_dr_parcels",
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "m"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "public_road_distance_m": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "bdot_roads"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "m"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "road_access": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "bdot_roads",
                          "egib_dr_parcels",
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": null
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          }
        },
        "required": [
          "public_road_distance_m",
          "road_access",
          "frontage_m"
        ],
        "type": "object"
      },
      "amenities": {
        "additionalProperties": false,
        "properties": {},
        "required": [],
        "type": "object"
      },
      "buildings_and_surroundings": {
        "additionalProperties": false,
        "properties": {
          "building_count": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_buildings"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "count"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "building_coverage_pct": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_buildings"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "percent"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "maximum": 100,
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "building_footprint_m2": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_buildings"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "m2"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "buildings_500m": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_buildings"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "count"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "buildings_present": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_buildings"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": null
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          }
        },
        "required": [
          "buildings_present",
          "building_count",
          "building_footprint_m2",
          "building_coverage_pct",
          "buildings_500m"
        ],
        "type": "object"
      },
      "development_activity": {
        "additionalProperties": false,
        "properties": {
          "gunb_activity_500m": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "gunb_permits"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "count_min"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "gunb_activity_gmina": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "gunb_permits"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "count"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          }
        },
        "required": [
          "gunb_activity_gmina",
          "gunb_activity_500m"
        ],
        "type": "object"
      },
      "land_use": {
        "additionalProperties": false,
        "properties": {
          "land_use_classes": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": null
                  },
                  "value": {
                    "anyOf": [
                      {
                        "items": {
                          "pattern": "^[A-Za-zŁłŻż]{1,5}(?:[IVX]{1,4}[ab]?)?$",
                          "type": "string"
                        },
                        "maxItems": 100,
                        "type": "array",
                        "uniqueItems": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "pog_zone_class": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "pog_sweep",
                          "pog_zones"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": null
                  },
                  "value": {
                    "anyOf": [
                      {
                        "enum": [
                          "SW",
                          "SJ",
                          "SN",
                          "SU",
                          "SH",
                          "SI",
                          "SZ",
                          "SC",
                          "SG",
                          "SO",
                          "SR",
                          "SK",
                          "SP"
                        ],
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          }
        },
        "required": [
          "land_use_classes",
          "pog_zone_class"
        ],
        "type": "object"
      },
      "prices_nearby": {
        "additionalProperties": false,
        "properties": {
          "rcn_gmina_median_pln_m2": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "rcn_clean_agg"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "PLN/m2"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "multipleOf": 50,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "rcn_gmina_sales_count": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "rcn_clean_agg"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "count"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 6,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          }
        },
        "required": [
          "rcn_gmina_median_pln_m2",
          "rcn_gmina_sales_count"
        ],
        "type": "object"
      },
      "shape_and_size": {
        "additionalProperties": false,
        "properties": {
          "area_geometry_m2": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "m2"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "area_official_m2": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "m2"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "elongation": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "ratio"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 1,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "perimeter_m": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "m"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "shape_regularity": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "ratio"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "maximum": 1,
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "squareness": {
            "allOf": [
              {
                "$ref": "#/$defs/FeatureAnswer"
              },
              {
                "properties": {
                  "source": {
                    "properties": {
                      "id": {
                        "enum": [
                          "egib_parcels"
                        ]
                      }
                    }
                  },
                  "unit": {
                    "const": "ratio"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "maximum": 1,
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          }
        },
        "required": [
          "area_official_m2",
          "area_geometry_m2",
          "perimeter_m",
          "shape_regularity",
          "squareness",
          "elongation"
        ],
        "type": "object"
      }
    },
    "required": [
      "shape_and_size",
      "access_and_roads",
      "land_use",
      "buildings_and_surroundings",
      "prices_nearby",
      "development_activity",
      "amenities"
    ],
    "type": "object"
  },
  "ParcelId": {
    "maxLength": 100,
    "pattern": "^[0-9]{6}_[0-9]\\.[0-9]{1,4}\\.(?=[^\\n]{1,64}$)(?:[0-9A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u024F_./ -]*\\.)?[0-9A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u024F_/]+$",
    "type": "string"
  },
  "ParcelIdInput": {
    "maxLength": 100,
    "pattern": "^\\s*[0-9]{6}[._][0-9]\\.[0-9]{1,4}\\.[0-9A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u024F_./ -]{0,63}[0-9A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u024F_./-]\\s*$",
    "type": "string"
  },
  "ParcelRecordV2": {
    "additionalProperties": false,
    "properties": {
      "adjacent_parcel_ids": {
        "items": {
          "$ref": "#/$defs/ParcelId"
        },
        "maxItems": 50,
        "type": "array",
        "uniqueItems": true
      },
      "adjacent_parcel_ids_truncated": {
        "type": "boolean"
      },
      "admin": {
        "additionalProperties": false,
        "properties": {
          "admin_gmina_teryt": {
            "type": [
              "string",
              "null"
            ]
          },
          "gmina_name": {
            "type": "string"
          },
          "gmina_teryt": {
            "type": "string"
          },
          "gmina_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "string"
          },
          "obreb_id": {
            "type": "string"
          },
          "obreb_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "powiat_name": {
            "type": "string"
          },
          "voivodeship": {
            "type": "string"
          },
          "voivodeship_name": {
            "type": "string"
          }
        },
        "required": [
          "voivodeship",
          "gmina_teryt",
          "gmina_name",
          "obreb_id",
          "number"
        ],
        "type": "object"
      },
      "area": {
        "$ref": "#/$defs/AreaV2"
      },
      "centroid": {
        "$ref": "#/$defs/LonLat"
      },
      "display_geometry": {
        "additionalProperties": false,
        "properties": {
          "coordinates": {
            "items": {
              "items": {
                "items": {
                  "$ref": "#/$defs/LonLat"
                },
                "type": "array"
              },
              "type": "array"
            },
            "type": "array"
          },
          "type": {
            "const": "MultiPolygon"
          }
        },
        "required": [
          "type",
          "coordinates"
        ],
        "type": "object"
      },
      "display_simplified": {
        "const": true
      },
      "features": {
        "$ref": "#/$defs/ParcelFeatures"
      },
      "geometry": {
        "additionalProperties": false,
        "properties": {
          "coordinates": {
            "items": {
              "items": {
                "items": {
                  "$ref": "#/$defs/LonLat"
                },
                "type": "array"
              },
              "type": "array"
            },
            "type": "array"
          },
          "type": {
            "const": "MultiPolygon"
          }
        },
        "required": [
          "type",
          "coordinates"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "id": {
        "$ref": "#/$defs/ParcelId"
      },
      "layers": {
        "additionalProperties": {
          "$ref": "#/$defs/LayerAnswerV2"
        },
        "propertyNames": {
          "enum": [
            "parcel",
            "admin",
            "address",
            "buildings",
            "planning",
            "pog",
            "wz",
            "mpzp",
            "flood",
            "landslide",
            "protected",
            "road_access",
            "permits",
            "prices",
            "soil"
          ]
        },
        "type": "object"
      },
      "record_as_of": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "record_hash": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "id",
      "admin",
      "area",
      "layers",
      "record_hash"
    ],
    "type": "object"
  },
  "Plan": {
    "enum": [
      "free",
      "start",
      "pro",
      "team",
      "developer",
      "platform"
    ],
    "type": "string"
  },
  "PlanStatus": {
    "enum": [
      "draft",
      "adopted",
      "in_force",
      "none"
    ],
    "type": "string"
  },
  "QueryEcho": {
    "additionalProperties": false,
    "allOf": [
      {
        "if": {
          "not": {
            "required": [
              "kind"
            ]
          }
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/QueryInput"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "q"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/QueryInput",
              "required": [
                "q"
              ]
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "id"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/QueryInput",
              "required": [
                "id"
              ]
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "point"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/QueryInput",
              "anyOf": [
                {
                  "required": [
                    "point"
                  ]
                },
                {
                  "required": [
                    "lat",
                    "lng"
                  ]
                }
              ]
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "enum": [
                "none",
                "bbox",
                "polygon",
                "path"
              ]
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/NoQueryInput"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "bbox"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "required": [
                "bbox"
              ]
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "polygon"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "required": [
                "polygon"
              ]
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "path"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "required": [
                "teryt"
              ]
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "batch"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "properties": {
                "items": {
                  "maxItems": 1000,
                  "minItems": 1,
                  "type": "array"
                }
              },
              "required": [
                "items"
              ]
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "search"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/SearchRequestV2"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "events"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/EventsRequestV2"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "listing"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/ListingResolveRequest"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "check_batch"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/BatchCheckRequest"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "kind": {
              "const": "job"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "input": {
              "$ref": "#/$defs/JobQuery"
            }
          }
        }
      }
    ],
    "properties": {
      "input": {
        "additionalProperties": true,
        "type": "object"
      },
      "kind": {
        "enum": [
          "q",
          "id",
          "point",
          "none",
          "bbox",
          "polygon",
          "path",
          "batch",
          "invalid",
          "search",
          "events",
          "listing",
          "check_batch",
          "job"
        ],
        "type": "string"
      },
      "resolved": {
        "oneOf": [
          {
            "type": "null"
          },
          {
            "additionalProperties": false,
            "properties": {
              "confidence": {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "from": {
                "enum": [
                  "q",
                  "id",
                  "point"
                ],
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "method": {
                "enum": [
                  "exact_id",
                  "normalised_id",
                  "text_parcel",
                  "text_parcel_fuzzy",
                  "text_address",
                  "text_gmina",
                  "point_in_polygon"
                ],
                "type": "string"
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "from",
              "method",
              "id",
              "confidence"
            ],
            "type": "object"
          }
        ]
      }
    },
    "required": [
      "input",
      "resolved"
    ],
    "type": "object"
  },
  "QueryInput": {
    "oneOf": [
      {
        "not": {
          "anyOf": [
            {
              "required": [
                "id"
              ]
            },
            {
              "required": [
                "point"
              ]
            },
            {
              "required": [
                "lat"
              ]
            },
            {
              "required": [
                "lng"
              ]
            }
          ]
        },
        "required": [
          "q"
        ]
      },
      {
        "not": {
          "anyOf": [
            {
              "required": [
                "q"
              ]
            },
            {
              "required": [
                "point"
              ]
            },
            {
              "required": [
                "lat"
              ]
            },
            {
              "required": [
                "lng"
              ]
            }
          ]
        },
        "required": [
          "id"
        ]
      },
      {
        "not": {
          "anyOf": [
            {
              "required": [
                "q"
              ]
            },
            {
              "required": [
                "id"
              ]
            },
            {
              "required": [
                "lat"
              ]
            },
            {
              "required": [
                "lng"
              ]
            }
          ]
        },
        "required": [
          "point"
        ]
      },
      {
        "not": {
          "anyOf": [
            {
              "required": [
                "q"
              ]
            },
            {
              "required": [
                "id"
              ]
            },
            {
              "required": [
                "point"
              ]
            }
          ]
        },
        "required": [
          "lat",
          "lng"
        ]
      }
    ],
    "properties": {
      "id": {
        "$ref": "#/$defs/ParcelIdInput"
      },
      "lat": {
        "maximum": 55.0,
        "minimum": 49.0,
        "type": "number"
      },
      "lng": {
        "maximum": 24.5,
        "minimum": 14.0,
        "type": "number"
      },
      "point": {
        "pattern": "^-?[0-9]{1,2}(\\.[0-9]+)?, ?-?[0-9]{1,3}(\\.[0-9]+)?$",
        "type": "string"
      },
      "q": {
        "maxLength": 300,
        "minLength": 1,
        "type": "string"
      }
    },
    "type": "object"
  },
  "RcnAggregate": {
    "additionalProperties": false,
    "allOf": [
      {
        "else": {
          "properties": {
            "unit_id": {
              "pattern": "^[0-9]{6}_[0-9]\\.[0-9]{1,4}$",
              "type": "string"
            }
          }
        },
        "if": {
          "properties": {
            "scope": {
              "const": "gmina"
            }
          }
        },
        "then": {
          "properties": {
            "unit_id": {
              "pattern": "^[0-9]{6}[123]$",
              "type": "string"
            }
          }
        }
      }
    ],
    "properties": {
      "count": {
        "minimum": 6,
        "type": "integer"
      },
      "k_floor": {
        "const": 6
      },
      "median_price_m2": {
        "minimum": 0,
        "multipleOf": 50,
        "type": "number"
      },
      "scope": {
        "enum": [
          "obreb",
          "gmina"
        ],
        "type": "string"
      },
      "unit_id": {
        "minLength": 1,
        "type": "string"
      },
      "vintage": {
        "format": "date",
        "type": "string"
      }
    },
    "required": [
      "count",
      "k_floor",
      "median_price_m2",
      "scope",
      "unit_id",
      "vintage"
    ],
    "type": "object"
  },
  "Scope": {
    "enum": [
      "parcel_polygon",
      "point",
      "obreb",
      "gmina",
      "grid"
    ],
    "type": "string"
  },
  "SearchArea": {
    "oneOf": [
      {
        "$ref": "#/$defs/TerytArea"
      },
      {
        "$ref": "#/$defs/SearchPolygon"
      }
    ]
  },
  "SearchFilterEvidence": {
    "additionalProperties": false,
    "properties": {
      "as_of": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "coverage": {
        "$ref": "#/$defs/Coverage"
      },
      "note": {
        "minLength": 1,
        "type": "string"
      },
      "scope": {
        "$ref": "#/$defs/Scope"
      },
      "source": {
        "$ref": "#/$defs/SourceRef"
      },
      "value": {
        "type": [
          "boolean",
          "number",
          "string",
          "null"
        ]
      }
    },
    "required": [
      "coverage",
      "value",
      "source",
      "as_of",
      "scope",
      "note"
    ],
    "type": "object"
  },
  "SearchFilters": {
    "additionalProperties": false,
    "properties": {
      "area_m2": {
        "additionalProperties": false,
        "properties": {
          "max": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "min": {
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [],
        "type": "object"
      },
      "building_present": {
        "type": "boolean"
      },
      "no_nature_protection": {
        "type": "boolean"
      },
      "outside_flood_q100": {
        "type": "boolean"
      },
      "plan_general_zones": {
        "items": {
          "minLength": 1,
          "type": "string"
        },
        "maxItems": 100,
        "minItems": 1,
        "type": "array",
        "uniqueItems": true
      },
      "public_road_access": {
        "type": "boolean"
      }
    },
    "required": [],
    "type": "object"
  },
  "SearchPolygon": {
    "additionalProperties": false,
    "properties": {
      "coordinates": {
        "items": {
          "items": {
            "items": {
              "type": "number"
            },
            "maxItems": 2,
            "minItems": 2,
            "type": "array"
          },
          "maxItems": 512,
          "minItems": 4,
          "type": "array"
        },
        "maxItems": 1,
        "minItems": 1,
        "type": "array"
      },
      "type": {
        "const": "Polygon"
      }
    },
    "required": [
      "type",
      "coordinates"
    ],
    "type": "object"
  },
  "SearchRequestV2": {
    "additionalProperties": false,
    "properties": {
      "area": {
        "$ref": "#/$defs/SearchArea"
      },
      "cursor": {
        "anyOf": [
          {
            "maxLength": 2048,
            "minLength": 1,
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "filters": {
        "$ref": "#/$defs/SearchFilters"
      },
      "format": {
        "enum": [
          "csv",
          "geojson"
        ],
        "type": "string"
      },
      "limit": {
        "maximum": 1000,
        "minimum": 1,
        "type": "integer"
      }
    },
    "required": [
      "area"
    ],
    "type": "object",
    "x-runtime-supported": false
  },
  "SearchResultV2": {
    "additionalProperties": false,
    "properties": {
      "export": {
        "$ref": "#/$defs/ExportV2"
      },
      "items": {
        "items": {
          "additionalProperties": false,
          "properties": {
            "address": {
              "type": [
                "string",
                "null"
              ]
            },
            "admin_gmina_teryt": {
              "type": [
                "string",
                "null"
              ]
            },
            "area_official_m2": {
              "type": [
                "number",
                "null"
              ]
            },
            "centroid": {
              "$ref": "#/$defs/LonLat"
            },
            "distance_m": {
              "type": [
                "number",
                "null"
              ]
            },
            "filter_evidence": {
              "additionalProperties": false,
              "properties": {
                "area_m2": {
                  "$ref": "#/$defs/SearchFilterEvidence"
                },
                "building_present": {
                  "$ref": "#/$defs/SearchFilterEvidence"
                },
                "no_nature_protection": {
                  "$ref": "#/$defs/SearchFilterEvidence"
                },
                "outside_flood_q100": {
                  "$ref": "#/$defs/SearchFilterEvidence"
                },
                "plan_general_zones": {
                  "$ref": "#/$defs/SearchFilterEvidence"
                },
                "public_road_access": {
                  "$ref": "#/$defs/SearchFilterEvidence"
                }
              },
              "type": "object"
            },
            "flags": {
              "additionalProperties": false,
              "properties": {
                "building_present": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "no_nature_protection": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "outside_flood_q100": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "plan_general_zone_match": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_road_access": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "outside_flood_q100",
                "no_nature_protection",
                "plan_general_zone_match",
                "public_road_access",
                "building_present"
              ],
              "type": "object"
            },
            "gmina_name": {
              "type": "string"
            },
            "gmina_teryt": {
              "type": "string"
            },
            "id": {
              "$ref": "#/$defs/ParcelId"
            },
            "number": {
              "type": "string"
            },
            "obreb_id": {
              "type": "string"
            },
            "obreb_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "powiat_name": {
              "type": "string"
            },
            "voivodeship": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "gmina_teryt",
            "gmina_name",
            "obreb_name",
            "number",
            "centroid",
            "flags"
          ],
          "type": "object"
        },
        "maxItems": 1000,
        "type": "array"
      },
      "page": {
        "$ref": "#/$defs/Page"
      }
    },
    "required": [
      "items",
      "page"
    ],
    "type": "object"
  },
  "SignedLink": {
    "additionalProperties": false,
    "properties": {
      "cost": {
        "minimum": 0,
        "type": "integer"
      },
      "expires_at": {
        "format": "date-time",
        "type": "string"
      },
      "href": {
        "format": "uri",
        "pattern": "^https://",
        "type": "string"
      }
    },
    "required": [
      "href",
      "cost",
      "expires_at"
    ],
    "type": "object"
  },
  "SourceRef": {
    "additionalProperties": false,
    "properties": {
      "as_of": {
        "format": "date",
        "type": [
          "string",
          "null"
        ]
      },
      "attribution": {
        "type": "string"
      },
      "fallback": {
        "type": "boolean"
      },
      "id": {
        "type": "string"
      },
      "licence": {
        "type": "string"
      },
      "publisher": {
        "type": "string"
      },
      "title": {
        "type": "string"
      },
      "url": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "id",
      "title",
      "attribution",
      "as_of"
    ],
    "type": "object"
  },
  "Status": {
    "enum": [
      "ok",
      "ambiguous",
      "not_found",
      "not_covered",
      "error"
    ],
    "type": "string"
  },
  "TerytArea": {
    "oneOf": [
      {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "powiat"
          },
          "teryt": {
            "pattern": "^[0-9]{4}$",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "teryt"
        ],
        "type": "object"
      },
      {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "gmina"
          },
          "teryt": {
            "pattern": "^[0-9]{6}[123]$",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "teryt"
        ],
        "type": "object"
      }
    ]
  }
}

Tool descriptions (verbatim)

check

Sprawdź jedną działkę: nazwane sprawdzenia, źródła, zakres danych i osadzona karta. Przekazuj niepewność; nigdy nie stwierdzaj prawa do zabudowy. Zadania dla portfela i odpytywanie o zadania są niedostępne.

events

Pobierz zmiany dotyczące działek lub obszaru ze źródłami i datami, używając types, since i cursor. Większe listy parcel_ids przekaż w treści POST (do 10 000); GET dopuszcza 100 identyfikatorów. Zdarzenia RCN zawierają tylko zaokrąglone dane zbiorcze grup transakcji. Zdarzenia dotyczące ogłoszeń zawierają identyfikatory działek bez treści ogłoszenia.

layer

Pobierz wskazaną kategorię danych na podstawie q, id albo point. Odczytuj łącznie coverage, source, as_of i note. Opłaty za not_covered i not_computed są zwracane; covered_no_data oznacza brak rekordu potwierdzony przez źródło. Nie wnioskuj o braku obiektu ani o statusie prawnym z niedostępnych danych.

parcel

Pobierz kartę działki na podstawie q, id albo point: identyfikację, powierzchnię i dostępne dane tematyczne ze źródłem, datą, uwagą i zakresem danych. Niewiadome i niedostępne dane są wyraźnie oznaczone. Odczyt kosztuje jeden kredyt; odnośniki służą do opcjonalnych dalszych wywołań.

resolve

Rozpoznaj działki na podstawie q, id albo point. Niejednoznaczne dane zwracają kandydatów do wyboru. Parametr listing_url, dostępny po włączeniu funkcji, zastępuje pozostałe dane wejściowe i zawsze zwraca kandydatów z result=null. Nie kopiuj treści ogłoszenia ani nie wybieraj kandydata bez wiedzy użytkownika.

Wyszukaj według q/id/point, szerokości i długości geograficznej lub bbox do 4 km². Odpowiedź zawiera skróty informacji o działkach i kursor; każda strona kosztuje 1 kredyt. Filtry typowane obszaru i eksport są niedostępne.

Coverage states

Cztery stany zakresu danych dla jednej kategorii w danym miejscu. covered: źródło obejmuje to miejsce i zawiera rekord; value zawiera ten rekord. covered_no_data: źródło obejmuje to miejsce, lecz nie zawiera rekordu; value ma określoną dla danej kategorii pustą wartość (false, 0, [], none), nigdy null; jest to potwierdzony brak rekordu, za który naliczana jest opłata. not_covered: źródło nie obejmuje miejsca albo państwo nie publikuje tych danych w postaci do odczytu maszynowego; value=null, agent nie może wyciągać wniosków, a opłata jest zwracana, gdy zapytanie dotyczy tych danych. not_computed: posiadamy źródło, lecz nie obliczyliśmy jeszcze wyniku dla tego miejsca, np. trwa ładowanie zbioru; value=null, opłata jest zwracana. Każdy stan zawiera uwagę napisaną prostym językiem.

States: covered | covered_no_data | not_covered | not_computed.

LayerAnswer required fields: layer, coverage, value, note, source, as_of, layer_version.

Billing rule

Koszt żądania. charged: liczba naliczonych wywołań po zwrotach. refunded: liczba wywołań naliczonych, a następnie zwróconych. rule: zastosowana reguła. Płatne są odpowiedzi, potwierdzone braki rekordów (covered_no_data) i niejednoznaczne listy kandydatów. Bezpłatne są błędne dane wejściowe (400), brak uwierzytelnienia (401), odpowiedzi bez zmiany danych (304) i operacje bezpłatne. Zwrot obejmuje pozostałe 4xx, każde 5xx, status not_covered oraz odpowiedź dotyczącą jednej kategorii ze stanem not_covered lub not_computed. W operacjach zbiorczych liczby dotyczą poszczególnych elementów.

Rule values: charged | free_operation | free_invalid_input | free_unauthorized | free_not_modified | refunded_client_error | refunded_server_error | refunded_not_covered | refunded_not_computed | batch_mixed.

Structured JSON results

{
  "check": {
    "allOf": [
      {
        "$ref": "#/$defs/Envelope"
      }
    ],
    "properties": {
      "meta": {
        "properties": {
          "operation": {
            "enum": [
              "check"
            ]
          }
        }
      }
    },
    "type": "object"
  },
  "events": {
    "allOf": [
      {
        "$ref": "#/$defs/Envelope"
      }
    ],
    "properties": {
      "meta": {
        "properties": {
          "operation": {
            "enum": [
              "events"
            ]
          }
        }
      }
    },
    "type": "object"
  },
  "layer": {
    "allOf": [
      {
        "$ref": "#/$defs/Envelope"
      }
    ],
    "properties": {
      "meta": {
        "properties": {
          "operation": {
            "enum": [
              "layer"
            ]
          }
        }
      }
    },
    "type": "object"
  },
  "parcel": {
    "allOf": [
      {
        "$ref": "#/$defs/Envelope"
      }
    ],
    "properties": {
      "meta": {
        "properties": {
          "operation": {
            "enum": [
              "parcel"
            ]
          }
        }
      }
    },
    "type": "object"
  },
  "resolve": {
    "allOf": [
      {
        "$ref": "#/$defs/Envelope"
      }
    ],
    "properties": {
      "meta": {
        "properties": {
          "operation": {
            "enum": [
              "resolve",
              "resolve_listing"
            ]
          }
        }
      }
    },
    "type": "object"
  },
  "search": {
    "allOf": [
      {
        "$ref": "#/$defs/Envelope"
      }
    ],
    "properties": {
      "meta": {
        "properties": {
          "operation": {
            "enum": [
              "search"
            ]
          }
        }
      }
    },
    "type": "object"
  }
}

See Envelope. MCP transport invocation: not specified in the source contract.

curl example of a REST binding

curl --silent --show-error --request GET "https://mcp.agentdzialek.pl/v1/check" --get \
  -H "X-Api-Key: ${LANDFEED_API_KEY}" \
  --data-urlencode 'id=141803_2.0001.12/3'