{
  "openapi": "3.0.1",
  "info": {
    "title": "Cafeland Property Scraper - Vietnam Real Estate Listings",
    "description": "Scrape Nhà Đất CafeLand listings in all 34 Vietnamese provinces: price in VND and USD, area, price per m², ward, photos and update date, for sale and rent. Add the full advert with GPS, rooms and legal status.",
    "version": "1.0",
    "x-build-id": "lb2Lq3uUoctZwVJUU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~cafeland-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-cafeland-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~cafeland-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-cafeland-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~cafeland-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-cafeland-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": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "Property Search reads Cafeland results pages, 26 listings per page. Property Detail opens the listing addresses you paste in \"Cafeland listing URLs\" and returns the full advert: description, every photo, GPS, rooms, floors, legal status and posting date.",
            "default": "search"
          },
          "listingType": {
            "title": "🏷️ For sale or for rent",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Which half of the Cafeland market to read. Rent prices are monthly and the row says so, so sale and rent rows never get mixed up after export. Some property types exist on only one side; the type list marks them, and an impossible pairing stops the run before anything is charged.",
            "default": "sale"
          },
          "propertyType": {
            "title": "🏡 Property type",
            "enum": [
              "all",
              "house",
              "townhouse",
              "villa",
              "apartment",
              "hospitality",
              "warehouse",
              "project-townhouse",
              "mini-apartment",
              "residential-land",
              "project-land",
              "farm-land",
              "room",
              "office",
              "retail-space"
            ],
            "type": "string",
            "description": "Which Cafeland category to read. Land, project plots, mini apartments and project townhouses are sale-only; rooms, offices, retail space and townhouses are rent-only. A type that does not exist for the chosen side stops the run with the list of types that do, before any charge. It never falls back to all types and bills you for the wrong rows.",
            "default": "all"
          },
          "provinces": {
            "title": "📍 Provinces and cities",
            "uniqueItems": true,
            "type": "array",
            "description": "One search per province, from the 34 provinces and cities of Vietnam's 2025 map. Leave it empty to read the whole country in one search. One search can page through at most 9,984 listings (384 pages), so for a big city pick a property type as well when you need more than that.",
            "items": {
              "type": "string",
              "enum": [
                "tp-ho-chi-minh",
                "ha-noi",
                "da-nang",
                "hai-phong",
                "can-tho",
                "thua-thien-hue",
                "an-giang",
                "bac-ninh",
                "ca-mau",
                "cao-bang",
                "dak-lak",
                "dien-bien",
                "dong-nai",
                "dong-thap",
                "gia-lai",
                "ha-tinh",
                "hung-yen",
                "khanh-hoa",
                "lai-chau",
                "lam-dong",
                "lang-son",
                "lao-cai",
                "nghe-an",
                "ninh-binh",
                "phu-tho",
                "quang-ngai",
                "quang-ninh",
                "quang-tri",
                "son-la",
                "tay-ninh",
                "thai-nguyen",
                "thanh-hoa",
                "tuyen-quang",
                "vinh-long"
              ],
              "enumTitles": [
                "📍 TP. Hồ Chí Minh",
                "📍 Hà Nội",
                "📍 Đà Nẵng",
                "📍 Hải Phòng",
                "📍 Cần Thơ",
                "📍 Huế",
                "📍 An Giang",
                "📍 Bắc Ninh",
                "📍 Cà Mau",
                "📍 Cao Bằng",
                "📍 Đắk Lắk",
                "📍 Điện Biên",
                "📍 Đồng Nai",
                "📍 Đồng Tháp",
                "📍 Gia Lai",
                "📍 Hà Tĩnh",
                "📍 Hưng Yên",
                "📍 Khánh Hòa",
                "📍 Lai Châu",
                "📍 Lâm Đồng",
                "📍 Lạng Sơn",
                "📍 Lào Cai",
                "📍 Nghệ An",
                "📍 Ninh Bình",
                "📍 Phú Thọ",
                "📍 Quảng Ngãi",
                "📍 Quảng Ninh",
                "📍 Quảng Trị",
                "📍 Sơn La",
                "📍 Tây Ninh",
                "📍 Thái Nguyên",
                "📍 Thanh Hóa",
                "📍 Tuyên Quang",
                "📍 Vĩnh Long"
              ]
            },
            "default": [
              "tp-ho-chi-minh"
            ]
          },
          "maxResults": {
            "title": "🔢 Max listings",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many listings across every province in the list. A results page holds 26 listings and the run stops inside the page that reaches your limit. Free-plan runs are capped lower and the log says so.",
            "default": 100
          },
          "includeDetails": {
            "title": "📄 Open each listing for the full advert",
            "type": "boolean",
            "description": "Also open every listing's own page and add the full description, every photo, GPS, bedrooms, toilets, floors, facing, road width, legal status, street and posting date. One extra page per listing, billed as a Property Detail on top of the listing. Off by default.",
            "default": false
          },
          "searchUrls": {
            "title": "🔗 Cafeland search URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "Paste Cafeland results addresses, for example https://nhadat.cafeland.vn/nha-dat-ban/ban-nha-rieng-tai-thu-duc-tp-ho-chi-minh/ for houses in one ward. They are read exactly as given and the fields above are ignored. Ward pages, which have no field here, are reached this way.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingUrls": {
            "title": "🏠 Cafeland listing URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "For Property Detail: listing addresses from nhadat.cafeland.vn, ending in -<number>.html. Each one becomes one full row. Duplicates are read once.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}