{
  "openapi": "3.0.1",
  "info": {
    "title": "RynekPierwotny Scraper",
    "description": "Scrape rynekpierwotny.pl — Poland's biggest primary-market real-estate portal. Get new housing developments and individual flats/houses with prices, areas, developers and floor plans. Filter by city, price, area and rooms, and run cheap incremental monitoring that emits only new/updated records.",
    "version": "1.0",
    "x-build-id": "S14DdkegNQvfrrGQj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trev0n~rynekpierwotny-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trev0n-rynekpierwotny-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/trev0n~rynekpierwotny-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trev0n-rynekpierwotny-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/trev0n~rynekpierwotny-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trev0n-rynekpierwotny-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": {
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, or city + district, to search in (e.g. \"Warszawa\", \"Kraków\", \"Warszawa Mokotów\", \"Gdańsk\"). Polish characters optional. Leave empty to search all of Poland or to use Start URLs."
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "",
              "flats",
              "houses",
              "commercial"
            ],
            "type": "string",
            "description": "Type of properties inside the developments.",
            "default": ""
          },
          "scrapeMode": {
            "title": "Scrape mode",
            "enum": [
              "investments",
              "units"
            ],
            "type": "string",
            "description": "\"Investments\" returns one record per housing development (with price/area ranges). \"Units\" expands every development into individual flats/houses — one record per unit, with its exact price, floor, rooms and floor plan.",
            "default": "investments"
          },
          "priceMin": {
            "title": "Minimum price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound of the price range, in złoty.",
            "default": 0
          },
          "priceMax": {
            "title": "Maximum price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound of the price range, in złoty (0 = no limit).",
            "default": 0
          },
          "areaMin": {
            "title": "Minimum area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Smallest acceptable unit area, in square meters.",
            "default": 0
          },
          "areaMax": {
            "title": "Maximum area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Largest acceptable unit area, in square meters (0 = no limit).",
            "default": 0
          },
          "roomsMin": {
            "title": "Minimum rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Fewest acceptable rooms.",
            "default": 0
          },
          "roomsMax": {
            "title": "Maximum rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Most acceptable rooms (0 = no limit).",
            "default": 0
          },
          "priceM2Min": {
            "title": "Minimum price per m² (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound of price per square meter.",
            "default": 0
          },
          "priceM2Max": {
            "title": "Maximum price per m² (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound of price per square meter (0 = no limit).",
            "default": 0
          },
          "distance": {
            "title": "Search radius (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Extend the search this many kilometers around the chosen location (0 = exact region only).",
            "default": 0
          },
          "isLuxury": {
            "title": "Luxury only",
            "type": "boolean",
            "description": "Only premium / luxury developments.",
            "default": false
          },
          "includeSoldOut": {
            "title": "Include sold-out developments",
            "type": "boolean",
            "description": "Also return developments with no units currently for sale (the website hides these by default).",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "",
              "price-asc",
              "recently-updated",
              "oldest-updated"
            ],
            "type": "string",
            "description": "Ordering of search results.",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional rynekpierwotny.pl search-result or offer URLs to scrape directly instead of (or alongside) the location search.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of records to collect — investments or units, depending on scrape mode (0 = unlimited).",
            "default": 100
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on search-result pages to fetch per search, 30 investments each (0 = no cap).",
            "default": 0
          },
          "onlyAvailableUnits": {
            "title": "Only units for sale",
            "type": "boolean",
            "description": "Units mode: skip units that are already sold. Reserved units are kept (see the isReserved field).",
            "default": true
          },
          "includeOfferDetails": {
            "title": "Include full investment details",
            "type": "boolean",
            "description": "Investments mode: fetch each development's full profile — buildings, floors, parking, sales offices, creation date. One extra request per development.",
            "default": false
          },
          "detailConcurrency": {
            "title": "Detail concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many detail/unit requests to run in parallel (1-20). Higher is faster.",
            "default": 10
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep only records whose name/description/developer/address contains at least one of these terms.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop records whose name/description/developer/address contains any of these terms.",
            "items": {
              "type": "string"
            }
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Output only the core fields — handy for AI workflows.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields",
            "type": "boolean",
            "description": "Omit null / empty fields from each record.",
            "default": false
          },
          "regionIds": {
            "title": "Region IDs (advanced)",
            "type": "array",
            "description": "Numeric rynekpierwotny.pl region ids to search in, for power users (e.g. 8647 = Warszawa). Combined with the Location field."
          },
          "incrementalMode": {
            "title": "Incremental monitoring mode",
            "type": "boolean",
            "description": "Track state across runs and emit only NEW / UPDATED / REAPPEARED records. The first run builds a baseline; later runs charge only for the diff — ideal for cheap recurring monitoring of new developments and price changes.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Custom identifier for the monitoring baseline. Leave empty to derive it from the search config automatically."
          },
          "emitUnchanged": {
            "title": "Emit unchanged records",
            "type": "boolean",
            "description": "Also output records whose content didn't change since the last run.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired records",
            "type": "boolean",
            "description": "Also output a record for listings that disappeared since the last run (changeType = EXPIRED) — e.g. a sold-out development or a sold unit.",
            "default": false
          },
          "skipReposts": {
            "title": "Skip reposts",
            "type": "boolean",
            "description": "Drop new records detected as reposts of a recently expired one (same content, new id).",
            "default": false
          },
          "notifyOnlyChanges": {
            "title": "Notify only on changes",
            "type": "boolean",
            "description": "Only send notifications when there are new/updated records.",
            "default": true
          },
          "notificationLimit": {
            "title": "Records per notification",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records listed in a single notification message.",
            "default": 10
          },
          "includeRunSummary": {
            "title": "Include run summary in webhook",
            "type": "boolean",
            "description": "Attach the run summary object to the generic webhook payload.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Generic webhook to POST results to (JSON)."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Telegram bot token for notifications."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Telegram chat id to send notifications to."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Discord channel webhook for notifications."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Slack incoming webhook for notifications."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The data source works without a proxy; enable one only for very large or frequent runs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}