API, MCP et données ouvertes
Les mêmes données que sur le site, lisibles par une machine : programmes neufs avec prix par typologie et dates de livraison, guides « où vivre », chiffres clés de chaque commune (INE), le baromètre de la construction, IMT et droit de timbre à l'achat, taux d'IMI des 308 communes. Sans clé et sans inscription.
Mis à jour le
API HTTP
JSON sur HTTPS, sans authentification. Le schéma OpenAPI est en fin de liste : c'est lui que lisent les outils.
GET |
/api/v1/barometer/official.csv |
The official INE series the barometer is checked against |
GET |
/api/v1/barometer/sce.csv |
ADENE energy-certificate statistics (SCE) for new housing |
GET |
/api/v1/barometer/series |
The same barometer series as JSON, with attribution |
GET |
/api/v1/barometer/series.csv |
Building-permit barometer: monthly case counts per municipality |
GET |
/api/v1/construction-barometer |
Construction barometer: building-works cases and INE licences |
POST |
/api/v1/consultation |
Send a request to flatin.pt, a licensed estate agency (two steps) |
GET |
/api/v1/facts.json |
Dated facts about Portugal, each with its primary source |
GET |
/api/v1/funnel |
Housing pipeline by municipality: cases, licences, completions |
GET |
/api/v1/funnel.csv |
Housing pipeline of the 308 municipalities, as CSV |
GET |
/api/v1/glossary |
Glossary of Portuguese home-buying terms: the list |
GET |
/api/v1/glossary/{term} |
One glossary term: definition, law reference and page |
GET |
/api/v1/imi/rates |
IMI rates for all municipalities |
GET |
/api/v1/imi/rates-history.csv |
Every verified year of IMI rates in one CSV file |
GET |
/api/v1/imi/rates.csv |
The same rates as one CSV file |
GET |
/api/v1/imi/rates.geojson |
IMI rates with municipality boundaries (GeoJSON) |
GET |
/api/v1/imi/rates/{codigo} |
IMI rate of one municipality |
POST |
/api/v1/imt/calculate |
What a purchase costs on top of the price |
GET |
/api/v1/licensing-duration |
Age of licensing cases in progress: Porto and Lisbon |
GET |
/api/v1/licensing-duration.csv |
Age of licensing cases in progress, as CSV |
POST |
/api/v1/mortgage/calculate |
Mortgage payment, minimum income and cash at the deed |
GET |
/api/v1/municipalities/compare |
Compare 2 to 5 municipalities side by side |
GET |
/api/v1/municipalities/{municipality}/stats |
Everything flatin.pt publishes about one municipality |
GET |
/api/v1/newbuilds |
Search new-build projects in Portugal |
GET |
/api/v1/newbuilds/{slug} |
One new-build project: prices, status, purchase cost, nearby |
GET |
/api/v1/open-data-coverage |
The same open-data index as JSON, with attribution |
GET |
/api/v1/open-data-coverage.csv |
Open data of the 308 municipalities: what each one publishes |
GET |
/api/v1/reports/obra-nova.json |
Monthly report 'Obra nova em Portugal': list of editions |
GET |
/api/v1/reports/obra-nova/{edition}.csv |
One edition of the monthly new-build report as CSV |
GET |
/api/v1/reports/obra-nova/{edition}.json |
One edition of the monthly new-build report as JSON, with attribution |
POST |
/api/v1/subscriptions |
Subscribe an email to new developments or construction |
GET |
/api/v1/where-to-live |
Where-to-live guides: the list of cities and regions |
GET |
/api/v1/where-to-live.csv |
Where to live in Portugal: the city guides compared, as CSV |
GET |
/api/v1/where-to-live/{city} |
Where to live in a city: verdict by area, noise and safety |
GET |
/api/openapi.json |
OpenAPI 3.1 |
Serveur MCP
Pour les assistants qui appellent des outils. Transport Streamable HTTP, sans sessions : envoyez du JSON-RPC en POST à l'adresse ci-dessous. Un GET répond 405 — il n'y a pas de flux SSE ici.
https://flatin.pt/mcp
Outils du serveur
imt_calculate- Use this when asked what a home purchase in Portugal costs on top of the price: IMT, stamp duty and Casa Pronta registration, by the 2026 tables. Do not use it for the yearly property tax (
imi_annual_cost) or to define a term such as VPT (glossary_lookup). Both taxes are charged on the higher ofvalueandvpt: pass the VPT when known.tax_haven_companytakes precedence overnon_resident.buyer_is_youngapplies only whenprimary_homeis true. For a non-resident buyer the answer says what the Tax Authority annuls later on request. required_income- Use this when asked what net monthly income and savings it takes to buy a home in Portugal at a given price, under the Banco de Portugal rules. Do not use it for the purchase taxes alone (
imt_calculate). imi_rate- Use this when only the yearly IMI (municipal property tax) rate of one Portuguese municipality is needed, by name or code, with its history by year. Do not use it for the yearly amount on a VPT (
imi_annual_cost) or for several municipalities side by side (compare_municipalities). Rates: Autoridade Tributária portal, all 308 municipalities. Where the rate is set per parish, the answer says so instead of giving a number. imi_annual_cost- Use this when the yearly IMI amount on an urban property (prédio urbano) is needed, from its taxable value (VPT) and its municipality's urban rate. Do not use it for the rate alone (
imi_rate) or for the one-off purchase taxes (imt_calculate). The VPT is the Tax Authority's valuation on the caderneta predial, not the price: ask the user for it. Only the urban rate is applied; rural property, AIMI and surcharges on vacant homes are not calculated. A municipality whose rate is set per parish is refused (rate_by_freguesia). request_consultation- Use this when the person wants flatin.pt (licensed estate agency, AMI 28163) to contact them about buying a new-build apartment in Portugal. Do not use it to send the request (
submit_consultation) or for emails about new projects (subscribe_digest). mode=link returns the form link and the consent text; mode=prepare checks the details and returns a summary, the GDPR (RGPD) consent text and a confirmation_token. Nothing is sent. submit_consultation- Use this when the person has read the summary and consent text from
request_consultationmode=prepare and explicitly agreed to send the request. Do not use it before that (request_consultation). Pass the same details, the token, consent=true and consent_text_version; never set consent=true on your own. Changed details, a token under 5 seconds or over 30 minutes old, or an outdated consent version are refused. subscribe_digest- Use this when the person asks to be emailed about new-build projects matching a filter (daily) or new construction licensed in one municipality (weekly). Do not use it to have flatin.pt contact them (
request_consultation) or to see what is on sale now (search_newbuilds). Ask the person first; nothing is active until they click the confirmation email.cityis required for construction andparishworks only there;typology, the prices andon_salework only with new_developments. The answer is the same whether or not the address was already subscribed: never say it was. where_to_live- Use this when the person is choosing a neighbourhood: a flatin.pt city guide's verdict area by area, with the reason, who each area suits and the sources. Do not use it for one municipality's figures (
municipality_stats) or for new homes there (search_newbuilds). Withoutcityit lists the cities and regions that have a guide.profilenarrows the areas but never hides the ones we advise against. Noise and safety come as dated, sourced facts: a place's reputation, never a claim about its people. Show the guide's link to the user. municipality_stats- Use this when the key figures of one of Portugal's 308 municipalities are needed, each with its source and date. They are the IMI rate and history, INE sale price per m² (actual sales), purchasing power, population, licensed dwellings, building cases, new builds. Do not use it to compare places (
compare_municipalities), inside a city (where_to_live) or for monthly building (construction_barometer). A figure that is not published is null, not estimated. A name matching two municipalities is refused with candidates. compare_municipalities- Use this when the person is choosing between two to five Portuguese municipalities, with the same figures for each as
municipality_stats. Do not use it for a single municipality (municipality_stats) or for the areas inside one city (where_to_live). Names that point at the same municipality count once, and fewer than two distinct ones are refused (bad_count). One unknown or ambiguous name refuses the whole comparison. construction_barometer- Use this when the question is how much is being built in Portuguese municipalities. It gives our monthly count of building-works cases entering licensing, where we collect them, and INE's yearly licensed buildings and new dwellings for all 308. Do not use it for other figures (
municipality_stats). Withoutmunicipalityit returns every municipality we collect and the panel index.measureandgranularitychange only our own series. A case is not a granted licence or a building. municipality_housing_pipeline- Use this when one municipality's housing pipeline from licence to completion is needed: cases, INE licences and completions, units for sale. Do not use it for monthly building activity (
construction_barometer). Periods differ by stage; unknown is null, not 0. glossary_lookup- Use this when asked what a Portuguese home-buying or tax term means (CPCV, escritura, VPT…), with where it comes up and the article of law with a link. Do not use it to calculate anything: purchase taxes are
imt_calculate, the yearly taximi_annual_cost. Withouttermit lists all terms. A term without a translation comes in English; an unknown one is refused with close spellings, if any. search_newbuilds- Use this when the person wants to find published new-build projects (empreendimentos) in Portugal on flatin.pt. Do not use it for one project's details (
get_newbuildwith its slug) or for how much is being built (construction_barometer). Withtypology, the budget applies to those typologies' prices; projects without a published price drop out when a budget is given. Pass next_offset asoffsetfor the next page. A misspelt filter is refused, not ignored. Prices are as checked on developers' pages or agency listings, dated. get_newbuild- Use this when one new-build project in Portugal is needed in detail, by slug (from
search_newbuilds) or page URL. It gives units and prices per typology, price history, delivery promises and how often they moved, building permits, the developer, the purchase cost and what is nearby. Do not use it to search (search_newbuilds) or for taxes at another price or for a non-resident (imt_calculate). The purchase cost is at the cheapest available unit or the developer's from-price, for a buyer tax resident in Portugal.primary_homeandbuyer_is_youngchange only the purchase cost. An unknown slug is refused (not_found). Cite the page URL, given in all seven site languages.
Deux actions sont faites au nom de la personne. La demande à flatin.pt (licence AMI n° 28163) passe par deux outils : request_consultation avec mode=prepare renvoie le texte de consentement et un code, sans rien envoyer ; submit_consultation envoie la demande avec ce code, consent=true et la version du texte, seulement après que la personne a lu le texte et accepté. subscribe_digest envoie seulement un e-mail de confirmation — rien n'est actif avant le clic. Les mêmes actions en REST : POST /api/v1/consultation et POST /api/v1/subscriptions.
Révisions du protocole prises en charge : 2025-06-18, 2025-11-25
Données ouvertes
Les taux d'IMI de toutes les communes dans un fichier, sous licence CC BY 4.0. La page du jeu de données dit ce qu'il contient et quand il a été vérifié.
- CSV 308 · 2025
- Taux de la taxe foncière portugaise en données ouvertes
- Taux d'IMI de 308 communes : données pour la presse
Aussi publié sur dados.gov.pt · data.europa.eu
Baromètre de la construction
Notre propre indicateur mensuel : combien de dossiers de travaux entrent dans la procédure d'autorisation de chaque mairie. Un dossier compte dès son entrée dans la procédure ; il peut encore être refusé ou retiré, ou ne jamais aboutir à un chantier. À côté, pour comparaison, deux statistiques d'autres éditeurs, reproduites telles qu'elles sont publiées. La couverture est partielle et s'étend ; la méthodologie explique ce qui est compté.
barometer/series.csv- flatin.pt compte cette série à partir des données ouvertes des mairies elles-mêmes et la publie sous CC BY 4.0. Crédit : flatin.pt, avec un lien vers flatin.pt. Texte de la licence : CC BY 4.0
barometer/official.csv- La série officielle à laquelle le baromètre est confronté, reproduite sans modification. Source : INE — Instituto Nacional de Estatística, Portugal, sous licence CC BY 4.0. Si vous réutilisez ces chiffres, créditez cette source. Texte de la licence : CC BY 4.0
barometer/sce.csv- Statistiques des certificats énergétiques du logement neuf, par mois et par commune, reproduites sans modification : pré-certificats au stade du projet et certificats de bâtiments achevés. Un pré-certificat est délivré pour chaque logement au stade du projet, avant le permis de construire. Créditez la source : ADENE — SCE. L'éditeur ne déclare aucune licence pour ces statistiques, et nous n'en accordons aucune.
open-data-coverage.csv- Données ouvertes d'urbanisme dans les 308 communes — état de la publication. CC BY 4.0
Notre série est conservée par instantanés, et chaque réponse porte la date de l'instantané d'où elle vient. Citez cette date et le chiffre reste reproductible après révision de la série.
- Baromètre de la construction par commune
- Méthodologie du baromètre
- Du permis au logement achevé, commune par commune
- Données ouvertes d'urbanisme dans les 308 communes
- Conditions d'utilisation
Aussi publié sur dados.gov.pt · data.europa.eu
Trois règles
Les chiffres de l'API sont ceux du site.
Chaque réponse porte un champ attribution : qui a calculé, d'après quelle table et quelle année, avec le lien. Montrez-le à votre lecteur.
La fréquence est limitée : 120 requêtes par minute et par adresse en REST, 60 en MCP. Le refus arrive en 429 et indique dans combien de secondes revenir. Le jeu complet tient dans un seul fichier — inutile de le parcourir commune par commune.
État du service, journal des modifications et descriptions lisibles par machine (en anglais) : Status · Changelog · Rate limits · APIs.json · llms.txt