{"openapi":"3.1.0","info":{"title":"Norme edilizie e urbanistiche — public norms API","version":"1.0.0","description":"Free, read-only search over a curated corpus of Italian building and planning norms (national, regional, comune) and the official regional price lists. Not legal advice: check every rule with the comune."},"servers":[{"url":"https://geometrai.ai"}],"paths":{"/api/geometra/public-norms/search":{"get":{"operationId":"searchNorme","summary":"Search Italian building and zoning norms","description":"Search a curated public corpus of Italian building and planning norms — national laws (e.g. DPR 380/2001), regional planning laws and comune rules (NTA, regolamento edilizio) — and return the most relevant passages with their document, article and date. Scope: national documents, plus the region's regional documents when a region (or a comune) is given, plus that comune's own documents when a comune is given. Use list_sources first if you need to know what is covered. With a comune or region, the result has a `coverage` block: when `covered` is false the corpus lacks that comune's (or region's) own documents — say so, give the user the website / whereToLook / whatToLookFor it lists, answer from the national and regional hits where they apply, and follow its `nextStep`. The corpus is Italian: quote it in Italian, translate only if the user writes in another language. Always cite the document title, the article (`section`) and its validAsOf date (\"vigente al\") when you use a passage, never an article you did not read here, link sourceUrl when present, and add that this is not legal advice and the rule must be checked with the comune (ufficio tecnico / SUE) before relying on it.","parameters":[{"name":"q","in":"query","required":true,"description":"What to look for, ideally in Italian (e.g. \"distanze minime tra edifici\", \"altezza massima zona B\").","schema":{"type":"string","minLength":2,"maxLength":500}},{"name":"region","in":"query","required":false,"description":"Italian region, as a key or a name (e.g. \"emilia-romagna\" or \"Emilia-Romagna\"). Keys: abruzzo, basilicata, calabria, campania, emilia-romagna, friuli-venezia-giulia, lazio, liguria, lombardia, marche, molise, piemonte, puglia, sardegna, sicilia, toscana, trentino-alto-adige-sudtirol, umbria, valle-d-aosta-vallee-d-aoste, veneto.","schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"comune","in":"query","required":false,"description":"Comune (municipality), as its 6-digit ISTAT code (e.g. \"037006\") or its name (e.g. \"Bologna\").","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"limit","in":"query","required":false,"description":"How many passages to return (1-25, default 8).","schema":{"type":"integer","minimum":1,"maximum":25}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid arguments","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited (see Retry-After)"}}}},"/api/geometra/public-norms/documents/{id}":{"get":{"operationId":"getDocument","summary":"Read a norm document","description":"Read the text of one document of the public norms corpus (or just one article of it, with `section`). Use it after search_norme to read the full article around a passage. The corpus is Italian: quote it in Italian, translate only if the user writes in another language. Always cite the document title, the article (`section`) and its validAsOf date (\"vigente al\") when you use a passage, never an article you did not read here, link sourceUrl when present, and add that this is not legal advice and the rule must be checked with the comune (ufficio tecnico / SUE) before relying on it.","parameters":[{"name":"id","in":"path","required":true,"description":"The document id from search_norme or list_sources.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"section","in":"query","required":false,"description":"Optional article / comma to return instead of the whole document: \"12\", \"art. 12\", \"art-12-comma-3\".","schema":{"type":"string","minLength":1,"maxLength":60}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid arguments","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited (see Retry-After)"}}}},"/api/geometra/public-norms/sources":{"get":{"operationId":"listSources","summary":"List the covered norm documents","description":"List the documents in the public norms corpus for a region and/or one comune: title, type (e.g. the comune's general plan and its status, adopted or approved, in the title/notes), level, comune, the date each text was checked as current (validAsOf) and its official source URL. Without arguments it returns `coveredRegions` (which regions and how many comuni are covered) and the national documents. Coverage is partial and grows over time; when a document the user needs is missing, say so instead of guessing its content. With a comune or region, the result has a `coverage` block: when `covered` is false the corpus lacks that comune's (or region's) own documents — say so, give the user the website / whereToLook / whatToLookFor it lists, answer from the national and regional hits where they apply, and follow its `nextStep`.","parameters":[{"name":"region","in":"query","required":false,"description":"Italian region, as a key or a name (e.g. \"emilia-romagna\" or \"Emilia-Romagna\"). Keys: abruzzo, basilicata, calabria, campania, emilia-romagna, friuli-venezia-giulia, lazio, liguria, lombardia, marche, molise, piemonte, puglia, sardegna, sicilia, toscana, trentino-alto-adige-sudtirol, umbria, valle-d-aosta-vallee-d-aoste, veneto.","schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"comune","in":"query","required":false,"description":"Comune (municipality), as its 6-digit ISTAT code (e.g. \"037006\") or its name (e.g. \"Bologna\").","schema":{"type":"string","minLength":1,"maxLength":120}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid arguments","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited (see Retry-After)"}}}},"/api/geometra/public-norms/prezzario":{"get":{"operationId":"searchPrezzario","summary":"Search the official regional price lists","description":"Search the official Italian regional price lists (prezzari regionali, latest edition per region) for work items and their unit prices (EUR, excluding VAT). Every word of the query (3+ letters) must appear in the item, so use one or two characteristic words (\"tramezzi\", \"intonaco civile\") and retry with fewer or different words when nothing comes back. Cite each item's code, unit, price and edition. Prices are the region's reference prices for public works, not a quote; say so when you use them.","parameters":[{"name":"q","in":"query","required":true,"description":"Work item to price, in Italian (e.g. \"pavimento in gres\", \"intonaco civile\") or a voce code.","schema":{"type":"string","minLength":2,"maxLength":200}},{"name":"region","in":"query","required":false,"description":"Region (key or name) whose official prezzario to search; omit to search every region's latest edition.","schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"limit","in":"query","required":false,"description":"How many price items to return (1-50, default 20).","schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid arguments","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limited (see Retry-After)"}}}}}}