Envelope
Każda odpowiedź /v1, udana lub błędna, przez REST lub MCP, ma format Envelope. Niejednoznaczność nie jest błędem: zwracane są HTTP 200, status ambiguous i kandydaci. Wartości nie są zgadywane: gdy państwo nie publikuje danych, coverage wynosi not_covered, a value jest null. Pole billing wskazuje naliczone i zwrócone opłaty oraz zastosowaną regułę. Dokumentacja: docs/landfeed/README.md, krok 1; uzasadnienie: context/research/cenogram-teardown-2026-10-12.md, części 8 i 9. Wersja kontraktu 2.0.0 dodaje wymagania: meta.contract_version włącza obowiązkowe informacje o pochodzeniu danych v2, a przestrzeń adresów HTTP i meta.api_version pozostają v1. Zgodność ze starszą wersją nie uprawnia do udostępniania danych z niezatwierdzonych źródeł.
Cost and inputs
Envelope cost depends on the operation. Example GET /v1/parcel: x-request-cost: 1 request per call.
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.
Identyfikator EGiB id_dzialki w postaci przyjmowanej od wywołującego. Wzorzec apps/web/src/lib/schemas/validation.ts sprawdzono na zbiorze danych: przyjmuje 38 339 611 z 38 339 612 rekordów parcel_inventory; pominięty rekord ma pusty numer. Zapis \\p{L}\\p{N} zastąpiono literami łacińskimi z diakrytykami i cyframi, aby wzorzec działał w ECMA-262, Python re i PostgreSQL. Postać: sześciocyfrowy prefiks TERYT, następnie „_” lub „.” (np. „020207.5.0004.345” w przychodzących odnośnikach), cyfra jednostki, obręb złożony z 1-4 cyfr i numer zawierający do 64 liter, cyfr, znaków „_”, „.”, „/”, „-” i spacji. Arkusze AR_, np. „247701_1.0003.AR_4.734/113” i „240702_2.0001.AR_10BORONÓW LAS.310/121”, są poprawnymi identyfikatorami. Dopuszczalne są spacje na początku i końcu wklejonego identyfikatora. landfeed.normalize_parcel_id() zamienia każdą przyjmowaną postać na ParcelId: usuwa skrajne spacje, zamienia „.” po prefiksie na „_” oraz „-” w ostatnim członie na „/” („146501_1.0101.12-3” na „146501_1.0101.12/3”). API zwraca wyłącznie identyfikatory w ujednoliconej postaci. Przykłady: fixtures/real_ids.txt, fixtures/id_forms.jsonl.
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.
Errors and ambiguity
Każdy błąd wskazuje dalszy krok: zawsze zawiera hint i odnośnik do dokumentacji, przykładowe id przy zapytaniu o działkę oraz signup_url przy HTTP 401.
{
"additionalProperties": false,
"description": "Każdy błąd wskazuje dalszy krok: zawsze zawiera hint i odnośnik do dokumentacji, przykładowe id przy zapytaniu o działkę oraz signup_url przy HTTP 401.",
"properties": {
"code": {
"description": "invalid_input 400 (brak lub kilka parametrów q|id|point, błędne id lub point; bezpłatne). not_found 404 (zwrot opłaty). ambiguous 200 (odpowiada statusowi; lista kandydatów). not_covered 200 (rozpoznano miejsce poza załadowanym zakresem danych; zwrot opłaty). unauthorized 401 (brak lub błędny X-Api-Key; bezpłatne). rate_limited 429. source_unavailable 503 (błąd źródła odpytywanego podczas żądania; zwrot opłaty). internal 500 (zwrot opłaty).",
"enum": [
"invalid_input",
"not_found",
"ambiguous",
"not_covered",
"unauthorized",
"rate_limited",
"source_unavailable",
"internal"
],
"type": "string"
},
"docs": {
"type": "string"
},
"example_id": {
"description": "Poprawny identyfikator w ujednoliconej postaci, np. „146501_1.0101.12/3”.",
"type": [
"string",
"null"
]
},
"field": {
"type": [
"string",
"null"
]
},
"hint": {
"description": "Wskazówka dotycząca dalszego wywołania, np. „Przekaż dokładnie jeden parametr: q, id albo point” lub „Dodaj nazwę lub numer obrębu”.",
"minLength": 1,
"type": "string"
},
"message": {
"description": "Jedno zdanie, które agent może przekazać użytkownikowi.",
"type": "string"
},
"signup_url": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"message",
"hint",
"docs"
],
"type": "object"
}
Status
ok: wynik obecny (HTTP 200). ambiguous: result=null, niepusta lista kandydatów (200, naliczana opłata). not_found: brak dopasowania do danych wejściowych (404, zwrot opłaty). not_covered: rozpoznano miejsce, ale nie obejmuje go żaden załadowany zbiór ani źródło (200, result=null, zwrot opłaty). error: zobacz error.code.
{
"description": "ok: wynik obecny (HTTP 200). ambiguous: result=null, niepusta lista kandydatów (200, naliczana opłata). not_found: brak dopasowania do danych wejściowych (404, zwrot opłaty). not_covered: rozpoznano miejsce, ale nie obejmuje go żaden załadowany zbiór ani źródło (200, result=null, zwrot opłaty). error: zobacz error.code.",
"enum": [
"ok",
"ambiguous",
"not_found",
"not_covered",
"error"
],
"type": "string"
}
Candidates
not specified in the source contract
{
"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": {
"description": "Gmina administracyjna (admin_gmina_teryt, ostatnia cyfra 1, 2 lub 3), której kod przyjmuje /v1/gminy/{teryt}/planning. Jednostka TERYT w identyfikatorze działki jest inna dla typów jednostek 4, 5, 8 i 9.",
"pattern": "^[0-9]{7}$",
"type": "string"
},
"held": {
"default": true,
"description": "Wartość false, gdy kandydat występuje w rejestrze krajowym, lecz jego zbioru danych jeszcze nie załadowano.",
"type": "boolean"
},
"id": {
"description": "Ujednolicony ParcelId dla kind=parcel, siedmioznakowy TERYT dla kind=gmina lub identyfikator obrębu dla kind=obreb.",
"type": "string"
},
"kind": {
"enum": [
"parcel",
"obreb",
"gmina",
"address"
],
"type": "string"
},
"label": {
"description": "Czytelna etykieta, np. „dz. 284/5, obręb Pogorzelec, gm. Pogorzela (pow. gostyński)”.",
"type": "string"
},
"match_reason": {
"description": "Informacja o dopasowanych częściach zapytania, np. „miejscowość dopasowana w przybliżeniu: Lesnowola na Lesznowola (odległość 1), numer dopasowany dokładnie”.",
"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"
}
Pagination
Stronicowanie list wyników za pomocą kursora (search, events, sources).
{
"additionalProperties": false,
"description": "Stronicowanie list wyników za pomocą kursora (search, events, sources).",
"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"
}
Layer frame
Wspólny format każdej odpowiedzi tematycznej. Pola właściwe dla danej kategorii znajdują się w value (schematy *Value w openapi.yaml).
{
"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"
}
}
}
}
],
"description": "Wspólny format każdej odpowiedzi tematycznej. Pola właściwe dla danej kategorii znajdują się w value (schematy *Value w openapi.yaml).",
"properties": {
"as_of": {
"format": "date",
"type": [
"string",
"null"
]
},
"basis": {
"description": "Przepis lub reguła będąca podstawą wyliczonej odpowiedzi, np. „u.p.z.p. art. 59 ust. 3”.",
"type": [
"string",
"null"
]
},
"confidence": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"coverage": {
"$ref": "#/$defs/Coverage"
},
"hash": {
"description": "Skrót sha256 w zapisie szesnastkowym z coverage + ':' + canonical(value) (nagłówek parcel_record.sql). Wartość null dla danych ustalanych podczas żądania.",
"type": [
"string",
"null"
]
},
"layer": {
"$ref": "#/$defs/LayerKey"
},
"layer_version": {
"description": "Identyfikator obliczenia dla wcześniej obliczonych danych; live dla danych ustalanych podczas żądania.",
"type": "string"
},
"licence": {
"$ref": "#/$defs/Licence"
},
"method": {
"$ref": "#/$defs/Method"
},
"note": {
"description": "Jedno zdanie prostym językiem do przytoczenia przez agenta w każdym stanie: co oznacza wartość lub dlaczego jej brakuje. Bez określenia „bezpieczna” i bez „brak planu”, jeżeli nie wskazano rodzaju planu i źródła.",
"minLength": 1,
"type": "string"
},
"scope": {
"$ref": "#/$defs/Scope"
},
"source": {
"$ref": "#/$defs/SourceRef"
},
"threshold": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"value": {
"description": "Wartość null wtedy i tylko wtedy, gdy coverage wynosi not_covered lub not_computed.",
"type": [
"object",
"null"
]
}
},
"required": [
"layer",
"coverage",
"value",
"note",
"source",
"as_of",
"layer_version"
],
"type": "object"
}
Source attribution
Pozycja /v1/sources cytowana w odpowiedzi tematycznej. as_of to data danych źródłowych z ostatniej udanej aktualizacji, a nie czas żądania.
{
"additionalProperties": false,
"description": "Pozycja /v1/sources cytowana w odpowiedzi tematycznej. as_of to data danych źródłowych z ostatniej udanej aktualizacji, a nie czas żądania.",
"properties": {
"as_of": {
"format": "date",
"type": [
"string",
"null"
]
},
"attribution": {
"type": "string"
},
"fallback": {
"default": false,
"description": "Wartość true, gdy to źródło udzieliło odpowiedzi z powodu braku rekordu w źródle podstawowym, np. własny przegląd planów ogólnych przy braku wpisu w Rejestrze Urbanistycznym.",
"type": "boolean"
},
"id": {
"description": "Identyfikator źródła: source_status.source_id.",
"type": "string"
},
"licence": {
"type": "string"
},
"publisher": {
"type": "string"
},
"title": {
"type": "string"
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"title",
"attribution",
"as_of"
],
"type": "object"
}
ETag and caching
ETag
Dla GET według id (parcel, check, layer). Przekaż tę wartość jako If-None-Match. Obejmuje dokładnie treść odpowiedzi, bez pominiętych danych. Każda wcześniej obliczona kategoria w odpowiedzi (pog, wz, mpzp, flood, landslide, protected, buildings) wnosi L_hash i L_version z parcel_record; not_computed wnosi znacznik null. Każda kategoria ustalana podczas żądania (permits, prices, road_access, soil) wnosi as_of źródła i datę odpowiedzi (UTC, YYYY-MM-DD); cały ETag jest wtedy słaby, W/"...", i zmienia się co najmniej raz na dobę nawet bez zmian w źródle. ETag obejmuje też żądany zestaw kategorii i tryb geometrii, więc layers=flood i pełna karta nigdy nie mają wspólnego ETag. Odpowiedź wyłącznie z wcześniej obliczonych danych ma silny ETag, zmieniający się tylko po zmianie objętego nim skrótu lub wersji. /v1/check zawsze zawiera road_access, więc jego ETag jest zawsze słaby. If-None-Match stosuje słabe porównanie (RFC 9110 13.1.2): słaby ETag nadal pozwala uzyskać HTTP 304 w tym samym dniu.
{
"description": "Dla GET według id (parcel, check, layer). Przekaż tę wartość jako If-None-Match. Obejmuje dokładnie treść odpowiedzi, bez pominiętych danych. Każda wcześniej obliczona kategoria w odpowiedzi (pog, wz, mpzp, flood, landslide, protected, buildings) wnosi L_hash i L_version z parcel_record; not_computed wnosi znacznik null. Każda kategoria ustalana podczas żądania (permits, prices, road_access, soil) wnosi as_of źródła i datę odpowiedzi (UTC, YYYY-MM-DD); cały ETag jest wtedy słaby, W/\"...\", i zmienia się co najmniej raz na dobę nawet bez zmian w źródle. ETag obejmuje też żądany zestaw kategorii i tryb geometrii, więc layers=flood i pełna karta nigdy nie mają wspólnego ETag. Odpowiedź wyłącznie z wcześniej obliczonych danych ma silny ETag, zmieniający się tylko po zmianie objętego nim skrótu lub wersji. /v1/check zawsze zawiera road_access, więc jego ETag jest zawsze słaby. If-None-Match stosuje słabe porównanie (RFC 9110 13.1.2): słaby ETag nadal pozwala uzyskać HTTP 304 w tym samym dniu.",
"schema": {
"type": "string"
}
}
CacheControl
W uwierzytelnionych odpowiedziach zawsze private, max-age=0, must-revalidate, nigdy public.
{
"description": "W uwierzytelnionych odpowiedziach zawsze private, max-age=0, must-revalidate, nigdy public.",
"schema": {
"type": "string"
}
}
XRequestCost
Wartość x-request-cost operacji.
{
"description": "Wartość x-request-cost operacji.",
"schema": {
"type": "integer"
}
}
XCreditsCharged
Ta sama wartość co billing.charged.
{
"description": "Ta sama wartość co billing.charged.",
"schema": {
"type": "integer"
}
}
XCreditsRefunded
Ta sama wartość co billing.refunded.
{
"description": "Ta sama wartość co billing.refunded.",
"schema": {
"type": "integer"
}
}
304
{
"description": "If-None-Match odpowiada faktycznemu bieżącemu ETag. Sama gwiazdka jest pomijana i zwraca zwykle płatną reprezentację. Faktyczna zgodność oznacza brak treści i brak opłaty (reguła free_not_modified).",
"headers": {
"Cache-Control": {
"$ref": "#/components/headers/CacheControl"
},
"ETag": {
"$ref": "#/components/headers/ETag"
}
}
}
Complete envelope schema
| Field | Required | Schema / constraints | Description |
|---|---|---|---|
auth | no | {"additionalProperties": false, "properties": {"kind": {"enum": ["api_key", "oauth_connector"], "type": "string"}}, "required": ["kind"], "type": "object"} | Obie metody korzystają z tego samego salda kredytów konta; połączenie nie ma osobnego salda. |
billing | yes | {"additionalProperties": false, "properties": {"charged": {"minimum": 0, "type": "integer"}, "cost": {"description": "Wartość x-request-cost danej operacji; w operacji zbiorczej liczona na element.", "minimum": 0, "type": "integer"}, "credits": {"description": "Liczba zużytych kredytów konta po zwrotach, równa charged. Jedno wywołanie lub arkusz = 1; eksport = ceil(rows/100); operacja zbiorcza = jeden kredyt na identyfikator, pomniejszony o zwroty dla elementów. Odmowy i niedostępne odpowiedzi nie zużywają kredytów. Klucz API i połączenie korzystają z tego samego konta.", "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"} | 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. |
candidates | yes | {"items": {"oneOf": [{"$ref": "#/$defs/Candidate"}, {"$ref": "#/$defs/ListingCandidate"}]}, "type": "array"} | Lista niepusta przy statusie ambiguous i zawsze zwracana przez /v1/resolve. Kandydaci są uporządkowani malejąco według pewności dopasowania. Agent ponawia wywołanie z id=<candidate.id> albo pokazuje listę użytkownikowi; nigdy nie wybiera bez jego wiedzy. |
corpus_coverage | no | {"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": {"description": "national, kod województwa albo siedmioznakowy TERYT gminy.", "type": "string"}, "source_parcels": {"type": ["integer", "null"]}}, "required": ["scope", "source_parcels", "held_parcels", "held_pct", "as_of", "note"], "type": "object"} | Zakres posiadanych danych z danego rejestru, pozwalający odróżnić brak wyniku od braku załadowanych danych. Zwracany przy rozpoznawaniu oraz przy każdym statusie not_found lub not_covered. |
coverage_summary | no | {"additionalProperties": false, "properties": {"generated_at": {"format": "date-time", "type": "string"}, "gminas": {"minimum": 0, "type": "integer"}, "layers": {"additionalProperties": false, "properties": {"buildings": {"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"}, "flood": {"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"}, "landslide": {"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"}, "mpzp": {"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"}, "parcel": {"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"}, "pog": {"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"}, "protected": {"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"}, "wz": {"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"}}, "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"} | not specified in the source contract |
error | yes | {"oneOf": [{"type": "null"}, {"$ref": "#/$defs/Error"}]} | not specified in the source contract |
links | no | {"additionalProperties": {"$ref": "#/$defs/Link"}, "properties": {"map": {"$ref": "#/$defs/Link"}, "sheet": {"anyOf": [{"$ref": "#/$defs/Link"}, {"$ref": "#/$defs/SignedLink"}]}, "tiles": {"$ref": "#/$defs/Link"}}, "type": "object"} | Dalsze wywołania, które agent może zaplanować, wraz z kosztem każdego z nich, np. {"check": {"href": "/v1/check?id=...", "cost": 1}}. |
meta | yes | {"additionalProperties": false, "properties": {"api_version": {"const": "v1", "type": "string"}, "calls": {"description": "Liczba żądań potrzebnych do uzyskania odpowiedzi. Zawsze 1 dla pojedynczego odczytu; sprawdzane w teście pomiarowym.", "minimum": 1, "type": "integer"}, "contract_version": {"const": "2.0.0"}, "disclaimer": {"type": ["string", "null"]}, "etag": {"description": "Ta sama wartość co nagłówek ETag przy GET według id. Zakres i warunki słabego znacznika (W/): openapi.yaml components.headers.ETag.", "type": ["string", "null"]}, "excluded": {"description": "Pola wyłączone z udostępniania: numery KW, dane właścicieli i władających, nazwy inwestorów oraz ceny transakcyjne powiązane z konkretnym adresem.", "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"} | not specified in the source contract |
needs_obreb | no | {"default": false, "type": "boolean"} | Wartość true, gdy numer działki występuje w kilku obrębach rozpoznanej gminy, a dane wejściowe nie wskazują jednego z nich. |
page | no | {"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"} | Stronicowanie list wyników za pomocą kursora (search, events, sources). |
plan | no | {"enum": ["free", "start", "pro", "team", "developer", "platform"], "type": "string"} | not specified in the source contract |
query | yes | {"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, "description": "Parametry wejściowe w otrzymanej postaci. Obiekt dopuszcza też pozostałe parametry żądania, np. layers, limit, cursor i radius_m.", "type": "object"}, "kind": {"description": "q, id, point: jeden poprawny wariant q|id|point (point obejmuje też parę lat+lng). none: brak q|id|point, np. GET /v1/sources bez danych wejściowych. bbox: GET /v1/search?bbox. polygon: POST /v1/search. path: odczyt według parametru ścieżki, input {teryt} dla /v1/gminy/{teryt}/planning. batch: POST /v1/parcel/batch, input {items, ...}; odpowiedź każdego elementu określa własny kind. invalid: HTTP 400 z danymi, które nie przeszły walidacji (np. q i id jednocześnie lub błędne id); wyłącznie przy statusie error.", "enum": ["q", "id", "point", "none", "bbox", "polygon", "path", "batch", "invalid", "search", "events", "listing", "check_batch", "job"], "type": "string"}, "resolved": {"description": "Sposób rozpoznania działki lub gminy na podstawie danych wejściowych. Wartość null przy statusie ambiguous lub not_found.", "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": {"description": "Założenie przyjęte podczas rozpoznawania, np. „Lesnowola odczytano jako Lesznowola (dopasowanie przybliżone, obniżona pewność)”.", "type": ["string", "null"]}}, "required": ["from", "method", "id", "confidence"], "type": "object"}]}}, "required": ["input", "resolved"], "type": "object"} | Przekazane zapytanie i sposób jego rozpoznania. kind określa postać danych wejściowych; input zawiera otrzymane parametry zapytania, ścieżki lub treści żądania, więc błędne dane są powtarzane dokładnie w otrzymanej postaci. Bez kind pole input musi być poprawnym QueryInput, używanym już w każdym odczycie q|id|point. |
result | yes | {"type": ["object", "array", "null"]} | Dane właściwe dla danego punktu API (openapi.yaml). Wartość null, gdy status jest inny niż ok. |
search_facets | no | {"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"} | not specified in the source contract |
sources | yes | {"items": {"$ref": "#/$defs/SourceRef"}, "type": "array"} | Wszystkie źródła wykorzystane do ustalenia wyniku, bez powtórzeń. Każda odpowiedź tematyczna wskazuje także własne źródło. |
status | yes | {"enum": ["ok", "ambiguous", "not_found", "not_covered", "error"], "type": "string"} | ok: wynik obecny (HTTP 200). ambiguous: result=null, niepusta lista kandydatów (200, naliczana opłata). not_found: brak dopasowania do danych wejściowych (404, zwrot opłaty). not_covered: rozpoznano miejsce, ale nie obejmuje go żaden załadowany zbiór ani źródło (200, result=null, zwrot opłaty). error: zobacz error.code. |
{
"$defs": {
"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"
},
"AskCall": {
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"id": {
"$ref": "#/$defs/ParcelIdInput"
},
"layer": {
"$ref": "#/$defs/LayerKey"
},
"layers": {
"items": {
"$ref": "#/$defs/LayerKey"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"limit": {
"maximum": 20,
"minimum": 1,
"type": "integer"
},
"point": {
"maxLength": 70,
"minLength": 3,
"type": "string"
},
"polygon": {
"$ref": "#/$defs/SearchPolygon"
},
"q": {
"maxLength": 500,
"minLength": 1,
"type": "string"
},
"radius_m": {
"maximum": 2000,
"minimum": 0,
"type": "integer"
},
"since": {
"maxLength": 10,
"type": "string"
}
},
"type": "object"
},
"charged": {
"maximum": 20,
"minimum": 0,
"type": "integer"
},
"cost": {
"maximum": 20,
"minimum": 0,
"type": "integer"
},
"id": {
"pattern": "^t[1-9][0-9]*$",
"type": "string"
},
"operation": {
"type": "string"
},
"refunded": {
"maximum": 20,
"minimum": 0,
"type": "integer"
},
"status": {
"type": "string"
},
"tool": {
"enum": [
"resolve",
"check",
"parcel",
"search",
"events",
"sources"
]
}
},
"required": [
"id",
"tool",
"operation",
"status",
"cost",
"charged",
"refunded",
"arguments"
],
"type": "object"
},
"AskCitation": {
"additionalProperties": false,
"properties": {
"answer_sha256": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"as_of": {
"format": "date",
"type": [
"string",
"null"
]
},
"call_id": {
"pattern": "^t[1-9][0-9]*$",
"type": "string"
},
"coverage": {
"enum": [
"covered",
"covered_no_data",
"not_covered",
"not_computed"
]
},
"id": {
"pattern": "^c[1-9][0-9]*$",
"type": "string"
},
"layer_key": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"method": {
"type": [
"string",
"null"
]
},
"pointer": {
"pattern": "^/",
"type": "string"
},
"scope": {
"type": [
"string",
"null"
]
},
"source": {
"$ref": "#/$defs/SourceRef"
}
},
"required": [
"id",
"call_id",
"pointer",
"answer_sha256",
"layer_key",
"source",
"as_of",
"coverage",
"scope",
"method"
],
"type": "object"
},
"AskClientTool": {
"additionalProperties": false,
"properties": {
"description": {
"maxLength": 500,
"minLength": 1,
"type": "string"
},
"input_schema": {
"maxProperties": 32,
"type": "object"
},
"name": {
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"type": "string"
}
},
"required": [
"name",
"description",
"input_schema"
],
"type": "object"
},
"AskContinuation": {
"additionalProperties": false,
"properties": {
"digest": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"state": {
"type": "object"
}
},
"required": [
"state",
"digest"
],
"type": "object"
},
"AskEvent": {
"description": "Format SSE: event: <event>\\ndata: <dane JSON>\\n\\n. Każdy przyjęty strumień kończy dokładnie jedno done; może je poprzedzać error. Kroki są zapowiadane przed wykonaniem publicznej operacji. Wyniki zawierają dokładne treści publicznych odpowiedzi.",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"estimated_credits": {
"maximum": 20,
"minimum": 0,
"type": "integer"
},
"label": {
"maxLength": 300,
"minLength": 1,
"type": "string"
},
"request": {
"additionalProperties": false,
"properties": {
"body": {
"type": [
"object",
"null"
]
},
"method": {
"enum": [
"GET",
"POST",
"PUT",
"DELETE"
]
},
"path": {
"pattern": "^/v1/",
"type": "string"
},
"query": {
"type": "object"
}
},
"required": [
"method",
"path",
"query",
"body"
],
"type": "object"
},
"step_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"tool": {
"maxLength": 64,
"minLength": 1,
"type": "string"
}
},
"required": [
"step_id",
"tool",
"label",
"request",
"estimated_credits"
],
"type": "object"
},
"event": {
"const": "step.started"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"artifact_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"credits_charged": {
"maximum": 20,
"minimum": 0,
"type": "integer"
},
"duration_ms": {
"minimum": 0,
"type": "integer"
},
"status": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"step_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
}
},
"required": [
"step_id",
"status",
"credits_charged",
"duration_ms"
],
"type": "object"
},
"event": {
"const": "step.finished"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/$defs/AskSignedResult"
},
"event": {
"const": "artifact"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"text": {
"maxLength": 24000,
"minLength": 1,
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"event": {
"const": "answer.delta"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"items": {
"additionalProperties": false,
"properties": {
"artifact_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"as_of": {
"format": "date",
"type": [
"string",
"null"
]
},
"citation_id": {
"minimum": 1,
"type": "integer"
},
"layer": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"source": {
"$ref": "#/$defs/SourceRef"
}
},
"required": [
"citation_id",
"artifact_id",
"source",
"as_of"
],
"type": "object"
},
"maxItems": 40,
"type": "array"
},
"event": {
"const": "answer.citations"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"arguments": {
"type": "object"
},
"call_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"name": {
"maxLength": 64,
"minLength": 1,
"type": "string"
}
},
"required": [
"call_id",
"name",
"arguments"
],
"type": "object"
},
"event": {
"const": "client_tool.call"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"action": {
"maxLength": 64,
"minLength": 1,
"type": "string"
},
"credits": {
"maximum": 20,
"minimum": 0,
"type": "integer"
},
"label": {
"maxLength": 300,
"minLength": 1,
"type": "string"
},
"step_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
}
},
"required": [
"step_id",
"action",
"label",
"credits"
],
"type": "object"
},
"event": {
"const": "confirm.required"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"max_credits": {
"maximum": 20,
"minimum": 0,
"type": "integer"
},
"needed": {
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"plan": {
"items": {
"additionalProperties": false,
"properties": {
"estimated_credits": {
"maximum": 20,
"minimum": 0,
"type": "integer"
},
"label": {
"maxLength": 300,
"minLength": 1,
"type": "string"
},
"request": {
"additionalProperties": false,
"properties": {
"body": {
"type": [
"object",
"null"
]
},
"method": {
"enum": [
"GET",
"POST",
"PUT",
"DELETE"
]
},
"path": {
"pattern": "^/v1/",
"type": "string"
},
"query": {
"type": "object"
}
},
"required": [
"method",
"path",
"query",
"body"
],
"type": "object"
},
"step_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"tool": {
"maxLength": 64,
"minLength": 1,
"type": "string"
}
},
"required": [
"step_id",
"tool",
"label",
"request",
"estimated_credits"
],
"type": "object"
},
"maxItems": 12,
"type": "array"
}
},
"required": [
"needed",
"max_credits",
"plan"
],
"type": "object"
},
"event": {
"const": "budget.exceeded"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"continuation": {
"anyOf": [
{
"$ref": "#/$defs/AskContinuation"
},
{
"type": "null"
}
]
},
"credits_total": {
"maximum": 20,
"minimum": 0,
"type": "integer"
}
},
"required": [
"credits_total",
"continuation"
],
"type": "object"
},
"event": {
"const": "done"
}
},
"required": [
"event",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"code": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"message": {
"maxLength": 500,
"minLength": 1,
"type": "string"
}
},
"required": [
"message",
"code"
],
"type": "object"
},
"event": {
"const": "error"
}
},
"required": [
"event",
"data"
],
"type": "object"
}
]
},
"AskRequest": {
"additionalProperties": false,
"properties": {
"client_results": {
"items": {
"additionalProperties": false,
"properties": {
"call_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"result": {
"type": "object"
}
},
"required": [
"call_id",
"result"
],
"type": "object"
},
"maxItems": 1,
"type": "array"
},
"client_tools": {
"items": {
"$ref": "#/$defs/AskClientTool"
},
"maxItems": 12,
"type": "array"
},
"confirmation": {
"additionalProperties": false,
"properties": {
"approved": {
"type": "boolean"
},
"step_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
}
},
"required": [
"step_id",
"approved"
],
"type": "object"
},
"context": {
"additionalProperties": false,
"maxProperties": 1,
"minProperties": 1,
"properties": {
"area": {
"$ref": "#/$defs/SearchPolygon"
},
"parcel_id": {
"$ref": "#/$defs/ParcelIdInput"
},
"search_query": {
"maxLength": 500,
"minLength": 1,
"type": "string"
},
"watch_id": {
"format": "uuid",
"type": "string"
}
},
"required": [],
"type": "object"
},
"continuation": {
"$ref": "#/$defs/AskContinuation"
},
"max_credits": {
"default": 5,
"maximum": 20,
"minimum": 1,
"type": "integer"
},
"messages": {
"items": {
"$ref": "#/$defs/AskTurn"
},
"maxItems": 100,
"type": "array"
},
"question": {
"maxLength": 2000,
"minLength": 1,
"type": "string"
},
"results": {
"items": {
"$ref": "#/$defs/AskSignedResult"
},
"maxItems": 40,
"type": "array"
},
"version": {
"const": "ask-v2"
}
},
"required": [
"question"
],
"type": "object"
},
"AskResponse": {
"additionalProperties": false,
"properties": {
"answer": {
"maxLength": 24000,
"type": "string"
},
"billing": {
"$ref": "#/$defs/BillingV2"
},
"calls": {
"items": {
"$ref": "#/$defs/AskCall"
},
"maxItems": 12,
"type": "array"
},
"citations": {
"items": {
"$ref": "#/$defs/AskCitation"
},
"maxItems": 40,
"type": "array"
},
"continuation": {
"anyOf": [
{
"$ref": "#/$defs/AskContinuation"
},
{
"type": "null"
}
]
},
"events": {
"items": {
"$ref": "#/$defs/AskEvent"
},
"maxItems": 150,
"type": "array"
},
"max_credits": {
"maximum": 20,
"minimum": 1,
"type": "integer"
},
"meta": {
"additionalProperties": false,
"properties": {
"contract_version": {
"const": "2.0.0"
},
"prompt_version": {
"enum": [
"ask-v1",
"ask-v2"
]
},
"request_id": {
"format": "uuid",
"type": "string"
},
"tools_version": {
"enum": [
"ask-tools-v1",
"ask-tools-v2"
]
}
},
"required": [
"request_id",
"contract_version",
"prompt_version",
"tools_version"
],
"type": "object"
},
"missing": {
"items": {
"maxLength": 200,
"type": "string"
},
"maxItems": 20,
"type": "array"
},
"status": {
"enum": [
"answered",
"incomplete",
"budget_exhausted",
"unavailable",
"insufficient_credits",
"refused",
"error"
]
}
},
"required": [
"status",
"answer",
"citations",
"calls",
"missing",
"max_credits",
"billing",
"meta"
],
"type": "object"
},
"AskSignedResult": {
"additionalProperties": false,
"properties": {
"artifact_id": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"data": {
"type": "object"
},
"digest": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"title": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"type": {
"enum": [
"parcel_card",
"search_results",
"watch_list",
"events",
"api_snippet",
"coverage"
]
}
},
"required": [
"artifact_id",
"type",
"title",
"data",
"digest"
],
"type": "object"
},
"AskTurn": {
"additionalProperties": false,
"properties": {
"artifact_ids": {
"items": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"maxItems": 40,
"type": "array"
},
"content": {
"maxLength": 24000,
"minLength": 1,
"type": "string"
},
"role": {
"enum": [
"user",
"assistant"
]
}
},
"required": [
"role",
"content"
],
"type": "object"
},
"Auth": {
"additionalProperties": false,
"description": "Obie metody korzystają z tego samego salda kredytów konta; połączenie nie ma osobnego salda.",
"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,
"description": "Zarezerwowany kontrakt, niedostępny w bieżącej usłudze. POST /v1/check z Idempotency-Key; 1 kredyt za identyfikator po ukończeniu według dotychczasowych zwrotów za element. Zlecenie i odpytywanie są bezpłatne. To samo konto, klucz i treść zwracają to samo zadanie bez ponownej opłaty; inna treść z tym samym kluczem oznacza 409 i zwrot. Klucze są zachowywane co najmniej 24 godziny po zakończeniu zadania.",
"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"
},
"BatchCheckSubmission": {
"additionalProperties": false,
"description": "Sprawdzenie na poziomie protokołu, czy sama treść żądania nie jest traktowana jako poprawne zgłoszenie zbiorcze.",
"properties": {
"body": {
"$ref": "#/$defs/BatchCheckRequest"
},
"headers": {
"additionalProperties": false,
"properties": {
"Idempotency-Key": {
"$ref": "#/$defs/IdempotencyKey"
}
},
"required": [
"Idempotency-Key"
],
"type": "object"
}
},
"required": [
"headers",
"body"
],
"type": "object"
},
"Billing": {
"additionalProperties": false,
"description": "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.",
"properties": {
"charged": {
"minimum": 0,
"type": "integer"
},
"cost": {
"description": "Wartość x-request-cost danej operacji; w operacji zbiorczej liczona na element.",
"minimum": 0,
"type": "integer"
},
"credits": {
"description": "Liczba zużytych kredytów konta po zwrotach, równa charged. Jedno wywołanie lub arkusz = 1; eksport = ceil(rows/100); operacja zbiorcza = jeden kredyt na identyfikator, pomniejszony o zwroty dla elementów. Odmowy i niedostępne odpowiedzi nie zużywają kredytów. Klucz API i połączenie korzystają z tego samego konta.",
"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": {
"description": "Gmina administracyjna (admin_gmina_teryt, ostatnia cyfra 1, 2 lub 3), której kod przyjmuje /v1/gminy/{teryt}/planning. Jednostka TERYT w identyfikatorze działki jest inna dla typów jednostek 4, 5, 8 i 9.",
"pattern": "^[0-9]{7}$",
"type": "string"
},
"held": {
"default": true,
"description": "Wartość false, gdy kandydat występuje w rejestrze krajowym, lecz jego zbioru danych jeszcze nie załadowano.",
"type": "boolean"
},
"id": {
"description": "Ujednolicony ParcelId dla kind=parcel, siedmioznakowy TERYT dla kind=gmina lub identyfikator obrębu dla kind=obreb.",
"type": "string"
},
"kind": {
"enum": [
"parcel",
"obreb",
"gmina",
"address"
],
"type": "string"
},
"label": {
"description": "Czytelna etykieta, np. „dz. 284/5, obręb Pogorzelec, gm. Pogorzela (pow. gostyński)”.",
"type": "string"
},
"match_reason": {
"description": "Informacja o dopasowanych częściach zapytania, np. „miejscowość dopasowana w przybliżeniu: Lesnowola na Lesznowola (odległość 1), numer dopasowany dokładnie”.",
"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": {
"description": "Reguła przeniesiona z bezpłatnego sprawdzania (geofeed/resolve). pass: wszystkie sprawdzenia zakończone pomyślnie. fail: negatywny wynik sprawdzenia rozstrzygającego (brak ścieżki WZ i MPZP dopuszczającego zabudowę). conditional: możliwość zabudowy zależy od wskazanego warunku (dojazd, powódź, forma ochrony). unknown: wynik sprawdzenia rozstrzygającego jest nieznany.",
"enum": [
"pass",
"conditional",
"fail",
"unknown"
],
"type": "string"
}
},
"required": [
"verdict",
"checks",
"record",
"disclaimer"
],
"type": "object"
},
"CorpusCoverage": {
"additionalProperties": false,
"description": "Zakres posiadanych danych z danego rejestru, pozwalający odróżnić brak wyniku od braku załadowanych danych. Zwracany przy rozpoznawaniu oraz przy każdym statusie not_found lub not_covered.",
"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": {
"description": "national, kod województwa albo siedmioznakowy TERYT gminy.",
"type": "string"
},
"source_parcels": {
"type": [
"integer",
"null"
]
}
},
"required": [
"scope",
"source_parcels",
"held_parcels",
"held_pct",
"as_of",
"note"
],
"type": "object"
},
"Coverage": {
"description": "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.",
"enum": [
"covered",
"covered_no_data",
"not_covered",
"not_computed"
],
"type": "string"
},
"Error": {
"additionalProperties": false,
"description": "Każdy błąd wskazuje dalszy krok: zawsze zawiera hint i odnośnik do dokumentacji, przykładowe id przy zapytaniu o działkę oraz signup_url przy HTTP 401.",
"properties": {
"code": {
"description": "invalid_input 400 (brak lub kilka parametrów q|id|point, błędne id lub point; bezpłatne). not_found 404 (zwrot opłaty). ambiguous 200 (odpowiada statusowi; lista kandydatów). not_covered 200 (rozpoznano miejsce poza załadowanym zakresem danych; zwrot opłaty). unauthorized 401 (brak lub błędny X-Api-Key; bezpłatne). rate_limited 429. source_unavailable 503 (błąd źródła odpytywanego podczas żądania; zwrot opłaty). internal 500 (zwrot opłaty).",
"enum": [
"invalid_input",
"not_found",
"ambiguous",
"not_covered",
"unauthorized",
"rate_limited",
"source_unavailable",
"internal"
],
"type": "string"
},
"docs": {
"type": "string"
},
"example_id": {
"description": "Poprawny identyfikator w ujednoliconej postaci, np. „146501_1.0101.12/3”.",
"type": [
"string",
"null"
]
},
"field": {
"type": [
"string",
"null"
]
},
"hint": {
"description": "Wskazówka dotycząca dalszego wywołania, np. „Przekaż dokładnie jeden parametr: q, id albo point” lub „Dodaj nazwę lub numer obrębu”.",
"minLength": 1,
"type": "string"
},
"message": {
"description": "Jedno zdanie, które agent może przekazać użytkownikowi.",
"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"
},
"EventsGetParcelIds": {
"description": "Mała lista działek w GET zdarzeń; większe listy korzystają z POST /v1/events/query (do 10 000 identyfikatorów).",
"items": {
"$ref": "#/$defs/ParcelId"
},
"maxItems": 100,
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"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"
},
"FeatureSearchFilters": {
"additionalProperties": false,
"description": "Filtry cech obejmują wartości graniczne. Nieznane wartości i null nigdy nie spełniają filtra, również dla false. Powierzchnia geometryczna jest podana w m². Agregat RCN dotyczy stałej grupy co najmniej 6 transakcji w gminie, po zaokrągleniu do 50 zł/m². GUNB podaje potwierdzoną liczbę wpisów w promieniu 500 m. Dolna granica przedziału nie może przekraczać górnej.",
"properties": {
"area_max_m2": {
"maximum": 1000000000000.0,
"minimum": 0,
"type": "number"
},
"area_min_m2": {
"maximum": 1000000000000.0,
"minimum": 0,
"type": "number"
},
"buildings_present": {
"type": "boolean"
},
"frontage_min_m": {
"maximum": 1000000000000.0,
"minimum": 0,
"type": "number"
},
"gunb_activity_min": {
"description": "Minimalna liczba wpisów RWDZ jednoznacznie powiązanych z działkami w promieniu 500 m. Jest to potwierdzona liczba co najmniej tylu wpisów. Jeśli nie osiąga minimum, dane nie wystarczają do rozstrzygnięcia; działka jest liczona w excluded_unknown.",
"maximum": 1000000000000.0,
"minimum": 0,
"type": "integer"
},
"land_use_class": {
"enum": [
"R",
"Ł",
"Ps",
"Br",
"B",
"Ba",
"Bi",
"Bp",
"Bz",
"K",
"Ls",
"Lz",
"Lzr",
"N",
"Wp",
"Ws",
"Wsr",
"W",
"dr",
"Tk",
"Ti",
"Tr",
"E"
],
"type": "string"
},
"pog_zone_class": {
"enum": [
"SW",
"SJ",
"SN",
"SU",
"SH",
"SI",
"SZ",
"SC",
"SG",
"SO",
"SR",
"SK",
"SP"
],
"type": "string"
},
"public_road_max_m": {
"maximum": 1000000000000.0,
"minimum": 0,
"type": "number"
},
"rcn_price_max_pln_m2": {
"maximum": 1000000000000.0,
"minimum": 0,
"type": "number"
},
"rcn_price_min_pln_m2": {
"maximum": 1000000000000.0,
"minimum": 0,
"type": "number"
},
"road_access": {
"type": "boolean"
},
"shape_regularity_min": {
"maximum": 1,
"minimum": 0,
"type": "number"
}
},
"type": "object"
},
"IdempotencyKey": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9._:-]+$",
"type": "string"
},
"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"
}
}
}
}
],
"description": "Wspólny format każdej odpowiedzi tematycznej. Pola właściwe dla danej kategorii znajdują się w value (schematy *Value w openapi.yaml).",
"properties": {
"as_of": {
"format": "date",
"type": [
"string",
"null"
]
},
"basis": {
"description": "Przepis lub reguła będąca podstawą wyliczonej odpowiedzi, np. „u.p.z.p. art. 59 ust. 3”.",
"type": [
"string",
"null"
]
},
"confidence": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"coverage": {
"$ref": "#/$defs/Coverage"
},
"hash": {
"description": "Skrót sha256 w zapisie szesnastkowym z coverage + ':' + canonical(value) (nagłówek parcel_record.sql). Wartość null dla danych ustalanych podczas żądania.",
"type": [
"string",
"null"
]
},
"layer": {
"$ref": "#/$defs/LayerKey"
},
"layer_version": {
"description": "Identyfikator obliczenia dla wcześniej obliczonych danych; live dla danych ustalanych podczas żądania.",
"type": "string"
},
"licence": {
"$ref": "#/$defs/Licence"
},
"method": {
"$ref": "#/$defs/Method"
},
"note": {
"description": "Jedno zdanie prostym językiem do przytoczenia przez agenta w każdym stanie: co oznacza wartość lub dlaczego jej brakuje. Bez określenia „bezpieczna” i bez „brak planu”, jeżeli nie wskazano rodzaju planu i źródła.",
"minLength": 1,
"type": "string"
},
"scope": {
"$ref": "#/$defs/Scope"
},
"source": {
"$ref": "#/$defs/SourceRef"
},
"threshold": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"value": {
"description": "Wartość null wtedy i tylko wtedy, gdy coverage wynosi not_covered lub not_computed.",
"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"
}
}
}
}
],
"description": "Format odpowiedzi tematycznej v2. Walidator wymaga zgodności ze sprawdzoną licencją i confidence >= threshold dla każdego stanu poza not_covered. Poniżej progu zwracane są not_covered i null; nie jest to piąty stan zakresu danych."
},
"LayerKey": {
"description": "planning zwraca w jednym żądaniu informacje planistyczne: plan ogólny, MPZP, WZ i stan planowania w gminie.",
"enum": [
"parcel",
"admin",
"address",
"buildings",
"planning",
"pog",
"wz",
"mpzp",
"flood",
"landslide",
"protected",
"road_access",
"permits",
"prices",
"soil"
],
"type": "string"
},
"Licence": {
"additionalProperties": false,
"description": "Dokładna, sprawdzona decyzja z licence_decisions.json, powiązana z source.id. Źródło bez sprawdzonej decyzji nie może być udostępniane. terms_url=null oznacza brak adresu URL w decyzji, a nie nieograniczone prawo ponownego wykorzystania.",
"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,
"description": "Wyłącznie uporządkowane przesłanki lokalizacyjne. reason opisuje metodę dopasowania i nigdy nie cytuje treści ogłoszenia. Pojedynczy kandydat nadal jest kandydatem, a nie pewnie rozpoznaną działką.",
"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"
},
"ListingResolution": {
"additionalProperties": false,
"description": "Wynik zawiera wyłącznie kandydatów, nigdy treść, zdjęcia ani ceny z ogłoszenia; bez wynikowej działki i automatycznego wyboru. Pusta lista kandydatów oznacza not_found i zwrot opłaty. Przełącznik: LANDFEED_LISTING_LOOKUP_ENABLED.",
"properties": {
"candidates": {
"items": {
"$ref": "#/$defs/ListingCandidate"
},
"maxItems": 100,
"type": "array"
},
"listing_url": {
"format": "uri",
"maxLength": 2048,
"pattern": "^https://",
"type": "string"
}
},
"required": [
"listing_url",
"candidates"
],
"type": "object"
},
"ListingResolveRequest": {
"additionalProperties": false,
"description": "Przełącznik LANDFEED_LISTING_LOOKUP_ENABLED, domyślnie false. Wyłączone wyszukiwanie zwraca bezpłatną odmowę. Udostępnienie wymaga akceptacji ryzyka danego portalu i sposobu wskazywania każdego źródła.",
"properties": {
"listing_url": {
"format": "uri",
"maxLength": 2048,
"pattern": "^https://",
"type": "string"
}
},
"required": [
"listing_url"
],
"type": "object"
},
"LonLat": {
"description": "Kolejność GeoJSON: [lng, lat], układ WGS84.",
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"Meta": {
"additionalProperties": false,
"properties": {
"api_version": {
"const": "v1",
"type": "string"
},
"calls": {
"description": "Liczba żądań potrzebnych do uzyskania odpowiedzi. Zawsze 1 dla pojedynczego odczytu; sprawdzane w teście pomiarowym.",
"minimum": 1,
"type": "integer"
},
"contract_version": {
"const": "2.0.0"
},
"disclaimer": {
"type": [
"string",
"null"
]
},
"etag": {
"description": "Ta sama wartość co nagłówek ETag przy GET według id. Zakres i warunki słabego znacznika (W/): openapi.yaml components.headers.ETag.",
"type": [
"string",
"null"
]
},
"excluded": {
"description": "Pola wyłączone z udostępniania: numery KW, dane właścicieli i władających, nazwy inwestorów oraz ceny transakcyjne powiązane z konkretnym adresem.",
"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"
}
],
"description": "Status prawny MPZP; null, gdy integracja wymienia plan lub strefę, ale nie publikuje statusu prawnego. Taki rekord ma coverage=covered i effective_from=null, a note wyjaśnia brak statusu. Statusy draft, adopted i in_force wymagają potwierdzenia w źródle; brak danych nigdy nie oznacza none."
},
"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": {
"description": "Dane wejściowe bez q, id, point, lat ani lng (rodzaje QueryEcho: none, bbox, polygon, path).",
"not": {
"anyOf": [
{
"required": [
"q"
]
},
{
"required": [
"id"
]
},
{
"required": [
"point"
]
},
{
"required": [
"lat"
]
},
{
"required": [
"lng"
]
}
]
},
"type": "object"
},
"Page": {
"additionalProperties": false,
"description": "Stronicowanie list wyników za pomocą kursora (search, events, sources).",
"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": {
"description": "Ujednolicony identyfikator EGiB id_dzialki, będący kluczem głównym: „_” po sześciocyfrowym prefiksie, bez skrajnych spacji, numer do 64 znaków z ostatnim członem (po ostatniej kropce) zawierającym tylko litery, cyfry, „_” i „/”; postać z łącznikiem wymaga normalizacji. Wcześniejsze człony mogą zawierać oznaczenie arkusza AR_ z literami, spacjami i łącznikami („240702_2.0001.AR_10BORONÓW LAS.310/121”). gmina_teryt (7 znaków, WWPPGGR) to jednostka TERYT w identyfikatorze; gminę administracyjną określa admin_gmina_teryt (nagłówek parcel_record.sql).",
"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": {
"description": "Identyfikator EGiB id_dzialki w postaci przyjmowanej od wywołującego. Wzorzec apps/web/src/lib/schemas/validation.ts sprawdzono na zbiorze danych: przyjmuje 38 339 611 z 38 339 612 rekordów parcel_inventory; pominięty rekord ma pusty numer. Zapis \\\\p{L}\\\\p{N} zastąpiono literami łacińskimi z diakrytykami i cyframi, aby wzorzec działał w ECMA-262, Python re i PostgreSQL. Postać: sześciocyfrowy prefiks TERYT, następnie „_” lub „.” (np. „020207.5.0004.345” w przychodzących odnośnikach), cyfra jednostki, obręb złożony z 1-4 cyfr i numer zawierający do 64 liter, cyfr, znaków „_”, „.”, „/”, „-” i spacji. Arkusze AR_, np. „247701_1.0003.AR_4.734/113” i „240702_2.0001.AR_10BORONÓW LAS.310/121”, są poprawnymi identyfikatorami. Dopuszczalne są spacje na początku i końcu wklejonego identyfikatora. landfeed.normalize_parcel_id() zamienia każdą przyjmowaną postać na ParcelId: usuwa skrajne spacje, zamienia „.” po prefiksie na „_” oraz „-” w ostatnim członie na „/” („146501_1.0101.12-3” na „146501_1.0101.12/3”). API zwraca wyłącznie identyfikatory w ujednoliconej postaci. Przykłady: fixtures/real_ids.txt, fixtures/id_forms.jsonl.",
"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": {
"description": "Identyfikatory do 50 aktywnych działek wczytanych do API, które mają wspólny odcinek granicy. Kolejność według identyfikatora; sam kontakt punktowy nie wystarcza.",
"items": {
"$ref": "#/$defs/ParcelId"
},
"maxItems": 50,
"type": "array",
"uniqueItems": true
},
"adjacent_parcel_ids_truncated": {
"type": "boolean"
},
"admin": {
"additionalProperties": false,
"properties": {
"admin_gmina_teryt": {
"description": "Gmina administracyjna (parcel_record.admin_gmina_teryt), której kod przyjmuje /v1/gminy/{teryt}/planning.",
"type": [
"string",
"null"
]
},
"gmina_name": {
"type": "string"
},
"gmina_teryt": {
"description": "Jednostka TERYT w identyfikatorze działki (parcel_record.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,
"description": "Granica do wyświetlania: uproszczenie do 0,5 m w EPSG:2180, GeoJSON w EPSG:4326. Dokładny eksport wymaga osobnego płatnego żądania geometry=full.",
"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"
},
"PlaceParent": {
"additionalProperties": false,
"properties": {
"id": {
"minLength": 1,
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
},
"teryt": {
"minLength": 1,
"type": "string"
},
"type": {
"enum": [
"voivodeship",
"powiat",
"gmina",
"obreb"
]
}
},
"required": [
"id",
"name",
"type",
"teryt"
],
"type": "object"
},
"PlaceSuggestion": {
"additionalProperties": false,
"description": "Kod TERC gminy lub powiatu; pełny identyfikator EGiB dla obrębu. Nazwy PRG bez zapisanego SIMC zachowują teryt=null; gmina nadrzędna jest podana osobno.",
"properties": {
"as_of": {
"format": "date",
"type": [
"string",
"null"
]
},
"code_system": {
"enum": [
"TERC",
"EGiB",
"SIMC"
]
},
"coverage": {
"$ref": "#/$defs/Coverage"
},
"id": {
"minLength": 1,
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
},
"note": {
"minLength": 1,
"type": "string"
},
"parent": {
"anyOf": [
{
"$ref": "#/$defs/PlaceParent"
},
{
"type": "null"
}
]
},
"source": {
"$ref": "#/$defs/SourceRef"
},
"teryt": {
"minLength": 1,
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"gmina",
"powiat",
"obreb",
"miejscowosc"
]
}
},
"required": [
"id",
"name",
"type",
"teryt",
"code_system",
"parent",
"coverage",
"source",
"as_of",
"note"
],
"type": "object"
},
"PlacesResult": {
"additionalProperties": false,
"properties": {
"coverage": {
"$ref": "#/$defs/Coverage"
},
"note": {
"minLength": 1,
"type": "string"
},
"places": {
"items": {
"$ref": "#/$defs/PlaceSuggestion"
},
"maxItems": 20,
"type": "array"
}
},
"required": [
"places",
"coverage",
"note"
],
"type": "object"
},
"Plan": {
"enum": [
"free",
"start",
"pro",
"team",
"developer",
"platform"
],
"type": "string"
},
"PlanStatus": {
"description": "Status planu ogólnego lub MPZP: draft (projekt, nieuchwalony), adopted (uchwalony, jeszcze nie obowiązuje), in_force (obowiązuje), none (źródło nie zawiera rekordu takiego planu dla tego miejsca). Statusom adopted i in_force towarzyszy effective_from.",
"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"
}
}
}
}
],
"description": "Przekazane zapytanie i sposób jego rozpoznania. kind określa postać danych wejściowych; input zawiera otrzymane parametry zapytania, ścieżki lub treści żądania, więc błędne dane są powtarzane dokładnie w otrzymanej postaci. Bez kind pole input musi być poprawnym QueryInput, używanym już w każdym odczycie q|id|point.",
"properties": {
"input": {
"additionalProperties": true,
"description": "Parametry wejściowe w otrzymanej postaci. Obiekt dopuszcza też pozostałe parametry żądania, np. layers, limit, cursor i radius_m.",
"type": "object"
},
"kind": {
"description": "q, id, point: jeden poprawny wariant q|id|point (point obejmuje też parę lat+lng). none: brak q|id|point, np. GET /v1/sources bez danych wejściowych. bbox: GET /v1/search?bbox. polygon: POST /v1/search. path: odczyt według parametru ścieżki, input {teryt} dla /v1/gminy/{teryt}/planning. batch: POST /v1/parcel/batch, input {items, ...}; odpowiedź każdego elementu określa własny kind. invalid: HTTP 400 z danymi, które nie przeszły walidacji (np. q i id jednocześnie lub błędne id); wyłącznie przy statusie error.",
"enum": [
"q",
"id",
"point",
"none",
"bbox",
"polygon",
"path",
"batch",
"invalid",
"search",
"events",
"listing",
"check_batch",
"job"
],
"type": "string"
},
"resolved": {
"description": "Sposób rozpoznania działki lub gminy na podstawie danych wejściowych. Wartość null przy statusie ambiguous lub not_found.",
"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": {
"description": "Założenie przyjęte podczas rozpoznawania, np. „Lesnowola odczytano jako Lesznowola (dopasowanie przybliżone, obniżona pewność)”.",
"type": [
"string",
"null"
]
}
},
"required": [
"from",
"method",
"id",
"confidence"
],
"type": "object"
}
]
}
},
"required": [
"input",
"resolved"
],
"type": "object"
},
"QueryInput": {
"description": "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.",
"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": {
"description": "Współrzędne WGS84 w stopniach dziesiętnych, w formacie lat,lng, np. „52.2297,21.0122”. Wskazują działkę zawierającą ten punkt.",
"pattern": "^-?[0-9]{1,2}(\\.[0-9]+)?, ?-?[0-9]{1,3}(\\.[0-9]+)?$",
"type": "string"
},
"q": {
"description": "Dowolny tekst wpisany przez użytkownika, np. „pogorzelec dziłaka 284/5”, „Marcinowice 221”, „Lesnowola 25/18”, „obręb 9 / O18”, adres albo pełny identyfikator w jednej z obsługiwanych postaci.",
"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"
}
}
}
}
],
"description": "Co najmniej 6 różnych sprzedaży. Publikowana jest wyłącznie mediana grupy transakcji, zaokrąglona do najbliższych 50 zł/m², przy remisie do parzystej wielokrotności. Nie publikuje się dokładnej wartości pozycyjnej ani ceny pojedynczej sprzedaży. Minimalna liczebność jest sprawdzana przed publikacją, a wyniki muszą uniemożliwiać odtworzenie danych przez różnicowanie. Wyłącznie zamknięty zestaw danych zbiorczych.",
"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,
"description": "Każdy warunek wymaga danych o stanie covered lub covered_no_data w zadeklarowanym zakresie. Wynik nieznany ani not_computed nigdy nie spełnia filtra, także warunku o wartości false. Powierzchnia min<=max; obie granice są włączne, w m².",
"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,
"description": "WGS84 [longitude,latitude]; jeden zamknięty, prosty pierścień zewnętrzny bez otworów, do 512 wierzchołków wraz z domknięciem, dodatnia powierzchnia do 4 000 000 m². Walidator odrzuca pierścienie zdegenerowane; ostateczne przyjęcie wymaga sprawdzenia topologii i typu geography w PostGIS podczas obsługi żądania.",
"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,
"description": "Zarezerwowany kontrakt, niedostępny w bieżącej usłudze. Do 2 000 wyników w stałym zbiorze kursora. Wielokąt do 512 wierzchołków i 4 km²; jednostki TERYT obejmują cały powiat lub gminę. Zwykła strona kosztuje 1 kredyt; eksport kosztuje ceil(rows/100) zamiast ceny strony, bez podwójnej opłaty.",
"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": {
"default": 100,
"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": {
"description": "Adres PRG przy wyszukiwaniu według adresu.",
"type": [
"string",
"null"
]
},
"admin_gmina_teryt": {
"description": "Gmina administracyjna (parcel_record.admin_gmina_teryt), której kod przyjmuje /v1/gminy/{teryt}/planning.",
"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": {
"description": "Jednostka TERYT w identyfikatorze działki (parcel_record.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,
"description": "Podpisany przez serwer adres HTTPS uprawniający do pobrania zasobu; expires_at jest obowiązkowe. Walidator wymaga niepustego parametru signature w zapytaniu.",
"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,
"description": "Pozycja /v1/sources cytowana w odpowiedzi tematycznej. as_of to data danych źródłowych z ostatniej udanej aktualizacji, a nie czas żądania.",
"properties": {
"as_of": {
"format": "date",
"type": [
"string",
"null"
]
},
"attribution": {
"type": "string"
},
"fallback": {
"default": false,
"description": "Wartość true, gdy to źródło udzieliło odpowiedzi z powodu braku rekordu w źródle podstawowym, np. własny przegląd planów ogólnych przy braku wpisu w Rejestrze Urbanistycznym.",
"type": "boolean"
},
"id": {
"description": "Identyfikator źródła: source_status.source_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": {
"description": "ok: wynik obecny (HTTP 200). ambiguous: result=null, niepusta lista kandydatów (200, naliczana opłata). not_found: brak dopasowania do danych wejściowych (404, zwrot opłaty). not_covered: rozpoznano miejsce, ale nie obejmuje go żaden załadowany zbiór ani źródło (200, result=null, zwrot opłaty). error: zobacz error.code.",
"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"
}
]
}
},
"$id": "https://landfeed.pl/contracts/envelope.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"allOf": [
{
"$comment": "status error requires an error object.",
"if": {
"properties": {
"status": {
"const": "error"
}
},
"required": [
"status"
]
},
"then": {
"properties": {
"error": {
"type": "object"
}
}
}
},
{
"$comment": "status ambiguous requires at least one candidate.",
"if": {
"properties": {
"status": {
"const": "ambiguous"
}
},
"required": [
"status"
]
},
"then": {
"properties": {
"candidates": {
"minItems": 1
}
}
}
},
{
"$comment": "result is present only when status is ok.",
"if": {
"properties": {
"status": {
"not": {
"const": "ok"
}
}
},
"required": [
"status"
]
},
"then": {
"properties": {
"result": {
"type": "null"
}
}
}
},
{
"$comment": "the echo of an invalid input belongs to a status error response (400).",
"if": {
"properties": {
"query": {
"properties": {
"kind": {
"const": "invalid"
}
},
"required": [
"kind"
]
}
},
"required": [
"query"
]
},
"then": {
"properties": {
"status": {
"const": "error"
}
}
}
},
{
"if": {
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
"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"
}
}
}
}
],
"description": "Przekazane zapytanie i sposób jego rozpoznania. kind określa postać danych wejściowych; input zawiera otrzymane parametry zapytania, ścieżki lub treści żądania, więc błędne dane są powtarzane dokładnie w otrzymanej postaci. Bez kind pole input musi być poprawnym QueryInput, używanym już w każdym odczycie q|id|point.",
"properties": {
"input": {
"additionalProperties": false,
"description": "Powtórzone parametry żądania z dozwolonej listy. Kontrola prywatności obowiązuje także przed zwróceniem błędnych danych wejściowych.",
"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": {
"description": "Współrzędne WGS84 w stopniach dziesiętnych, w formacie lat,lng, np. „52.2297,21.0122”. Wskazują działkę zawierającą ten punkt.",
"pattern": "^-?[0-9]{1,2}(\\.[0-9]+)?, ?-?[0-9]{1,3}(\\.[0-9]+)?$",
"type": "string"
},
"q": {
"description": "Dowolny tekst wpisany przez użytkownika, np. „pogorzelec dziłaka 284/5”, „Marcinowice 221”, „Lesnowola 25/18”, „obręb 9 / O18”, adres albo pełny identyfikator w jednej z obsługiwanych postaci.",
"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": {
"description": "q, id, point: jeden poprawny wariant q|id|point (point obejmuje też parę lat+lng). none: brak q|id|point, np. GET /v1/sources bez danych wejściowych. bbox: GET /v1/search?bbox. polygon: POST /v1/search. path: odczyt według parametru ścieżki, input {teryt} dla /v1/gminy/{teryt}/planning. batch: POST /v1/parcel/batch, input {items, ...}; odpowiedź każdego elementu określa własny kind. invalid: HTTP 400 z danymi, które nie przeszły walidacji (np. q i id jednocześnie lub błędne id); wyłącznie przy statusie error.",
"enum": [
"q",
"id",
"point",
"none",
"bbox",
"polygon",
"path",
"batch",
"invalid",
"search",
"events",
"listing",
"check_batch",
"job"
],
"type": "string"
},
"resolved": {
"description": "Sposób rozpoznania działki lub gminy na podstawie danych wejściowych. Wartość null przy statusie ambiguous lub not_found.",
"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": {
"description": "Założenie przyjęte podczas rozpoznawania, np. „Lesnowola odczytano jako Lesznowola (dopasowanie przybliżone, obniżona pewność)”.",
"type": [
"string",
"null"
]
}
},
"required": [
"from",
"method",
"id",
"confidence"
],
"type": "object"
}
]
}
},
"required": [
"input",
"resolved"
],
"type": "object"
}
},
"required": [
"auth",
"plan"
]
}
},
{
"if": {
"allOf": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"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": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"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": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"properties": {
"meta": {
"properties": {
"operation": {
"const": "check"
}
},
"required": [
"operation"
]
},
"status": {
"const": "ok"
}
}
}
]
},
"then": {
"properties": {
"result": {
"$ref": "#/$defs/CheckResultV2"
}
}
}
},
{
"if": {
"allOf": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"properties": {
"meta": {
"properties": {
"operation": {
"const": "search"
}
},
"required": [
"operation"
]
},
"status": {
"const": "ok"
}
}
}
]
},
"then": {
"properties": {
"result": {
"$ref": "#/$defs/SearchResultV2"
}
}
}
},
{
"if": {
"allOf": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"properties": {
"meta": {
"properties": {
"operation": {
"const": "events"
}
},
"required": [
"operation"
]
},
"status": {
"const": "ok"
}
}
}
]
},
"then": {
"properties": {
"result": {
"items": {
"$ref": "#/$defs/EventV2"
},
"type": "array"
}
}
}
},
{
"if": {
"allOf": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"properties": {
"meta": {
"properties": {
"operation": {
"const": "check_batch"
}
},
"required": [
"operation"
]
},
"status": {
"const": "ok"
}
}
}
]
},
"then": {
"properties": {
"result": {
"$ref": "#/$defs/BatchCheckJob"
}
}
}
},
{
"if": {
"allOf": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"properties": {
"meta": {
"properties": {
"operation": {
"const": "check_job"
}
},
"required": [
"operation"
]
},
"status": {
"const": "ok"
}
}
}
]
},
"then": {
"properties": {
"result": {
"$ref": "#/$defs/BatchCheckJob"
}
}
}
},
{
"if": {
"allOf": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"properties": {
"meta": {
"properties": {
"operation": {
"const": "check_results"
}
},
"required": [
"operation"
]
},
"status": {
"const": "ok"
}
}
}
]
},
"then": {
"properties": {
"result": {
"$ref": "#/$defs/BatchCheckResults"
}
}
}
},
{
"if": {
"allOf": [
{
"properties": {
"meta": {
"properties": {
"contract_version": {
"const": "2.0.0"
}
},
"required": [
"contract_version"
]
}
},
"required": [
"meta"
]
},
{
"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"
}
}
}
},
{
"$comment": "Listing input/kind and operation bind bidirectionally, including error echoes; no confident selection.",
"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"
]
}
}
}
}
],
"description": "Każda odpowiedź /v1, udana lub błędna, przez REST lub MCP, ma format Envelope. Niejednoznaczność nie jest błędem: zwracane są HTTP 200, status ambiguous i kandydaci. Wartości nie są zgadywane: gdy państwo nie publikuje danych, coverage wynosi not_covered, a value jest null. Pole billing wskazuje naliczone i zwrócone opłaty oraz zastosowaną regułę. Dokumentacja: docs/landfeed/README.md, krok 1; uzasadnienie: context/research/cenogram-teardown-2026-10-12.md, części 8 i 9. Wersja kontraktu 2.0.0 dodaje wymagania: meta.contract_version włącza obowiązkowe informacje o pochodzeniu danych v2, a przestrzeń adresów HTTP i meta.api_version pozostają v1. Zgodność ze starszą wersją nie uprawnia do udostępniania danych z niezatwierdzonych źródeł.",
"properties": {
"auth": {
"$ref": "#/$defs/Auth"
},
"billing": {
"$ref": "#/$defs/Billing"
},
"candidates": {
"description": "Lista niepusta przy statusie ambiguous i zawsze zwracana przez /v1/resolve. Kandydaci są uporządkowani malejąco według pewności dopasowania. Agent ponawia wywołanie z id=<candidate.id> albo pokazuje listę użytkownikowi; nigdy nie wybiera bez jego wiedzy.",
"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": {
"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"
},
"flood": {
"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"
},
"landslide": {
"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"
},
"mpzp": {
"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"
},
"parcel": {
"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"
},
"pog": {
"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"
},
"protected": {
"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"
},
"wz": {
"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"
}
},
"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"
},
"description": "Dalsze wywołania, które agent może zaplanować, wraz z kosztem każdego z nich, np. {\"check\": {\"href\": \"/v1/check?id=...\", \"cost\": 1}}.",
"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": {
"default": false,
"description": "Wartość true, gdy numer działki występuje w kilku obrębach rozpoznanej gminy, a dane wejściowe nie wskazują jednego z nich.",
"type": "boolean"
},
"page": {
"$ref": "#/$defs/Page"
},
"plan": {
"$ref": "#/$defs/Plan"
},
"query": {
"$ref": "#/$defs/QueryEcho"
},
"result": {
"description": "Dane właściwe dla danego punktu API (openapi.yaml). Wartość null, gdy status jest inny niż ok.",
"type": [
"object",
"array",
"null"
]
},
"search_facets": {
"$ref": "#/$defs/FeatureSearchFacets"
},
"sources": {
"description": "Wszystkie źródła wykorzystane do ustalenia wyniku, bez powtórzeń. Każda odpowiedź tematyczna wskazuje także własne źródło.",
"items": {
"$ref": "#/$defs/SourceRef"
},
"type": "array"
},
"status": {
"$ref": "#/$defs/Status"
}
},
"required": [
"status",
"query",
"result",
"candidates",
"sources",
"billing",
"error",
"meta"
],
"title": "Format odpowiedzi landfeed 2.0.0 (zgodny z v1)",
"type": "object",
"x-contract-version": "2.0.0",
"x-layer-sources": {
"address": [
"prg_addresses"
],
"admin": [
"teryt_units"
],
"buildings": [
"bdot_buildings",
"bdot_buildings_attrs",
"egib_buildings"
],
"flood": [
"mzp_flood"
],
"landslide": [
"sopo_landslides"
],
"mpzp": [
"kimpzp_symbols",
"mpzp_boundaries"
],
"parcel": [
"egib_parcels"
],
"permits": [
"gunb_permits",
"permits_near_parcel"
],
"planning": [
"gmina_planning_status",
"kimpzp_symbols",
"mpzp_boundaries",
"pog_sweep",
"pog_zones",
"wz_possible"
],
"pog": [
"pog_sweep",
"pog_zones"
],
"prices": [
"rcn_clean_agg"
],
"protected": [
"gdos_protected"
],
"road_access": [
"bdot_roads",
"egib_dr_parcels",
"road_access_verdict"
],
"soil": [
"kieg_soil"
],
"wz": [
"pog_sweep",
"pog_zones",
"wz_possible"
]
}
}
curl example
curl --silent --show-error --request GET "https://mcp.agentdzialek.pl/v1/parcel" --get \
-H "X-Api-Key: ${LANDFEED_API_KEY}" \
--data-urlencode 'id=141803_2.0001.12/3'