{
  "openapi": "3.0.1",
  "info": {
    "title": "peterpan Property Scraper — Korea Rental Data & API",
    "description": "peterpanz.com (피터팬의 좋은방 구하기) rental scraper & real estate data API for South Korea. Villa, apartment, officetel & store listings: deposit (보증금), monthly rent (월세), maintenance, size, floor, amenities, address, coordinates, photos — clean JSON/CSV, one row per room. Fast overview or full detail.",
    "version": "1.0",
    "x-build-id": "p2qIY3R0PuEb1dzV5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~peterpan-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-peterpan-property-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/sian.agency~peterpan-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-peterpan-property-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/sian.agency~peterpan-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-peterpan-property-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": {
          "scrapeMode": {
            "title": "🧭 Scrape mode",
            "enum": [
              "overview",
              "detail"
            ],
            "type": "string",
            "description": "🧭 **OVERVIEW** (cheap, primary): one row per listing from peterpanz's own JSON list API — deposit (보증금), monthly rent (월세), maintenance, room type, size in m²/pyeong, floor, amenities, verification flags, address, coordinates & photos. ~90% of fields, no extra cost.\n\n🔎 **DETAIL** (enrich): also fetches each listing's full /house page for the free-text description, full-resolution photo gallery & listing agency. Detail merges overview + detail into one record.",
            "default": "overview"
          },
          "searchMode": {
            "title": "🔀 Search mode",
            "enum": [
              "byBbox",
              "bySearchUrl",
              "byListingUrl"
            ],
            "type": "string",
            "description": "🔀 How listings are discovered.\n\n- **byBbox** — give a map bounding box (lat/lng) and an optional building-type vertical (simplest).\n- **bySearchUrl** — paste a ready-made peterpanz `houses/area/pc` API URL with your filters applied.\n- **byListingUrl** — fetch specific listings directly (DETAIL only).",
            "default": "byBbox"
          },
          "bbox": {
            "title": "🗺️ Bounding box",
            "type": "string",
            "description": "🗺️ **BY BBOX:** Map bounding box as `lat_min,lat_max,lng_min,lng_max`. The default covers central Seoul (Gangnam). Draw any rectangle on a map app and read the corners.\n\n💡 **TIP:** Smaller boxes return denser, more relevant results.",
            "default": "37.49,37.52,127.01,127.05"
          },
          "buildingType": {
            "title": "🏢 Building type",
            "enum": [
              "",
              "villa",
              "apt",
              "officetel",
              "store"
            ],
            "type": "string",
            "description": "🏢 **BY BBOX:** Restrict to one vertical. Leave blank for all types.\n\n- `villa` = 빌라/주택 · `apt` = 아파트 · `officetel` = 오피스텔 · `store` = 상가/사무실.",
            "default": ""
          },
          "orderBy": {
            "title": "↕️ Sort order",
            "enum": [
              "price",
              "deposit",
              "random"
            ],
            "type": "string",
            "description": "↕️ Result sort. `price` (default) and `deposit` are deterministic — safe for stable pagination. `random` is the site UI default but reshuffles per call (causes duplicates/gaps across pages).",
            "default": "price"
          },
          "search": {
            "title": "🔎 Keyword search",
            "type": "string",
            "description": "🔎 Optional free-text search term applied to the listing query."
          },
          "searchUrls": {
            "title": "🔗 Search URLs",
            "type": "array",
            "description": "🔗 **BY SEARCH URL:** Paste one or more peterpanz `houses/area/pc` API URLs (the bbox + filters are recovered from the URL). Example — `https://api.peterpanz.com/houses/area/pc?filter=latitude:37.49~37.52||longitude:127.01~127.05&pageSize=50&pageIndex=1&order_by=price`.",
            "default": [
              "https://api.peterpanz.com/houses/area/pc?filter=latitude:37.49~37.52||longitude:127.01~127.05&pageSize=50&pageIndex=1&order_by=price"
            ],
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "🏠 Listing URLs or IDs",
            "type": "array",
            "description": "🏠 **BY LISTING URL (DETAIL ONLY):** Paste peterpanz `/house/{id}` URLs or bare house ids (e.g. `https://www.peterpanz.com/house/19439182` or `19439182`). Used with scrapeMode = detail.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Max results",
            "minimum": 1,
            "type": "integer",
            "description": "🔢 Maximum listings to return per run. **FREE users:** capped at 25 · **PAID users:** unlimited.",
            "default": 100
          },
          "maxPages": {
            "title": "📄 Max pages",
            "minimum": 1,
            "type": "integer",
            "description": "📄 Maximum list-API pages to paginate per search before stopping (50 listings each).",
            "default": 5
          },
          "pageSize": {
            "title": "📦 Page size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "📦 Listings per API page (max 50).",
            "default": 50
          },
          "zoomLevel": {
            "title": "🔍 Map zoom level",
            "minimum": 1,
            "type": "integer",
            "description": "🔍 Map zoom level passed to the list API. Default 15.",
            "default": 15
          },
          "useProxy": {
            "title": "🌐 Use Korea residential proxy",
            "type": "boolean",
            "description": "🌐 Route requests through a South Korea residential proxy. **Off by default** — peterpanz's list API is ungated, so leaving this off keeps runs fast and cheap. Enable only if you hit a rate-limit or geo-block.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}