{
  "openapi": "3.0.1",
  "info": {
    "title": "Madlan New Listings Monitor - New Apartments and Price Changes",
    "version": "0.1",
    "x-build-id": "H6O6Qn5QsKAyyqZpo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leadproof~madlan-new-listings-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leadproof-madlan-new-listings-monitor",
        "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/leadproof~madlan-new-listings-monitor/runs": {
      "post": {
        "operationId": "runs-sync-leadproof-madlan-new-listings-monitor",
        "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/leadproof~madlan-new-listings-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-leadproof-madlan-new-listings-monitor",
        "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": {
          "transactionType": {
            "title": "Transaction",
            "enum": [
              "sale",
              "rent",
              "commercial"
            ],
            "type": "string",
            "description": "Which Madlan board to watch. Commercial watches both commercial rent and sale.",
            "default": "sale"
          },
          "filters": {
            "title": "Filters",
            "type": "object",
            "description": "The search to watch. City is required unless you give search URLs. Madlan applies every filter here itself.",
            "properties": {
              "city": {
                "title": "City",
                "type": "string",
                "editor": "textfield",
                "description": "City or locality as Madlan shows it, for example \"תל אביב יפו\" or \"חיפה\", or several separated by commas. Common English names (Tel Aviv, Jerusalem, Haifa) are accepted."
              },
              "minPrice": {
                "title": "Minimum price (ILS)",
                "type": "integer",
                "minimum": 0,
                "description": "Inclusive minimum price in ILS.",
                "editor": "number"
              },
              "maxPrice": {
                "title": "Maximum price (ILS)",
                "type": "integer",
                "minimum": 0,
                "description": "Inclusive maximum price in ILS.",
                "editor": "number"
              },
              "minRooms": {
                "title": "Minimum rooms",
                "type": "number",
                "minimum": 0,
                "description": "Inclusive minimum number of rooms; halves allowed."
              },
              "maxRooms": {
                "title": "Maximum rooms",
                "type": "number",
                "minimum": 0,
                "description": "Inclusive maximum number of rooms; halves allowed."
              },
              "minSize": {
                "title": "Minimum size (sqm)",
                "type": "integer",
                "minimum": 0,
                "description": "Inclusive minimum built size in square metres.",
                "editor": "number"
              },
              "maxSize": {
                "title": "Maximum size (sqm)",
                "type": "integer",
                "minimum": 0,
                "description": "Inclusive maximum built size in square metres.",
                "editor": "number"
              },
              "propertyType": {
                "title": "Property type",
                "type": "string",
                "editor": "textfield",
                "description": "One type, for example דירה, דירת גן, פנטהאוז, דופלקס, בית פרטי, וילה, מגרש (or apartment, house, penthouse, land)."
              },
              "parking": {
                "title": "Parking",
                "type": "boolean",
                "description": "Only listings with parking."
              },
              "elevator": {
                "title": "Elevator",
                "type": "boolean",
                "description": "Only listings with an elevator."
              }
            }
          },
          "searchUrls": {
            "title": "Madlan search URLs",
            "type": "array",
            "description": "Optional. Madlan search URLs copied from the browser, for example https://www.madlan.co.il/for-sale/תל-אביב-יפו-ישראל, including neighbourhood searches. The place and the filters in the URL are watched. Use these or Filters.",
            "items": {
              "type": "string"
            }
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of this watch, for example tlv-sale. Each name keeps its own memory, so use one name per search. Without a name the memory is keyed to the search itself."
          },
          "includePriceChanges": {
            "title": "Deliver price changes",
            "type": "boolean",
            "description": "Also deliver listings whose price went up or down since the previous check, marked changeType price_changed with previousPrice. Charged like a new listing.",
            "default": true
          },
          "maxPages": {
            "title": "Pages per check, at most",
            "minimum": 1,
            "maximum": 44,
            "type": "integer",
            "description": "A check reads pages from the newest end until it reaches listings from before the previous check. This caps that read; raise it for a whole big city checked rarely.",
            "default": 20
          },
          "webhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional. Receives a JSON POST when a check is partial or fails, with the reason."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Israeli residential proxy by default. Every request uses a new IP.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "IL"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}