{
  "openapi": "3.0.1",
  "info": {
    "title": "Sarangbang Scraper — Korea Property Data & API",
    "description": "Sarangbang scraper & real estate data API for one of Korea's biggest property portals. Sale, jeonse & monthly-rent listings nationwide: price, deposit, rent, size, floor, address, agency, phone, photos — clean JSON/CSV. Fast overview or full detail. No-code, no API key needed.",
    "version": "1.0",
    "x-build-id": "dgg1BjhuKTW1khXVt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~sarangbang-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-sarangbang-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~sarangbang-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-sarangbang-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~sarangbang-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-sarangbang-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** is the fast, cheap path — paginates Sarangbang's listing feed and returns ~90% of every field straight from the source (price, deposit, monthly rent, size, floor, address, agency, phone, photos). **Detail** additionally fetches each listing page to enrich a few extras (full road address, legal-dong code, lot number, full photo gallery).",
            "default": "overview"
          },
          "searchMode": {
            "title": "🔀 Search Mode",
            "enum": [
              "byCategory",
              "bySearchUrl",
              "byListingUrl"
            ],
            "type": "string",
            "description": "**By category** — pick a property type and (optionally) a region by its Sarangbang code. **By search URL** — paste a Sarangbang search-results page URL and every filter carries through. **By listing URL** — supply specific listing pages or record numbers (Detail mode only).",
            "default": "byCategory"
          },
          "cat": {
            "title": "🏷️ Category",
            "type": "string",
            "description": "Top-level Sarangbang category. `life` = residential (default), `biz` = commercial, `land` = land/plots.",
            "default": "life"
          },
          "menu": {
            "title": "🏠 Property Type",
            "type": "string",
            "description": "Property type within the category. Common residential values: `apt` (apartment), `city` (officetel), `villa`, `studio`, `house`, `office`.",
            "default": "apt"
          },
          "area1": {
            "title": "🗺️ Region Code (시도)",
            "type": "string",
            "description": "Top-level province/metro region code (e.g. Seoul, Gyeonggi). Copy it from a Sarangbang search URL (`area1=...`). Optional — leave blank for nationwide."
          },
          "area2": {
            "title": "📍 District Code (시군구)",
            "type": "string",
            "description": "District (city / gu / gun) code. Copy from a search URL (`area2=...`). Optional."
          },
          "area3": {
            "title": "📌 Legal-dong Code (읍면동)",
            "type": "string",
            "description": "Neighbourhood (legal-dong) code. Copy from a search URL (`area3[]=...`). Optional."
          },
          "opt": {
            "title": "🏢 Complex / Apartment Code",
            "type": "string",
            "description": "Specific apartment-complex code to restrict results to one complex. Copy from a search URL (`opt[]=...`). Optional."
          },
          "submenu": {
            "title": "🤝 Deal Type",
            "type": "string",
            "description": "Restrict to one deal type, e.g. `sell` (매매 sale) or `rent` (전세 jeonse / 월세 monthly). Optional — leave blank for all deal types."
          },
          "minPrice": {
            "title": "💰 Min Price (KRW)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price filter in Korean won. Optional."
          },
          "maxPrice": {
            "title": "💰 Max Price (KRW)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price filter in Korean won. Optional."
          },
          "minArea": {
            "title": "📐 Min Area (㎡)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum area in square metres. Optional."
          },
          "maxArea": {
            "title": "📐 Max Area (㎡)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum area in square metres. Optional."
          },
          "orderby": {
            "title": "↕️ Sort By",
            "enum": [
              "regdate",
              "num2_asc",
              "num2_desc",
              "area_asc",
              "area_desc",
              "floor_asc",
              "floor_desc"
            ],
            "type": "string",
            "description": "Result ordering: `regdate` (newest), `num2_asc`/`num2_desc` (price), `area_asc`/`area_desc` (area), `floor_asc`/`floor_desc` (floor).",
            "default": "regdate"
          },
          "sort": {
            "title": "🔃 Sort Direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sort direction for the chosen key.",
            "default": "desc"
          },
          "searchUrls": {
            "title": "🔗 Search URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "Paste one or more Sarangbang search-results page URLs (https://home.sarangbang.com/v2/page/linead/search.html?...). Every filter in the URL carries through. Used when Search Mode = By search URL.\n\n**TIP:** Build the search you want on sarangbang.com, then copy the address-bar URL.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingUrls": {
            "title": "🔎 Listing URLs / Record Numbers",
            "uniqueItems": true,
            "type": "array",
            "description": "Detail mode only. Supply specific Sarangbang detail-page URLs (https://home.sarangbang.com/v2/page/linead/detail.html?l_type=apt&recordno=...) or bare record numbers. Used when Search Mode = By listing URL.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "lType": {
            "title": "🏠 Listing Type (for record numbers)",
            "type": "string",
            "description": "Property type used when expanding bare record numbers into detail URLs (default `apt`).",
            "default": "apt"
          },
          "maxResults": {
            "title": "🔢 Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum listings to return per run. FREE tier is capped at 25; PAID tier is unlimited.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}