{
  "openapi": "3.0.1",
  "info": {
    "title": "591.com.tw Scraper - Taiwan Rentals, Sales & Presale",
    "description": "Scrape 591.com.tw across all 22 Taiwan cities: rent, resale and presale listings with price, ping area, layout, MRT distance, photos and lister.",
    "version": "1.0",
    "x-build-id": "HvW0aTnLplseqdaPW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~591-com-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-591-com-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~591-com-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-591-com-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~591-com-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-591-com-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": {
          "operation": {
            "title": "🎯 What do you want to scrape?",
            "enum": [
              "rentSearch",
              "saleSearch",
              "presaleSearch",
              "rentDetail"
            ],
            "type": "string",
            "description": "Pick one per run. Rental Search walks 591's rental board and returns 30 listings a page; Resale Search does the same on the second-hand sale board, 31 a page; Presale Project Search returns the new-build and presale projects 591 lists, 10 a page, each with its developer and sales-office phone; Rental Detail takes 591 rental addresses or IDs and returns one full record each — GPS position, the deposit and management fee, the appliance list, the whole description and the lister's phone number.",
            "default": "rentSearch"
          },
          "city": {
            "title": "🏙️ City or county",
            "enum": [
              "1",
              "3",
              "2",
              "6",
              "4",
              "5",
              "7",
              "8",
              "10",
              "11",
              "12",
              "13",
              "14",
              "15",
              "17",
              "19",
              "21",
              "22",
              "23",
              "24",
              "25",
              "26"
            ],
            "type": "string",
            "description": "Which of Taiwan's 22 cities and counties to read. These are 591's own area ids, taken from the list the site publishes on its own pages, so every value here is one 591 actually indexes. A run reads one area — that is how 591's own search works — and covers every district inside it. To go narrower than a city, add a keyword below or paste a district address into Search URLs.",
            "default": "1"
          },
          "maxResults": {
            "title": "🔢 Max listings",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many rows for the whole run. A rental page carries 30 listings, a sale page 31 and a presale page 10, so the run ends on the first page that crosses your limit.",
            "default": 100
          },
          "keyword": {
            "title": "🔎 Keyword",
            "type": "string",
            "description": "591's own search box, in Traditional Chinese. It reads community names (冠德君閱), street and district names (中山區, 民權東路) and station names (捷運), and it narrows inside the city you picked rather than replacing it. Leave empty to take the whole city.",
            "default": ""
          },
          "rentalType": {
            "title": "🔑 Rental type",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4",
              "8",
              "24"
            ],
            "type": "string",
            "description": "Used by Rental Search. 591 splits its rental board by how much of the property you get, which is the distinction Taiwanese renters actually search on: a whole unit, a self-contained suite with its own bathroom, a suite carved out of a shared flat, or a plain room with a shared bathroom. Each option is 591's own category, with its Chinese name alongside.",
            "default": "any"
          },
          "saleCategory": {
            "title": "🏠 Sale category",
            "enum": [
              "any",
              "9",
              "10",
              "5",
              "6",
              "12",
              "11",
              "7",
              "8"
            ],
            "type": "string",
            "description": "Used by Resale Search. 591's own second-hand categories, from homes and studios through shops, offices and mixed residential-office units to land, factories and parking spaces. Each value is the site's category id and each label carries the Chinese name it appears under on 591.",
            "default": "any"
          },
          "bedrooms": {
            "title": "🛏️ Bedrooms",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Keep only properties with this many bedrooms — the 房 count in 591's layout string, so '3' means 3房, whatever the number of living rooms beside it. Applied by 591 on both the rental and the sale board. Studios and open-plan units carry no 房 count and are excluded once you set this.",
            "default": "any"
          },
          "minRent": {
            "title": "💵 Min rent (NT$/month)",
            "minimum": 0,
            "type": "integer",
            "description": "Used by Rental Search. Skip rentals below this monthly rent in New Taiwan dollars. 0 means no lower bound. 591 applies the band itself, so excluded listings are never fetched and never billed.",
            "default": 0
          },
          "maxRent": {
            "title": "💰 Max rent (NT$/month)",
            "minimum": 0,
            "type": "integer",
            "description": "Used by Rental Search. Skip rentals above this monthly rent in New Taiwan dollars. 0 means no upper bound. Pairing it with a minimum is the usual way to slice a large city into bands.",
            "default": 0
          },
          "buildingAge": {
            "title": "📅 Building age",
            "enum": [
              "any",
              "0_5",
              "5_10",
              "10_20",
              "20_30",
              "30_40"
            ],
            "type": "string",
            "description": "Used by Resale Search. 591 files second-hand listings into fixed age bands rather than a free range, and these are its bands exactly — asking for anything between them returns the unfiltered board, so only what the site really offers is on the list.",
            "default": "any"
          },
          "landlordOnly": {
            "title": "👤 Landlord adverts only",
            "type": "boolean",
            "description": "Used by Rental Search. Keep only the listings 591 marks as posted by the owner (屋主) rather than by an agency or a letting agent. Taiwan's rental board carries heavy owner-direct supply, and this is the site's own flag on the advert, not a guess from the contact name.",
            "default": false
          },
          "sortBy": {
            "title": "↕️ Sort",
            "enum": [
              "default",
              "newest",
              "rentLowToHigh",
              "rentHighToLow"
            ],
            "type": "string",
            "description": "How 591 should order the board before the run reads it. 'Newest first' is what a monitoring run wants; the two rent orderings are applied by 591 on the rental board only, where the sale board answers every ordering with its own newest-first sequence.",
            "default": "default"
          },
          "searchUrls": {
            "title": "🌐 Search URLs",
            "type": "array",
            "description": "Paste 591 search addresses instead of filling the form. Build the search on rent.591.com.tw, sale.591.com.tw or newhouse.591.com.tw, copy the address bar, and the board, city, district and filters in it are read straight off the URL — including district-level pages such as https://rent.591.com.tw/list?region=1&section=3 that the form above does not reach. Any page number in the address is ignored; the run starts at the first page and pages forward on its own.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingUrls": {
            "title": "🏠 Rental addresses",
            "type": "array",
            "description": "Used by Rental Detail: the 591 rental addresses to expand, e.g. https://rent.591.com.tw/21822748. This field takes full addresses only — Apify validates every entry as a URL and rejects a bare number before the run starts. The listingId column of any Rental Search run gives you the number; put https://rent.591.com.tw/ in front of it and you have the address. A two-step pipeline — search once, expand the shortlist — costs nothing but the rows you actually want.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}