{
  "openapi": "3.0.1",
  "info": {
    "title": "Belgrade Rental Market Monitor",
    "description": "Collects long-term apartment rental listings in Belgrade from multiple real estate platforms (Halo Oglasi, 4zida, Nekretnine.rs, CityExpert), normalizes data into a unified structure for market analysis, price tracking, and rental monitoring.",
    "version": "0.1",
    "x-build-id": "DD2dDBk6nn4sDqAfC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_actors~belgrade-rental-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_actors-belgrade-rental-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/data_actors~belgrade-rental-monitor/runs": {
      "post": {
        "operationId": "runs-sync-data_actors-belgrade-rental-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/data_actors~belgrade-rental-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-data_actors-belgrade-rental-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",
        "required": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Real estate platforms to scrape. Currently only 'halo_oglasi' is fully implemented.",
            "items": {
              "type": "string",
              "enum": [
                "halo_oglasi",
                "4zida",
                "nekretnine_rs",
                "cityexpert"
              ]
            },
            "default": [
              "halo_oglasi"
            ]
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City to search in. Currently only Belgrade is supported.",
            "default": "Belgrade"
          },
          "districts": {
            "title": "Districts",
            "type": "array",
            "description": "Belgrade districts to filter by. Leave empty to scrape all districts. Examples: Novi Beograd, Vračar, Stari Grad, Zemun, Savski Venac, Palilula, Voždovac, Zvezdara, Čukarica, Rakovica.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "min_price": {
            "title": "Minimum Price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum monthly rent in EUR. Leave empty for no lower bound."
          },
          "max_price": {
            "title": "Maximum Price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum monthly rent in EUR. Leave empty for no upper bound."
          },
          "min_area_m2": {
            "title": "Minimum Area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum apartment area in square meters."
          },
          "max_area_m2": {
            "title": "Maximum Area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum apartment area in square meters."
          },
          "rooms": {
            "title": "Number of Rooms",
            "type": "array",
            "description": "Filter by number of rooms. Leave empty for all. Valid values: studio, 1, 1.5, 2, 2.5, 3, 4+",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "max_results_per_source": {
            "title": "Max Results Per Source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of listings to collect from each source.",
            "default": 500
          },
          "include_images": {
            "title": "Include Images",
            "type": "boolean",
            "description": "Collect image URLs for each listing. Requires scrape_details=true and increases run time.",
            "default": false
          },
          "scrape_details": {
            "title": "Scrape Detail Pages",
            "type": "boolean",
            "description": "Visit each listing's detail page for full description, floor info, heating, furnishing, etc. Disabling this is faster but produces less data.",
            "default": true
          },
          "proxy_enabled": {
            "title": "Use Proxy",
            "type": "boolean",
            "description": "Route requests through Apify proxy. Recommended for production runs.",
            "default": true
          },
          "request_delay_ms": {
            "title": "Request Delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between HTTP requests in milliseconds. Increase to reduce server load.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}