{
  "openapi": "3.0.1",
  "info": {
    "title": "Sprzedajemy.pl Scraper | Polish Real Estate",
    "description": "Extract Polish real-estate listings from Sprzedajemy.pl: flats, houses, plots, commercial units, warehouses and garages, for sale or rent. Prices, area, rooms, GPS coordinates, photos, seller name and phone. Includes incremental monitoring for cheap daily runs.",
    "version": "0.1",
    "x-build-id": "uhkeoA9CPjUUvzkG0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trev0n~sprzedajemy-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trev0n-sprzedajemy-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~sprzedajemy-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trev0n-sprzedajemy-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~sprzedajemy-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trev0n-sprzedajemy-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste sprzedajemy.pl real-estate listing URLs or individual ad URLs. When provided, these take priority over the search filters below. Listing URLs are paginated automatically; ad URLs (ending in -nr123456) are scraped directly.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "transactionType": {
            "title": "Transaction type",
            "enum": [
              "sale",
              "rent",
              "any"
            ],
            "type": "string",
            "description": "Sale or rent. Choose 'Any' to collect both.",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "flats",
              "houses",
              "plots",
              "commercial",
              "warehouses",
              "garages",
              "any"
            ],
            "type": "string",
            "description": "Which real-estate category to scrape. 'Any' combined with a specific transaction type scrapes all six categories.",
            "default": "flats"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, voivodeship, or 'City/District'. Examples: Warszawa, mazowieckie, Wałbrzych/Glinik. Leave empty to search all of Poland."
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Free-text phrase to match, e.g. kawalerka, garaż murowany, bliźniak."
          },
          "keywordInDescription": {
            "title": "Search keyword in descriptions too",
            "type": "boolean",
            "description": "By default the keyword only matches ad titles. Turn this on to also search inside ad descriptions — many more results, slightly less precise.",
            "default": false
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "newest",
              "oldest",
              "priceAsc",
              "priceDesc",
              "areaAsc",
              "areaDesc",
              "recommended"
            ],
            "type": "string",
            "description": "Newest first is required for incremental monitoring and early-stop pagination, and is the default.",
            "default": "newest"
          },
          "priceMin": {
            "title": "Minimum price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Applied by the portal itself, so no results are wasted."
          },
          "priceMax": {
            "title": "Maximum price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Applied by the portal itself, so no results are wasted."
          },
          "areaMin": {
            "title": "Minimum area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Ads that do not state an area are kept."
          },
          "areaMax": {
            "title": "Maximum area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Ads that do not state an area are kept."
          },
          "roomsMin": {
            "title": "Minimum rooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Ads that do not state a room count are kept."
          },
          "roomsMax": {
            "title": "Maximum rooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Ads that do not state a room count are kept."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "agency"
            ],
            "type": "string",
            "description": "Restrict to private sellers or to businesses and agencies. Applied by the portal.",
            "default": "all"
          },
          "fetchPropertyDetails": {
            "title": "Fetch full ad details",
            "type": "boolean",
            "description": "Off (fast mode): ~15 fields per ad straight from the results pages — very fast and cheap. On (full mode): opens every ad for the full description, all photos, GPS coordinates, street, voivodeship, price per m², seller name and phone number. Roughly one extra request per ad.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many ads. Set 0 for unlimited (the whole category).",
            "default": 100
          },
          "maxPages": {
            "title": "Maximum pages per listing",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on pagination depth per listing URL. 0 means no page limit.",
            "default": 0
          },
          "incrementalMode": {
            "title": "Incremental monitoring",
            "type": "boolean",
            "description": "Track state between runs and output only ads that are NEW, changed (UPDATED) or came back (REAPPEARED). The first run stores a baseline; later runs charge only for the difference — typically 80–95% fewer results on a daily schedule. Pagination also stops early once pages contain nothing new.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "type": "string",
            "description": "Name of the saved baseline. Leave empty to derive it from your filters. Set it explicitly when several scheduled tasks must share one baseline."
          },
          "emitUnchanged": {
            "title": "Also output unchanged ads",
            "type": "boolean",
            "description": "Output every ad found, tagged UNCHANGED as well. Disables early-stop pagination because a full crawl is required.",
            "default": false
          },
          "emitExpired": {
            "title": "Also output disappeared ads",
            "type": "boolean",
            "description": "Emit an EXPIRED record for ads that were in the previous run but are gone now — useful for detecting sold or withdrawn properties. Requires a full crawl.",
            "default": false
          },
          "skipReposts": {
            "title": "Skip reposted ads",
            "type": "boolean",
            "description": "Drop ads that look like a re-listing of an expired one (identical content under a new ad number).",
            "default": false
          },
          "earlyStopPages": {
            "title": "Early-stop after N quiet pages",
            "minimum": 0,
            "type": "integer",
            "description": "Incremental mode only: stop paginating once this many consecutive pages contain no new or changed ads. Set 0 to always crawl the full listing. Ignored when unchanged or expired ads are being emitted.",
            "default": 2
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Output only the core fields — handy for AI workflows and spreadsheets.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Omit empty fields",
            "type": "boolean",
            "description": "Leave out fields that are empty for a given ad instead of returning them as null.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Parallel requests. The portal tolerates high concurrency well; lower it only if you want to be extra gentle.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed request before giving up on it.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. sprzedajemy.pl has no anti-bot protection and is not geo-restricted, so this scraper runs fine with no proxy at all — which is also the cheapest option. Enable a proxy only if you specifically need one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}