brazil-itbi / README.md
pracadata's picture
update: build 2026-11-09
5908d77 verified
|
Raw History Blame Contribute Delete
19.6 kB
---
license: other
license_name: brazilian-municipal-open-data-by-city
license_link: https://huggingface.co/datasets/pracadata/brazil-itbi#source-and-attribution
language:
- en
- pt
pretty_name: Brazil ITBI Transactions, Belo Horizonte and São Paulo (free sample)
size_categories:
- 100K<n<1M
task_categories:
- tabular-regression
- tabular-classification
tags:
- brazil
- belo-horizonte
- sao-paulo
- real-estate
- property-transfer-tax
- itbi
- open-government-data
- tabular
configs:
- config_name: belo_horizonte_transactions
data_files: data/belo_horizonte_transactions.parquet
default: true
- config_name: belo_horizonte_area_stats_monthly
data_files: data/belo_horizonte_area_stats_monthly.parquet
- config_name: sao_paulo_transactions
data_files: data/sao_paulo_transactions.parquet
- config_name: sao_paulo_area_stats_monthly
data_files: data/sao_paulo_area_stats_monthly.parquet
---
# Brazil ITBI Transactions: Belo Horizonte and São Paulo (free sample)
Official **real-estate transfer-tax (ITBI) transactions of Belo Horizonte and São Paulo, Brazil**, cleaned, typed and published in the same English schema used by the full Brazil product: **Belo Horizonte, the whole series** (2008 to September 2026), and **São Paulo, the last 12 complete months** (September 2025 to August 2026). One row per transaction; no row carries an address or a property id (but see the privacy note below: the data is not anonymous).
> **Need the full São Paulo series, Rio de Janeiro or the API? → [Full product on Apify](https://apify.com/pracadata/brazil-itbi-transactions)**
> - **São Paulo from 2006** (this sample has only the last 12 complete months), **Rio de Janeiro** and Belo Horizonte in one schema.
> - **Monthly area statistics** for the whole history of all three cities, plus an **experimental São Paulo price index**.
> - **API and AI-agent access** (Apify API, schedules, MCP tool): filter by date, district, neighbourhood, use and value instead of downloading files.
>
> Pay per row: US$ 10 per 1,000 transaction rows, US$ 4 per 1,000 statistics rows (prices live since 14 Oct 2026; the Pricing tab on Apify is authoritative). `max_rows` caps the cost.
**This repository is the free sample: Belo Horizonte (whole series) and São Paulo (last 12 complete months).** Rio de Janeiro is not in it: its publisher declares no licence and a licence request under Brazil's access-to-information law (LAI, *Lei de Acesso à Informação*) is pending (see "Source and attribution").
### Free sample vs full product
| | This free sample (Hugging Face) | Full product (Apify Actor) |
|---|---|---|
| Cities | Belo Horizonte, São Paulo | São Paulo, Rio de Janeiro, Belo Horizonte |
| Period | Belo Horizonte 2008 to September 2026; São Paulo September 2025 to August 2026 | São Paulo 2006 on, Rio de Janeiro 2011 on, Belo Horizonte 2008 on |
| Monthly area statistics | Belo Horizonte (whole series) and São Paulo (same 12 months) | all three cities, whole history |
| São Paulo price index (experimental) | no | yes |
| Access | Parquet files, `datasets`, DuckDB | API, schedules, MCP tool for AI agents, filters |
| Licence and terms | per city: Belo Horizonte CC-BY 4.0; São Paulo municipal open data, attribution required; both with the conditions in "Terms" | per-city licences (Rio declares none); internal use, no bulk resale (see "Terms") |
| Price | free | pay per row (see above) |
Example: São Paulo residential sales in 2025, 10 rows, with [`apify-client`](https://docs.apify.com/api/client/python):
```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("pracadata/brazil-itbi-transactions").call(run_input={
"dataset": "transactions",
"city": ["sao_paulo"],
"date_from": "2025-01-01",
"date_to": "2025-12-31",
"property_use": ["residential"],
"transaction_type": ["sale"],
"max_rows": 10,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["transaction_date"], row["value_declared_brl"], row["price_per_m2_brl"])
```
## What is ITBI?
ITBI (*Imposto sobre a Transmissão de Bens Imóveis*) is the municipal tax paid when a property changes hands in Brazil. Each city publishes the transactions on which it was paid (each payment is documented by a tax guide, a *guia*), with the **value declared by the parties** (and, in some cities, the value used as the tax base). It is a different signal from asking prices: it is what the parties declared to the tax authority at the moment of the transfer. Amounts are in Brazilian reais (BRL), nominal (not adjusted for inflation).
## What is in this repository
| File | Rows | Content |
|---|---|---|
| `data/belo_horizonte_transactions.parquet` (config `belo_horizonte_transactions`) | 516,725 | every Belo Horizonte transaction, 2008-01 to 2026-09, 36 columns |
| `data/belo_horizonte_area_stats_monthly.parquet` (config `belo_horizonte_area_stats_monthly`) | 168,949 | monthly price and liquidity statistics by city, district and neighbourhood, for all property types (`property_type = all`), apartments and houses |
| `data/sao_paulo_transactions.parquet` (config `sao_paulo_transactions`) | 237,390 | São Paulo transactions of the last 12 complete months, 2025-09 to 2026-08, 36 columns |
| `data/sao_paulo_area_stats_monthly.parquet` (config `sao_paulo_area_stats_monthly`) | 5,563 | the same statistics for São Paulo, for the same 12 months |
| `sample/belo_horizonte_transactions_sample_1000.csv`, `sample/sao_paulo_transactions_sample_1000.csv` | 1,000 each | a 1,000-row slice of each city's transactions, for a quick look |
| `DATA_DICTIONARY.md` | | every column: type, definition, where it is null |
| `manifesto.json` | | files, row counts, SHA-256 of each file, licence and attribution per city, date of the data build |
```python
from datasets import load_dataset
bh = load_dataset("pracadata/brazil-itbi", "belo_horizonte_transactions")
sp = load_dataset("pracadata/brazil-itbi", "sao_paulo_transactions")
```
```sql
-- DuckDB
select year, median(price_per_m2_brl) from 'data/belo_horizonte_transactions.parquet'
where property_use = 'residential' and price_per_m2_brl is not null group by 1 order by 1;
```
Every row has `city` and `licence`, so the two cities can be stacked and still be told apart.
## Source and attribution
**Belo Horizonte.** Source: Prefeitura de Belo Horizonte, Secretaria Municipal de Fazenda, open data portal (CKAN), dataset "ITBI relatórios". The publisher licenses it under **CC-BY**.
**You must credit it: "Fonte: Prefeitura de Belo Horizonte, dados abertos".** Rows carry `licence = "CC-BY"`.
**São Paulo.** Source: Prefeitura de São Paulo, Secretaria Municipal da Fazenda, "Dados das Transações Imobiliárias com recolhimento de ITBI". The files are subject to the city's **Municipal Open Data and Active Transparency Policy** (Lei Municipal 17.901/2023, regulated by Decreto Municipal 63.463/2024), which requires crediting the source. The Finance Department confirmed this in an access-to-information (LAI) response (e-SIC protocol 103469, 29 October 2026); it is a LAI response, not a licence published on the city's page. Rows carry `licence = "open data (attribution)"`.
**You must credit it: "Fonte: Prefeitura de São Paulo, Secretaria Municipal da Fazenda".** The conditions that come with the São Paulo data (no re-identification of taxpayers, no association of the city with your analyses) are in "Terms".
Exchange rates: ECB euro reference rates (USD/BRL derived cross rate). Inflation: IBGE IPCA. This repository is a derived work and is **not official**; for the reference data use the sources. **Not affiliated with, endorsed by or approved by the City of São Paulo or its Finance Department**, nor by the Prefeitura de Belo Horizonte. Every row carries `source_url` (the source file) and `source_file_sha256`.
A *district* is an IBGE administrative subdivision of the city (a few per city); a *neighbourhood* (*bairro*) is the finer, locally named area. Districts come from the 2022 Census geography of IBGE; locations are derived with IBGE address-count data (CNEFE) and are generalised (see "What was removed"). "IBGE" is Brazil's national statistics institute; "CNEFE" is its national address register for the census; both are used only to place rows on a map area, never published as addresses.
## Coverage
**Belo Horizonte** (whole series)
- 516,725 transactions, 2008-01-02 to 2026-09-30; date = day the tax was paid (`date_precision = day`). Refreshed monthly in the full product; this sample is a snapshot (see `manifesto.json`).
- Transaction type is **not available** for this city (`transaction_type` is null). The tax base is available (`value_tax_base_brl`).
- Use (`property_use`): residential 416,505 · commercial 48,673 · parking 24,983 · land 22,500 · other 4,064. Price per m² is available for 479,538 rows.
- Property type (`property_type`): apartment 350,067 · house 60,590 · room_office 28,799 · parking 24,983 · land 22,500 · shop 16,058 · other 13,728.
- Building age (`building_age_band`) is filled for 494,172 rows (94,253 have `is_new_build = true`); it is null for land and where the source has no plausible construction year.
**São Paulo** (last 12 complete months only)
- 237,390 transactions, 2025-09-01 to 2026-08-31. The window ends at the latest month that the statistics do not flag `recent_incomplete` (the most recent months are still receiving late filings and are left out), and covers 12 months counting back from it. The full series (from 2006) and the snapshot download are the paid product. The monthly area statistics cover the same months.
- Transaction type (`transaction_type`): sale 213,590 · capital_contribution 6,781 · dation_in_payment 5,830 · fiduciary_default 3,823 · adjudication_auction 2,165 · rights_assignment 1,939 · exchange 1,650 · inheritance_partition 860 · corporate_restructuring 406 · other 333 · usufruct_use 13. Sales can be separated from other transfers. The tax base is available (`value_tax_base_brl`).
- Use (`property_use`): residential 122,904 · land 44,870 · other 29,592 · commercial 27,201 · parking 12,823. Price per m² is available for 121,733 rows (it is null where only a share of the property was transferred; see the data dictionary).
- Property type (`property_type`): apartment 82,314 · land 44,870 · house 40,225 · other 30,879 · parking 12,823 · shop 12,294 · room_office 6,787 · warehouse 4,206 · serviced_apartment 2,992.
- Building age (`building_age_band`) is filled for 192,520 rows (6,334 have `is_new_build = true`).
- Location (`geo_precision`): block_centroid 228,034 · sector_centroid 8,516 · postcode5 840 (0 rows with no location).
## Schema
Full definitions in [`DATA_DICTIONARY.md`](DATA_DICTIONARY.md). Main columns: `transaction_id`, `transaction_date`, `year_month`, `value_declared_brl`, `value_tax_base_brl`, `value_flag`, `built_area_m2`, `price_per_m2_brl`, `value_declared_usd`, `value_declared_eur`, `price_per_m2_usd`, `price_per_m2_eur`, `value_declared_brl_real`, `price_per_m2_brl_real`, `property_use`, `property_type`, `building_age_band`, `is_new_build`, `neighbourhood`, `district_code`, `postcode5` (first 5 digits of the Brazilian postcode, the CEP), `lat`, `lon`, `geo_precision`, `source_url`, `licence`.
`value_flag` marks, without removing: `symbolic` (declared value of BRL 1,000 or less) and `multi_unit_guide` (the tax guide sums several units, so the value covers more than the unit area).
`property_type` is `apartment`, `house`, `serviced_apartment`, `room_office`, `shop`, `warehouse`, `land`, `parking` or `other` (from the source's building-type code; codes not classified are `other`). `building_age_band` is the age of the building in the transaction year: `new` (2 years or less, **including off-plan sales**, where the construction year is after the transaction year), `3_10`, `11_25` or `26_plus`; `is_new_build` is true for 1 year or less (off-plan included). The exact construction year is not published.
`geo_precision` tells what `lat`/`lon` are: in Belo Horizonte `face_centroid` (the centre of one side of a street block, a "block face"), `postcode_centroid`, `neighbourhood_centroid` or `none` (119 rows); São Paulo uses its own levels (listed under Coverage), such as the centre of a city block.
## Known limitations
- **One-off ID change (Rio, full product).** On 14 October 2026, 47,322 Rio de Janeiro transaction_id values from 2025 onwards changed once because the city republished the file with normalised street names; IDs from 2011–2024 are unchanged. This sample (Belo Horizonte and São Paulo) is unaffected.
- **Belo Horizonte has a gap between June 2014 and April 2015** (46–78 rows per month in June–December 2014 against about 2,400 elsewhere): missing source data, not a market drop. The delayed load arrived in May–August 2015 (peak of 10,150 rows in August 2015). In `belo_horizonte_area_stats_monthly` these cells are flagged in `note` (`bh_source_gap`, `bh_source_backlog`).
- **Late filings revise past months**: the latest two to three months of each city are incomplete and flagged `recent_incomplete` in the statistics; counts grow in later releases. In São Paulo those months are left out of this sample, so the window ends before them; the full product has them, flagged.
- **`n_transactions_yoy_pct`** (statistics) compares each month with the same month one year earlier, so in the São Paulo file it also reflects the year before the window, which is not included in this sample.
- **`geo_precision` varies**: in Belo Horizonte 74% of rows are placed on a block face, 20% on a postcode area, 6% on a neighbourhood. It is not comparable with other cities (a Rio street centroid is a whole street; a São Paulo block centroid is a city block).
- **Price per m² is a declared value divided by the built area of the unit.** It is null for land, for symbolic values and for rows without area. 2% of Belo Horizonte tax guides sum several units (`multi_unit_guide`). A few thousand rows are still outside BRL 100–200,000 per m² (not removed).
- **Belo Horizonte has no transaction type**, so gifts, swaps and other non-market transfers cannot be separated from sales there. São Paulo has.
- **Declared values**, not appraisals; `value_declared_brl` is nominal BRL. USD, EUR and constant-BRL columns convert it at the monthly average rate (ECB) or IPCA (IBGE) of the month the tax was paid, which is not the deal date; see the data dictionary. A neighbourhood label can be null (13 Belo Horizonte source rows carried a spreadsheet error and were set to null).
- **Licences differ by city**: Belo Horizonte is CC-BY; São Paulo is municipal open data with attribution required. In the full product Rio de Janeiro has none declared.
## What was removed, and why (privacy)
The source files contain the full address (street, number, unit), and some cities also a tax-registry id or registry number. A property is identifiable from these, and through the property registry, so is its owner; this is personal data under Brazil's data-protection law (LGPD). This dataset therefore **does not contain**: street, address, street number, unit or complement, tax-registry id (in São Paulo called SQL, *Setor-Quadra-Lote*, a tax number unrelated to the database language), registry number (*matrícula*, the property-registry id), owner names, plot or block codes, plot area, frontage, or any plot-level coordinate.
Locations are **generalised centroids**: a published point must represent at least 2 addresses (k ≥ 2) and must not coincide with an address; otherwise the row moves to a coarser level (block face → postcode → neighbourhood). `transaction_id` is a salted hash of the source row, not reversible to an address. The data contains no personal names.
**Limit of this protection.** Removing the identifiers does not make a row unlinkable from the public record it came from. Every row carries `source_url`, which points to the city's public file, and that file does contain the full address; date + declared value + area can also be matched against it. The dataset promises what it removes (no address, property or tax id, or plot-level coordinate in the rows), not that nobody can re-identify a transaction by going to the public source. Treat it as public records about property transactions, not as anonymised data, and do not use it to identify, locate or contact individuals. **For São Paulo this is also a condition of the source** (see "Terms").
## How to cite
```bibtex
@dataset{brazil_itbi_sample,
title = {Brazil ITBI Transactions, Belo Horizonte and São Paulo (free sample)},
author = {pracadata},
year = {2026},
url = {https://huggingface.co/datasets/pracadata/brazil-itbi},
note = {Derived from open data of the Prefeitura de Belo Horizonte (CC-BY) and the Prefeitura de São Paulo (municipal open data policy). Fonte: Prefeitura de Belo Horizonte, dados abertos. Fonte: Prefeitura de São Paulo, Secretaria Municipal da Fazenda}
}
```
## Language note
Column names and categories are English. Some free-text fields keep the source's Portuguese: `neighbourhood` and `district_name` (place names), `property_use_source` (the source's own code or label) and the pages behind `source_url`.
## Terms
- **Belo Horizonte is CC-BY 4.0.** You may use and redistribute it, including commercially, **if you credit "Fonte: Prefeitura de Belo Horizonte, dados abertos"** and indicate that it is a derived, unofficial work.
- **São Paulo is municipal open data with attribution required.** You may use, copy, modify and share it, including commercially, **if you credit "Fonte: Prefeitura de São Paulo, Secretaria Municipal da Fazenda"** and indicate that it is a derived, unofficial work. The Finance Department's response also sets two conditions, which apply to this repository as a whole:
- **No re-identification.** Do not use the data to re-identify taxpayers or to expose the wealth or property situation of an individual: no reverse engineering, no improper cross-referencing (for example with a property registry, an IPTU record by plot or owner data). The Finance Department states that this is legally forbidden (tax secrecy, art. 198 of the Código Tributário Nacional).
- **No endorsement.** Do not state or suggest that the City of São Paulo or its Finance Department endorses, or took part in, your analyses, conclusions or interpretations of the data.
- **No warranty:** provided as is, from public sources, with the limitations in this card. Not an appraisal and not official.
- **The full product has stricter terms.** The São Paulo history, Rio de Janeiro and statistics data in the Apify Actor is for internal use; reselling or redistributing the raw data in volume is not allowed there.
- **Cities can be withdrawn:** if a municipality restricts the reuse of its data, a city may be removed from the product (and, if the publisher changes the licence, from this sample going forward).
- **Price per m²** mixes every nature of transfer in Belo Horizonte (the source has no transaction type); in São Paulo the transaction type lets you filter sales.
## Contact
Questions, corrections or a city you need: open a discussion on this repository.
**Full São Paulo history, Rio de Janeiro, statistics, API:** the full product is the Apify Actor, <https://apify.com/pracadata/brazil-itbi-transactions>.
**Data subjects** (removal of a row, or a data-protection / LGPD question): write to `lucashpissaia@gmail.com`.