{
  "openapi": "3.0.1",
  "info": {
    "title": "Real Estate Data Aggregator",
    "description": "Redfin property data enriched with 48 government data fields from 13 free APIs — Census demographics, FEMA flood zones, FBI crime, Walk Score, HUD rent benchmarks, and more. USPS-normalized, confidence-scored, analysis-ready. From $4/1K properties.",
    "version": "1.0",
    "x-build-id": "nUqjeuX6Qzv8wR9Ss"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/grimnir~real-estate-aggregator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-grimnir-real-estate-aggregator",
        "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/grimnir~real-estate-aggregator/runs": {
      "post": {
        "operationId": "runs-sync-grimnir-real-estate-aggregator",
        "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/grimnir~real-estate-aggregator/run-sync": {
      "post": {
        "operationId": "run-sync-grimnir-real-estate-aggregator",
        "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",
        "required": [
          "location"
        ],
        "properties": {
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City name, ZIP code, or full address to search"
          },
          "sources": {
            "title": "Data Sources",
            "type": "array",
            "description": "Data sources to scrape. Redfin is the default (best coverage + detail pages). Additional datacenter-friendly sources: foreclosure (distressed properties nationwide), government_reo (HUD/Freddie Mac/USDA REO), fsbo (for-sale-by-owner via FSBO.com + ForSaleByOwner.com), zeus_auction (tax sale auctions in AL/CO/FL/IN/IA/LA/MI/TN), land_bank (Detroit Land Bank), epropertyplus (10 land bank jurisdictions: KC, Columbus, Houston, Memphis, etc.). Browser-required sources (Zillow, Realtor.com) need local hardware — visit vitkidata.com.",
            "items": {
              "type": "string",
              "enum": [
                "redfin",
                "realtor",
                "zillow",
                "zumper",
                "foreclosure",
                "government_reo",
                "fsbo",
                "tax_sale",
                "zeus_auction",
                "land_bank",
                "epropertyplus",
                "new_construction"
              ]
            },
            "default": [
              "redfin"
            ]
          },
          "listingType": {
            "title": "Listing Type",
            "enum": [
              "for_sale",
              "for_rent",
              "sold",
              "all"
            ],
            "type": "string",
            "description": "Type of listings to retrieve",
            "default": "for_sale"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of properties to return (max 10,000)",
            "default": 100
          },
          "includeDetails": {
            "title": "Include Detail Pages",
            "type": "boolean",
            "description": "Fetch individual property detail pages for price history, tax history, listing date, description, parcel ID, HOA fees, garage, stories, and confidence-scored provenance tracking. Adds 2-5 seconds per property.",
            "default": true
          },
          "includeGovernmentData": {
            "title": "Include Government Data",
            "type": "boolean",
            "description": "Enrich properties with 48 data fields from 13 free APIs: Census ACS demographics, Walk Score/Transit/Bike scores, HUD Fair Market Rent, FEMA flood zones + disaster history, FBI crime rates, FHFA house price index, IRS income + migration, BLS employment + wages, FRED macro series, EPA brownfields, CFPB mortgage data. Data is tract/county/ZIP-level and cached. Adds minimal latency. No paid API subscriptions required.",
            "default": true
          },
          "includeSellerContact": {
            "title": "Include Seller Contact (FSBO)",
            "type": "boolean",
            "description": "Include seller PII (name, phone, email) from FSBO platforms. Default: excluded for CCPA compliance. Only populated when 'fsbo' is in sources.",
            "default": false
          },
          "skipCache": {
            "title": "Skip Cache",
            "type": "boolean",
            "description": "Bypass the geocoding and Placekey cache. Forces fresh API lookups for all properties.",
            "default": false
          },
          "sourceTimeout": {
            "title": "Source Timeout (seconds)",
            "minimum": 30,
            "maximum": 900,
            "type": "integer",
            "description": "Maximum time in seconds to wait for each data source before timing out.",
            "default": 300
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "json",
              "csv",
              "both"
            ],
            "type": "string",
            "description": "Output as JSON (Apify dataset), CSV, or both",
            "default": "json"
          },
          "outputDetail": {
            "title": "Output Detail Level",
            "enum": [
              "core",
              "full"
            ],
            "type": "string",
            "description": "Level of detail in output. 'core': lean normalized data (address, price, details, listing, sale/rental history, sources, confidence, conflicts). 'full': adds per-field provenance, field_confidence, enrichment_failures, MLS description, government_data.",
            "default": "full"
          },
          "strictPublicFactsGate": {
            "title": "Strict Public Facts Gate",
            "type": "boolean",
            "description": "When enabled, drops properties where MLS-reported beds/baths disagree with county assessor public records. Requires includeDetails=true. Default: false (discrepancies are recorded but properties are kept).",
            "default": false
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Datacenter proxies work for Redfin (default source). Residential proxies may be needed for experimental sources."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}