{
  "openapi": "3.0.1",
  "info": {
    "title": "Zigbang Scraper — Korea Property Data & API",
    "description": "Zigbang scraper & real estate data API for zigbang.com — Korea's #1 rental app. Rent (월세), jeonse (전세) & sale (매매) listings: deposit, rent, area, floor, options, fees, address, subway access, agent & photos — clean JSON/CSV, one row per unit. Overview or full detail.",
    "version": "1.0",
    "x-build-id": "iBr20IY67zEgx9uTe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~zigbang-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-zigbang-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~zigbang-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-zigbang-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~zigbang-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-zigbang-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): unit-level markers from the map/search API — one row per listing with id, location & canonical URL (fast, high-volume).\n\n🔎 **DETAIL** (enrich): fetches each listing's full record — deposit, rent, area, floor, direction, options, management fee, address, subway access, agent & photos. Detail merges overview + detail into one record.",
            "default": "overview"
          },
          "searchMode": {
            "title": "🔀 Search mode",
            "enum": [
              "byPlace",
              "bySearchUrl",
              "byListingUrl"
            ],
            "type": "string",
            "description": "🔀 How listings are discovered.\n\n- **byPlace** — give a Korean place name (e.g. `강남구`) or a centre `lat`/`lng`; the actor tiles the area into map cells (most convenient).\n- **bySearchUrl** — paste a ready-made `apis.zigbang.com/v2/items/...` list URL with a geohash + your filters.\n- **byListingUrl** — fetch specific listings directly by Zigbang item id or detail URL (DETAIL only).",
            "default": "byPlace"
          },
          "place": {
            "title": "📍 Place (Korean)",
            "type": "string",
            "description": "📍 **BY PLACE:** A Korean district / neighbourhood name to search, e.g. `강남구`, `서초동`, `홍대입구`. Geocoded to a centre point, then the surrounding area is tiled into map cells.\n\n💡 **TIP:** Use district (구) or neighbourhood (동) names for the best coverage.",
            "default": "강남구"
          },
          "lat": {
            "title": "🌐 Centre latitude",
            "type": "string",
            "description": "🌐 **BY PLACE (alternative):** Centre latitude. Provide both `lat` and `lng` to skip geocoding and search a precise point (e.g. `37.4979`). Leave blank to use `place`."
          },
          "lng": {
            "title": "🌐 Centre longitude",
            "type": "string",
            "description": "🌐 **BY PLACE (alternative):** Centre longitude. Provide both `lat` and `lng` to skip geocoding (e.g. `127.0276`). Leave blank to use `place`."
          },
          "vertical": {
            "title": "🏘️ Vertical",
            "enum": [
              "oneroom",
              "officetel"
            ],
            "type": "string",
            "description": "🏘️ Which Zigbang listing type to scrape. `oneroom` = 원룸 / 투룸 / 빌라 (one-room, two-room, villa). `officetel` = 오피스텔 (officetel).",
            "default": "oneroom"
          },
          "contract": {
            "title": "📜 Contract",
            "enum": [
              "rent",
              "monthly",
              "jeonse",
              "sale"
            ],
            "type": "string",
            "description": "📜 Contract type. `rent` covers both 전세 (jeonse) and 월세 (monthly) — Zigbang's default grouping. `monthly` = 월세 only · `jeonse` = 전세 only · `sale` = 매매 (for sale).",
            "default": "rent"
          },
          "searchUrls": {
            "title": "🔗 Search URLs",
            "type": "array",
            "description": "🔗 **BY SEARCH URL:** Paste one or more `apis.zigbang.com/v2/items/<vertical>?geohash=...` list URLs. Each must include a `geohash` query param. Supported filters in the URL (depositMax, rentMax, areaMin…) are preserved.\n\n💡 **TIP:** Example — `https://apis.zigbang.com/v2/items/oneroom?geohash=wydm6&domain=zigbang`",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "🏠 Listing ids / URLs",
            "type": "array",
            "description": "🏠 **BY LISTING ID (DETAIL ONLY):** Paste Zigbang item ids (e.g. `49290517`) or detail URLs (e.g. `https://www.zigbang.com/home/oneroom/items/49290517`). 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
          },
          "precision": {
            "title": "🧮 Geohash precision",
            "minimum": 4,
            "maximum": 8,
            "type": "integer",
            "description": "🧮 **BY PLACE:** Geohash cell precision (5 = wider cells, 6 = finer). Higher precision means smaller cells and more API calls per area.",
            "default": 6
          },
          "ring": {
            "title": "🔲 Tile ring",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "🔲 **BY PLACE:** How many cells around the centre to tile. `0` = centre cell only · `1` = a 3×3 block (default, broader coverage).",
            "default": 1
          },
          "useProxy": {
            "title": "🌐 Use Korea residential proxy",
            "type": "boolean",
            "description": "🌐 Route requests through a Korea residential proxy. **Off by default** — zigbang.com's public API is reachable without a proxy, 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}