{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Real Estate Transactions & Prices: São Paulo, Rio, BH",
    "description": "Official Brazil property transaction records (ITBI) for São Paulo, Rio de Janeiro and Belo Horizonte: ~3.9M declared values and price per m² in BRL, USD and EUR, monthly neighbourhood price statistics and an experimental São Paulo price index. API and AI-agent (MCP) ready.",
    "version": "0.1",
    "x-build-id": "h7LVdTlATxUwumXfR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pracadata~brazil-itbi-transactions/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pracadata-brazil-itbi-transactions",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/pracadata~brazil-itbi-transactions/runs": {
      "post": {
        "operationId": "runs-sync-pracadata-brazil-itbi-transactions",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/pracadata~brazil-itbi-transactions/run-sync": {
      "post": {
        "operationId": "run-sync-pracadata-brazil-itbi-transactions",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "city"
        ],
        "properties": {
          "dataset": {
            "title": "Dataset",
            "enum": [
              "transactions",
              "area_stats",
              "repeat_sales_index"
            ],
            "type": "string",
            "description": "What to return. `transactions`: one row per ITBI transaction (value, area, price per m², use, district, neighbourhood, postcode prefix); charged per row. `area_stats`: one row per area × use × month with transaction counts and price per m² percentiles (BRL, USD, EUR, inflation-adjusted BRL); charged per row, cheaper than transactions; the right choice for questions about medians, trends or comparisons. `repeat_sales_index`: quarterly São Paulo price index, experimental (São Paulo only). Default: transactions.",
            "default": "transactions"
          },
          "city": {
            "title": "City",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Required. One or more cities: `sao_paulo`, `rio_de_janeiro`, `belo_horizonte`. Coverage: São Paulo 2006 to Sep 2026 (day precision), Rio de Janeiro 2011 to Aug 2026 (month precision only), Belo Horizonte 2008 to Aug 2026 (day precision). `repeat_sales_index` only has `sao_paulo`.",
            "items": {
              "type": "string",
              "enum": [
                "sao_paulo",
                "rio_de_janeiro",
                "belo_horizonte"
              ],
              "enumTitles": [
                "São Paulo",
                "Rio de Janeiro",
                "Belo Horizonte"
              ]
            }
          },
          "date_from": {
            "title": "Date from",
            "type": "string",
            "description": "First transaction date, format YYYY-MM-DD (example 2025-01-01). `transactions`: compared to the transaction date; Rio dates are always the first day of the month, so use the first day of a month to include it. `area_stats`: only the year and month are used. `repeat_sales_index`: the quarter of the date. Optional; no value means from the start of the series."
          },
          "date_to": {
            "title": "Date to",
            "type": "string",
            "description": "Last transaction date, format YYYY-MM-DD (example 2025-12-31), inclusive. For `area_stats` only year and month are used. Optional; no value means up to the latest data. The latest two to three months are incomplete (see `note` = `recent_incomplete` in `area_stats`)."
          },
          "district_code": {
            "title": "District code",
            "pattern": "^[0-9]{1,12}$",
            "type": "string",
            "description": "IBGE district code, digits only (example 355030862 = Pinheiros, São Paulo). `transactions` and `area_stats` (matches `area_code` at level `district`). Not a name: to look a code up, run `area_stats` for the city with `area_level` = [`district`], a single month and `property_use` = [`all`], and read `area_code` and `area_name`."
          },
          "neighbourhood": {
            "title": "Neighbourhood",
            "maxLength": 80,
            "type": "string",
            "description": "Neighbourhood (bairro) name, Rio de Janeiro and Belo Horizonte only (São Paulo has districts, not neighbourhoods). Case and accents are ignored: `LEBLON`, `Leblon` and `leblon` are the same. Must match the name as published, for example `LEBLON` or `COPACABANA` (Rio); to list valid names run `area_stats` for the city with `area_level` = [`neighbourhood`], one month and `property_use` = [`all`], and read `area_name`. `transactions` and `area_stats`."
          },
          "postcode5": {
            "title": "Postcode prefix (5 digits)",
            "pattern": "^[0-9]{5}$",
            "type": "string",
            "description": "First 5 digits of the Brazilian postcode (CEP), example 05422. Exactly 5 digits; full 8-digit postcodes are refused. `transactions` only. Rio de Janeiro rows have no postcode."
          },
          "property_use": {
            "title": "Property use",
            "type": "array",
            "description": "Filter by property use, one or more values. `transactions`: `residential`, `commercial`, `land`, `parking`, `other`. `area_stats`: `residential`, `commercial` or `all` (every use together, including land and parking; use `all` for a total). Apartments and houses are both `residential`. No value means every use (for `area_stats`, this returns one row per use, so pass [`residential`] or [`all`] to avoid triple rows).",
            "items": {
              "type": "string",
              "enum": [
                "residential",
                "commercial",
                "land",
                "parking",
                "other",
                "all"
              ],
              "enumTitles": [
                "Residential (apartments and houses)",
                "Commercial",
                "Land (plot without building)",
                "Parking space",
                "Other",
                "All uses together (area_stats only)"
              ]
            }
          },
          "property_type": {
            "title": "Property type",
            "type": "array",
            "description": "Filter by property type, one or more values. `transactions`: `apartment`, `house`, `serviced_apartment`, `room_office`, `shop`, `warehouse`, `land`, `parking`, `other`; no value means every type (no filter). `area_stats`: only `all`, `apartment` or `house`; no value returns only the `all` rows (every type together), exactly as before this filter existed, so add [`apartment`] to get apartment statistics at the same cost per row. Apartment and house rows in `area_stats` have `property_use` = `all`, so do not combine them with `property_use` = `residential`. Not available for `repeat_sales_index`. The type comes from the source (São Paulo: IPTU use code; Belo Horizonte: construction type; Rio: typology); codes the source uses that are not classified become `other`.",
            "items": {
              "type": "string",
              "enum": [
                "apartment",
                "house",
                "serviced_apartment",
                "room_office",
                "shop",
                "warehouse",
                "land",
                "parking",
                "other",
                "all"
              ],
              "enumTitles": [
                "Apartment",
                "House",
                "Serviced apartment (flat, apart-hotel)",
                "Office or room (sala, consultório)",
                "Shop (loja)",
                "Warehouse (galpão, armazém, depósito)",
                "Land (plot without building)",
                "Parking space",
                "Other (industrial, school, hotel, and codes not classified)",
                "All types together (area_stats only)"
              ]
            }
          },
          "transaction_type": {
            "title": "Transaction type",
            "type": "array",
            "description": "Filter by the nature of the transfer. São Paulo only: Rio and Belo Horizonte sources have no transaction nature, so rows from those cities have a null type and are excluded if you set this filter. Use [`sale`] for market sales. `transactions` only.",
            "items": {
              "type": "string",
              "enum": [
                "sale",
                "rights_assignment",
                "adjudication_auction",
                "inheritance_partition",
                "exchange",
                "dation_in_payment",
                "capital_contribution",
                "corporate_restructuring",
                "fiduciary_default",
                "usufruct_use",
                "other"
              ],
              "enumTitles": [
                "Sale (compra e venda)",
                "Assignment of rights",
                "Court adjudication or auction",
                "Inheritance or partition",
                "Exchange",
                "Dation in payment",
                "Capital contribution",
                "Corporate restructuring",
                "Fiduciary default",
                "Usufruct or use",
                "Other"
              ]
            }
          },
          "value_min": {
            "title": "Minimum declared value (BRL)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum declared transaction value in Brazilian reais (BRL), nominal, as declared on the tax guide (example 500000). `transactions` only."
          },
          "value_max": {
            "title": "Maximum declared value (BRL)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum declared transaction value in Brazilian reais (BRL), nominal (example 2000000). `transactions` only."
          },
          "area_level": {
            "title": "Area level",
            "type": "array",
            "description": "`area_stats` only: which area levels to return, one or more of `city`, `district`, `neighbourhood`. Empty returns all three levels, which triples the rows and the cost; São Paulo has `city` and `district`, Rio has `city` and `neighbourhood`, Belo Horizonte has all three.",
            "items": {
              "type": "string",
              "enum": [
                "city",
                "district",
                "neighbourhood"
              ],
              "enumTitles": [
                "City (whole city)",
                "District (IBGE district)",
                "Neighbourhood (bairro; Rio and Belo Horizonte)"
              ]
            }
          },
          "segment": {
            "title": "Index segment",
            "type": "array",
            "description": "`repeat_sales_index` only (experimental, São Paulo): which property segments to return. Empty returns all three. `residential_all` = apartments and houses together.",
            "items": {
              "type": "string",
              "enum": [
                "residential_all",
                "apartment",
                "house"
              ],
              "enumTitles": [
                "Residential, all (apartments and houses)",
                "Apartments",
                "Houses"
              ]
            }
          },
          "max_rows": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of rows returned (1 to 100,000; default 1,000). Rows are charged one by one, so this is also the cost cap: 1,000 transaction rows is US$ 10, 1,000 statistics rows US$ 4. Set a small value (for example 10) to test a query. If the filter matches more rows, the rest is not returned: `RUN_SUMMARY.capped_by_max_rows` is true.",
            "default": 1000
          },
          "download_snapshot": {
            "title": "Download a whole city as Parquet",
            "type": "boolean",
            "description": "Paying Apify users only. Returns one city's entire transaction table as a Parquet file in the key-value store (event `snapshot-download`, US$ 500 per million rows started: São Paulo US$ 1,500, Rio de Janeiro or Belo Horizonte US$ 500). Requires dataset `transactions`, exactly one city and no other filter; the run's maximum charge must cover the whole amount. Leave off for normal queries.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}