{
  "openapi": "3.0.1",
  "info": {
    "title": "Thai Property Market Analyzer",
    "description": "Analyze Thailand property listings by project and district: asking prices per m², rents, gross yields, price cuts and days on market. Track Pattaya and Bangkok, compare duplicate listings and find resale units priced below similar listings. Export project reports and supporting datasets.",
    "version": "0.1",
    "x-build-id": "SxhcfuuethMfykd3k"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/robertosan16~thai-property-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-robertosan16-thai-property-analyzer",
        "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/robertosan16~thai-property-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-robertosan16-thai-property-analyzer",
        "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/robertosan16~thai-property-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-robertosan16-thai-property-analyzer",
        "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": {
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Dot Property location paths, one per line: <code>chonburi/pattaya</code>, <code>phuket</code>, <code>bangkok</code>, <code>prachuap-khiri-khan/hua-hin</code>, <code>chiang-mai</code>. The path is the part of a Dot Property search link after <code>condos-for-sale/</code>.",
            "default": [
              "chonburi/pattaya"
            ],
            "items": {
              "type": "string"
            }
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Types of property to read in each location.",
            "items": {
              "type": "string",
              "enum": [
                "condo",
                "house",
                "villa",
                "townhouse"
              ],
              "enumTitles": [
                "Condos",
                "Houses",
                "Villas",
                "Townhouses"
              ]
            },
            "default": [
              "condo"
            ]
          },
          "transactions": {
            "title": "Sale and rent",
            "type": "array",
            "description": "Sale listings give prices; rent listings give rents and, together, the gross yield of each project.",
            "items": {
              "type": "string",
              "enum": [
                "sale",
                "rent"
              ],
              "enumTitles": [
                "For sale",
                "For rent"
              ]
            },
            "default": [
              "sale",
              "rent"
            ]
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "30 listings per page. 0 reads every page. A partial read gives figures but cannot tell which listings left the market. The form starts with a small test run (1 page); set 0 to read the whole market.",
            "default": 0
          },
          "includeProjectDetails": {
            "title": "Project details",
            "type": "boolean",
            "description": "Read one listing page per project for its developer, completion year, floors, number of units and nearest landmark with its distance. Kept for 90 days, so later runs read only new projects.",
            "default": true
          },
          "maxProjectDetailsPerRun": {
            "title": "Max project details per run",
            "minimum": 0,
            "type": "integer",
            "description": "Projects with the most listings first; the rest are read in the next runs.",
            "default": 600
          },
          "maxRemovalChecksPerRun": {
            "title": "Max departure checks per run",
            "minimum": 0,
            "type": "integer",
            "description": "A listing missing from the list pages since the last run is checked on its own page: gone or no longer on offer counts as left the market; still on offer means it was only missed. The rest are checked in the next run.",
            "default": 1500
          },
          "maxFloorChecksPerRun": {
            "title": "Max floor checks per run",
            "minimum": 0,
            "type": "integer",
            "description": "Listings in units listed more than once whose floor is not in the start of the description: their own page is read once for the floor, so neighbouring units furnished alike are not taken for one unit. The rest are read in the next runs.",
            "default": 3000
          },
          "maxPageChecksPerRun": {
            "title": "Listing pages to check per run",
            "minimum": 0,
            "type": "integer",
            "description": "Pages of below-market listings and of units listed by several agencies to read: the date the agency last updated the listing and whether it is still for sale. Each page is read at most once a week. 0 turns the check off.",
            "default": 3000
          },
          "lotsFor": {
            "title": "Find repeated units in",
            "type": "array",
            "description": "Deals in which to find the same unit listed by several advertisers.",
            "items": {
              "type": "string",
              "enum": [
                "sale",
                "rent"
              ],
              "enumTitles": [
                "For sale",
                "For rent"
              ]
            },
            "default": [
              "sale"
            ]
          },
          "maxNewPhotoHashesPerRun": {
            "title": "Max new photos compared per run",
            "minimum": 0,
            "type": "integer",
            "description": "Listings that may repeat a unit are compared by their first 4 photos (64×48 thumbnails, about 8 KB each). Comparisons are kept, so later runs read only new photos. The largest projects come first; the rest wait for the next runs.",
            "default": 20000
          },
          "saveListings": {
            "title": "Save listings",
            "type": "boolean",
            "description": "Save every listing as well as the project and district figures.",
            "default": true
          },
          "memoryName": {
            "title": "Memory name",
            "type": "string",
            "description": "Key-value store that keeps what earlier runs saw: first date and price of each listing, project details. Use one name per market you track.",
            "default": "thai-property-history"
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Requests at the same time. Keep it low: the Actor reads the site at a visitor's pace.",
            "default": 2
          },
          "delayMs": {
            "title": "Pause between requests (ms)",
            "minimum": 300,
            "type": "integer",
            "description": "Average pause before each request of each parallel reader.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy datacenter addresses work.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}