{
  "openapi": "3.0.1",
  "info": {
    "title": "Sold Prices Forensics — Cross-Border Comp Data API",
    "description": "Pull historical sold-price comparables across US (Zillow) and UK (Rightmove + Zoopla) in a single normalized dataset. Per-address forensic lookup, area sweep for comps, native currency declared per row. Built for appraisers, RICS surveyors, mortgage underwriters, cross-border investors.",
    "version": "1.0",
    "x-build-id": "6gcbs0gFjuaLfDgGf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~sold-prices-forensics-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-sold-prices-forensics-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~sold-prices-forensics-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-sold-prices-forensics-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~sold-prices-forensics-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-sold-prices-forensics-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": {
          "searchMode": {
            "title": "🧭 Search Mode",
            "enum": [
              "byAddress",
              "byArea"
            ],
            "type": "string",
            "description": "How sold-price comparables are sourced.\n\n• **byAddress** — per-property forensic lookup. Each input address triggers a per-address sold-price call (Zillow for US, Zoopla for UK).\n• **byArea** — comparable-sales sweep over a UK neighbourhood, town, or postcode. Hits Rightmove `/sold-prices` and Zoopla `/sold-prices` for the named area; returns up to thousands of rows depending on `maxResults`. (Zillow does not expose area-level historical sweep through this actor — use byAddress for US comps.)",
            "default": "byAddress"
          },
          "platforms": {
            "title": "🌐 Source platforms",
            "uniqueItems": true,
            "type": "array",
            "description": "Which platforms to query. Leave empty to query all that apply for the chosen mode.\n\n• **zillow** — US per-address sold history. byAddress only.\n• **zoopla** — UK per-address sold history + UK area sweep.\n• **rightmove** — UK area sweep only.\n\nKnown v1.0 limitations: Redfin returns redacted sold prices (unusable); Idealista (ES/IT/PT) does not expose historical transactions.",
            "items": {
              "type": "string",
              "enum": [
                "zillow",
                "zoopla",
                "rightmove"
              ],
              "enumTitles": [
                "Zillow (US)",
                "Zoopla (UK)",
                "Rightmove (UK)"
              ]
            },
            "default": [
              "zillow",
              "zoopla",
              "rightmove"
            ]
          },
          "addresses": {
            "title": "🏠 Addresses (byAddress mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Full property addresses to look up — one per line or array entry. The country is auto-detected from the address (US ZIP / state code → Zillow; UK postcode → Zoopla). Free-text addresses without a country signal are queried against all enabled platforms.\n\nExamples:\n- `1875 AVONDALE Circle, Jacksonville, FL 32205`\n- `48 Elsworthy Road, London NW3 3BU`\n- `10 Downing Street, London SW1A 2AA`",
            "items": {
              "type": "string"
            }
          },
          "areas": {
            "title": "🗺 Areas (byArea mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "UK locations to sweep for comparable-sales — towns, neighbourhoods, postcodes, or outcodes. One per line. Each area is sent to Rightmove `/sold-prices` (resolves to a location identifier) and Zoopla `/sold-prices` (resolves via the area-slug convention).\n\nExamples:\n- `Hampstead`\n- `SW1A`\n- `Manchester`\n- `Oxford`",
            "items": {
              "type": "string"
            }
          },
          "soldInYears": {
            "title": "📅 Recently sold (Rightmove only)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Restrict Rightmove results to sales completed in the last N years. Leave empty for full history. Allowed values: 1, 3, 5, 10. (Zoopla returns all available history regardless of this field.)"
          },
          "yearFrom": {
            "title": "📅 Year filter — from",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Only return sales where the sale year is ≥ this value. Combine with `yearTo` to bound a sale-year window. Optional."
          },
          "yearTo": {
            "title": "📅 Year filter — to",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Only return sales where the sale year is ≤ this value. Optional."
          },
          "maxResults": {
            "title": "📊 Max results per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on the total number of sold-price rows pushed in this run (across all queries, all platforms). Auto-paginates until the cap is reached or the search is fully drained. FREE tier is always capped at 25 rows.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}