{
  "openapi": "3.0.1",
  "info": {
    "title": "Madlan Scraper - Israel Sold Prices & Neighbourhood Data",
    "description": "Scrape Madlan.co.il: closed sale prices back to 2004, price per sqm, rent yields, demographics, schools and area analysis for any Israeli city or neighbourhood.",
    "version": "1.0",
    "x-build-id": "uIPAA0XzgmVJlqzln"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~madlan-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-madlan-property-scraper",
        "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/sian.agency~madlan-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-madlan-property-scraper",
        "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/sian.agency~madlan-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-madlan-property-scraper",
        "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",
        "properties": {
          "operation": {
            "title": "🎯 What do you want to scrape?",
            "enum": [
              "transactions",
              "priceBenchmarks",
              "areaReport"
            ],
            "type": "string",
            "description": "Pick one per run. Sold Transactions returns the closed sale records Madlan publishes for an area — price, price per square meter, rooms, size, floor, year built and the block/parcel — going back as far as 2004 on a neighbourhood. Price Benchmarks returns the median buy price, rent and gross yield per apartment size, for the neighbourhood, its city and the country side by side, each with its quarterly history. Area Report returns one row per area holding the demographics, the price table, the…",
            "default": "transactions"
          },
          "areaUrls": {
            "title": "🔗 Madlan area or address pages",
            "type": "array",
            "description": "Paste Madlan page addresses to read exactly the areas you already have in hand — an area page (/area-info/…) for a city or a neighbourhood, or an address page (/address/…) for one building. Anything pasted here is used verbatim, so a page you opened in your browser is the page the run reads. Leave it empty and the run uses the place names below instead.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "cities": {
            "title": "🏙️ Cities and towns",
            "type": "array",
            "description": "City or town names in Hebrew, matched against the 1,206 settlements Madlan publishes an area page for. A city returns the most recent 1,000 deals, which is where Madlan's payload stops; name a neighbourhood below when you want the full history instead.",
            "default": [
              "תל אביב יפו"
            ],
            "items": {
              "type": "string"
            }
          },
          "neighbourhoods": {
            "title": "🏘️ Neighbourhoods",
            "type": "array",
            "description": "Neighbourhood names in Hebrew, matched against the 1,755 neighbourhoods Madlan publishes. A neighbourhood usually carries its deals back to 2004. Write the neighbourhood on its own (רמת הטייסים) or with its city (רמת הטייסים, תל אביב יפו) when the name repeats around the country.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Max records",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many records. A single Tel Aviv page can hold 1,000 deals, so this is the control that decides what a run costs.",
            "default": 200
          },
          "fromYear": {
            "title": "📅 Sold from year",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Keep only deals closed in this year or later. Leave at 0 for every year Madlan holds. Neighbourhood pages typically reach back to 2004; a city page only carries its most recent 1,000 deals, so an early year there returns little.",
            "default": 0
          },
          "toYear": {
            "title": "📅 Sold up to year",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Keep only deals closed in this year or earlier. Leave at 0 for no upper bound.",
            "default": 0
          },
          "minPrice": {
            "title": "💵 Min price (₪)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only deals that closed at or above this amount, in shekels. Leave at 0 for no floor.",
            "default": 0
          },
          "maxPrice": {
            "title": "💰 Max price (₪)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only deals that closed at or below this amount, in shekels. Leave at 0 for no ceiling.",
            "default": 0
          },
          "minRooms": {
            "title": "🚪 Min rooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Keep only deals with at least this many rooms. Israeli room counts include half rooms, so 3 keeps a 3.5-room flat.",
            "default": 0
          },
          "maxRooms": {
            "title": "🚪 Max rooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Keep only deals with at most this many rooms. Leave at 0 for no ceiling.",
            "default": 0
          },
          "minSizeSqm": {
            "title": "📐 Min size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only deals at or above this registered floor area in square meters.",
            "default": 0
          },
          "maxSizeSqm": {
            "title": "📐 Max size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only deals at or below this registered floor area in square meters.",
            "default": 0
          },
          "benchmarkSizes": {
            "title": "🏗️ Apartment sizes",
            "uniqueItems": true,
            "type": "array",
            "description": "Which apartment sizes the Price Benchmarks run should return, using Madlan's own keys — 1 through 10 for room counts, or duplex, penthouse, mini_penthouse, single_family, garden_apartment, all. Leave empty for every size Madlan publishes.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "duplex",
                "penthouse",
                "mini_penthouse",
                "single_family",
                "garden_apartment",
                "all"
              ],
              "enumTitles": [
                "🚪 1 room",
                "🚪 2 rooms",
                "🚪 3 rooms",
                "🚪 4 rooms",
                "🚪 5 rooms",
                "🚪 6 rooms",
                "🚪 7 rooms",
                "🚪 8 rooms",
                "🚪 9 rooms",
                "🚪 10 rooms",
                "🏢 Duplex — דופלקס",
                "🌇 Penthouse — פנטהאוז",
                "🏙️ Mini penthouse — מיני פנטהאוז",
                "🏡 Single family home — בית פרטי",
                "🌳 Garden apartment — דירת גן",
                "📊 Every size combined"
              ]
            },
            "default": []
          },
          "buildCondition": {
            "title": "🏚️ Build condition",
            "enum": [
              "all",
              "secondHand",
              "new"
            ],
            "type": "string",
            "description": "Which build condition the benchmark rows should cover. Madlan publishes buy price, rent and yield separately for second-hand and new-build stock, alongside a combined figure.",
            "default": "all"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}