{
  "openapi": "3.0.1",
  "info": {
    "title": "99.co Scraper",
    "description": "Scrape 99.co Singapore property listings. Search by location, coordinates, polygon, or 99.co URL; pull enriched property details (similar listings, nearby amenities, floor plans, project analysis) by listing id or URL; and look up agents from the public directory.",
    "version": "1.0",
    "x-build-id": "xFX6eebMJ7K0WpDnR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one-api~99co-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one-api-99co-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/one-api~99co-scraper/runs": {
      "post": {
        "operationId": "runs-sync-one-api-99co-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/one-api~99co-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-one-api-99co-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": {
          "search_inputs": {
            "title": "Search query (one per line)",
            "type": "array",
            "description": "Auto-detects each entry and routes to the right `/search/*` endpoint:\n• `https://www.99.co/...` search URL → `/search/byurl`\n• `lat,lng` or `lat,lng,radius_m` (e.g. `1.3042,103.8324,1500`) → `/search/bycoordinates`\n• 3+ space-separated `lat,lng` pairs (e.g. `1.30,103.82 1.32,103.82 1.32,103.85`) → `/search/bypolygon`\n• Anything else — MRT station, neighbourhood, district, project name (e.g. `Orchard`, `Tampines`) → `/search/bylocation`\n\nFilters below apply to every search call. Each hit returns one dataset row per listing.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Listing type",
            "enum": [
              "For_Sale",
              "For_Rent"
            ],
            "type": "string",
            "description": "Sale or rental listings.",
            "default": "For_Sale"
          },
          "propertySegment": {
            "title": "Property segment",
            "enum": [
              "residential",
              "commercial"
            ],
            "type": "string",
            "description": "Residential (HDB / condo / landed) or commercial (retail / office / industrial / land).",
            "default": "residential"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "all",
              "hdb",
              "condo",
              "landed",
              "retail",
              "office",
              "industrial",
              "land"
            ],
            "type": "string",
            "description": "Main category. `hdb` / `condo` / `landed` need segment = Residential; `retail` / `office` / `industrial` / `land` need segment = Commercial.",
            "default": "all"
          },
          "priceRange": {
            "title": "Price range (SGD)",
            "type": "string",
            "description": "Format: `min:500000,max:3000000` — or just `min:500000` / `max:3000000`.",
            "default": ""
          },
          "bedrooms": {
            "title": "Bedrooms",
            "type": "string",
            "description": "Comma-separated counts, e.g. `2,3` for 2- and 3-bedroom listings.",
            "default": ""
          },
          "bathrooms": {
            "title": "Bathrooms",
            "type": "string",
            "description": "Comma-separated counts, e.g. `2`.",
            "default": ""
          },
          "floorAreaRange": {
            "title": "Floor area range (sqft)",
            "type": "string",
            "description": "Format: `min:600,max:2000`.",
            "default": ""
          },
          "moreFilters": {
            "title": "More filters (advanced)",
            "type": "string",
            "description": "Optional query-string of extra filters merged into every search, e.g. `furnishing=fully&tenure=freehold&floorLevel=high&propertyStatus=resale`. Supported keys include: `propertyStatus` (resale/new_launch/subsale), `tenure` (freehold/leasehold), `furnishing` (fully/partial/unfurnished), `floorLevel` (ground/low/mid/high/top/penthouse), `rentalType` (unit/room), `roomType` (master/common), `buildingAge` (5/10/20), `keywords`, `hasFloorPlan`, `condoSubType`, `landedSubType`, `hdbSubType`, `landSizeRange`, `completionYearRange`.",
            "default": ""
          },
          "pages": {
            "title": "Pages per search",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many pages to fetch for each search query (stops early when 99.co runs out of results).",
            "default": 1
          },
          "resultCount": {
            "title": "Results per page",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "99.co caps each search page at 60 results.",
            "default": 25
          },
          "property_inputs": {
            "title": "Listing id or 99.co URL (one per line)",
            "type": "array",
            "description": "Auto-detects each entry and calls the right endpoint:\n• Listing id (e.g. `EVPssE5S3KHLKudeJdhwT4`) → `/details/byid`\n• `https://www.99.co/...` listing URL → `/details/byurl`\n\nEach row = one full property record (price, address, agent contact, photos) enriched with similar listings, nearby amenities, floor plans, and project analysis (all in the `Raw` column).",
            "items": {
              "type": "string"
            }
          },
          "enrich": {
            "title": "Enrich property details",
            "type": "boolean",
            "description": "When on, each property detail also includes `similarListings`, `nearbyAmenities`, `floorPlans`, and `projectAnalysis` blocks (kept in the `Raw` column). Turn off for a leaner, faster detail call.",
            "default": true
          },
          "agent_search_queries": {
            "title": "Agent search keyword (one per line)",
            "type": "array",
            "description": "Keyword matching agent or agency name → `/agent/search` (one row per agent, includes phone + slug). Use `*` to browse the full directory without a keyword. `Pages per search` and `Results per page` above apply.",
            "items": {
              "type": "string"
            }
          },
          "agent_inputs": {
            "title": "Agent slug or profile URL (one per line)",
            "type": "array",
            "description": "Full agent profile → `/agent/details`. Accepts the agent slug from `/agent/search` (e.g. `R046036F-jack-tan`) or a profile URL (`https://www.99.co/singapore/agents/...`). Returns contact info, agency, and listings breakdown.",
            "items": {
              "type": "string"
            }
          },
          "autocomplete_inputs": {
            "title": "Autocomplete query (one per line)",
            "type": "array",
            "description": "Free-text location lookup → `/autocomplete`. One row per suggestion (MRT stations, districts, projects, schools) with its 99.co location id, type, and coordinates — useful for building precise searches.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}