{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Nieruchomości: Mieszkania, Domy, Działki + Monitoring",
    "description": "Scraper OLX.pl dla nieruchomości: mieszkania, domy, działki, garaże, biura. Pełne filtry OLX (kategoria, miasto, promień, cena, m², pokoje, piętro) oraz monitoring nowych ogłoszeń dla leadgenu agencji. Ustrukturyzowany JSON/CSV. Bez klejenia URL. Od Klevio, polski specjalista e-commerce.",
    "version": "1.0",
    "x-build-id": "6A3WtBiXKKPtXRhcd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/klevio~olx-nieruchomosci-pl/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-klevio-olx-nieruchomosci-pl",
        "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/klevio~olx-nieruchomosci-pl/runs": {
      "post": {
        "operationId": "runs-sync-klevio-olx-nieruchomosci-pl",
        "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/klevio~olx-nieruchomosci-pl/run-sync": {
      "post": {
        "operationId": "run-sync-klevio-olx-nieruchomosci-pl",
        "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": {
          "subcategory": {
            "title": "Kategoria",
            "enum": [
              "mieszkania",
              "domy",
              "dzialki",
              "biura-lokale",
              "garaze-parkingi",
              "stancje-pokoje"
            ],
            "type": "string",
            "description": "Rodzaj nieruchomości.",
            "default": "mieszkania"
          },
          "transaction": {
            "title": "Typ oferty",
            "enum": [
              "sprzedaz",
              "wynajem",
              "zamiana"
            ],
            "type": "string",
            "description": "Sprzedaż, wynajem lub zamiana (jeśli kategoria obsługuje).",
            "default": "sprzedaz"
          },
          "city": {
            "title": "Miasto",
            "type": "string",
            "description": "Nazwa miasta, np. Warszawa, Kraków, Gdańsk. Puste = cała Polska."
          },
          "radiusKm": {
            "title": "Promień od miasta",
            "enum": [
              "0",
              "5",
              "10",
              "15",
              "30",
              "50",
              "75",
              "100"
            ],
            "type": "string",
            "description": "Rozszerz wyszukiwanie o okoliczne miejscowości w promieniu wybranej liczby kilometrów od miasta, tak jak na OLX. Świetne dla domów i działek. Wymaga podanego miasta.",
            "default": "0"
          },
          "district": {
            "title": "Dzielnica (opcjonalnie)",
            "type": "string",
            "description": "Dzielnica w obrębie miasta, na przykład Mokotów (działa dla większych miast). Nie łącz z promieniem."
          },
          "priceMin": {
            "title": "Cena od (zł)",
            "minimum": 0,
            "type": "integer",
            "description": "Dolny próg ceny."
          },
          "priceMax": {
            "title": "Cena do (zł)",
            "minimum": 0,
            "type": "integer",
            "description": "Górny próg ceny."
          },
          "areaMin": {
            "title": "Powierzchnia od (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Powierzchnia mieszkalna/użytkowa, dolny próg."
          },
          "areaMax": {
            "title": "Powierzchnia do (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Powierzchnia mieszkalna/użytkowa, górny próg."
          },
          "plotAreaMin": {
            "title": "Powierzchnia działki od (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Dla domów i działek, dolny próg powierzchni działki."
          },
          "plotAreaMax": {
            "title": "Powierzchnia działki do (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Dla domów i działek, górny próg powierzchni działki."
          },
          "rooms": {
            "title": "Liczba pokoi",
            "type": "array",
            "description": "Dla mieszkań i domów (można wybrać kilka).",
            "items": {
              "type": "string",
              "enum": [
                "one",
                "two",
                "three",
                "four"
              ],
              "enumTitles": [
                "Kawalerka (1)",
                "2 pokoje",
                "3 pokoje",
                "4 i więcej"
              ]
            }
          },
          "buildingType": {
            "title": "Rodzaj zabudowy",
            "type": "array",
            "description": "Dla mieszkań (można wybrać kilka).",
            "items": {
              "type": "string",
              "enum": [
                "blok",
                "kamienica",
                "apartamentowiec",
                "loft",
                "pozostale"
              ],
              "enumTitles": [
                "Blok",
                "Kamienica",
                "Apartamentowiec",
                "Loft",
                "Pozostałe"
              ]
            }
          },
          "floor": {
            "title": "Piętro",
            "type": "array",
            "description": "Poziom (można wybrać kilka).",
            "items": {
              "type": "string",
              "enum": [
                "floor_0",
                "floor_1",
                "floor_2",
                "floor_3",
                "floor_4",
                "floor_5",
                "floor_6",
                "floor_7",
                "floor_8",
                "floor_9",
                "floor_10",
                "floor_11",
                "floor_17"
              ],
              "enumTitles": [
                "Parter",
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "Powyżej 10",
                "Poddasze"
              ]
            }
          },
          "market": {
            "title": "Rynek",
            "enum": [
              "",
              "primary",
              "secondary"
            ],
            "type": "string",
            "description": "Pierwotny (deweloperski) lub wtórny.",
            "default": ""
          },
          "furniture": {
            "title": "Umeblowanie (dla wynajmu)",
            "enum": [
              "",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Czy oferta jest umeblowana.",
            "default": ""
          },
          "ownerType": {
            "title": "Typ sprzedawcy",
            "enum": [
              "",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Ogłoszenia prywatne, firmowe (biura/deweloperzy) czy wszystkie.",
            "default": ""
          },
          "onlyWithPhoto": {
            "title": "Tylko ze zdjęciem",
            "type": "boolean",
            "description": "Pomiń ogłoszenia bez żadnego zdjęcia.",
            "default": false
          },
          "postedWithin": {
            "title": "Opublikowane w ciągu",
            "enum": [
              "all",
              "24h",
              "7d",
              "30d"
            ],
            "type": "string",
            "description": "Ogranicz do ogłoszeń dodanych w wybranym okresie.",
            "default": "all"
          },
          "monitorNew": {
            "title": "🔔 Monitoruj NOWE ogłoszenia (leadgen na świeżo)",
            "type": "boolean",
            "description": "Killer feature dla agencji: aktor pamięta, co już widział (per wyszukiwanie), i przy kolejnych uruchomieniach zwraca WYŁĄCZNIE nowe ogłoszenia. Pierwszy run buduje bazę. Ustaw harmonogram (co godzinę/dzień) w zakładce Schedules.",
            "default": false
          },
          "detectPriceChanges": {
            "title": "📉 Wykrywaj zmiany cen",
            "type": "boolean",
            "description": "W trybie monitoringu zwracaj również ogłoszenia, w których zmieniła się cena (z polem poprzedniej ceny). Idealne do wyłapywania obniżek.",
            "default": true
          },
          "maxItems": {
            "title": "Maks. liczba ogłoszeń na run",
            "minimum": 1,
            "type": "integer",
            "description": "Bezpiecznik kosztów, górny limit ogłoszeń przeskanowanych w jednym uruchomieniu.",
            "default": 500
          },
          "uzyjProxy": {
            "title": "Użyj proxy Apify (rotacja IP)",
            "type": "boolean",
            "description": "Domyślnie wyłączone. OLX działa najlepiej przy bezpośrednim połączeniu. Włącz tylko przy bardzo dużych wolumenach, jeśli pojawia się ograniczanie zapytań. Uwaga: proxy datacenter bywa blokowane przez OLX.",
            "default": false
          },
          "searchUrls": {
            "title": "🔧 Zaawansowane: URL-e wyszukiwania OLX",
            "type": "array",
            "description": "Dla power-userów. Wklej gotowe linki wyszukiwania z OLX.pl, jeśli podasz, NADPISUJĄ filtry z UI powyżej. Aktor odczyta z nich kategorię, lokalizację i wszystkie filtry automatycznie.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}