{
  "openapi": "3.0.1",
  "info": {
    "title": "LoopNet + Crexi Scraper · CRE Listings · CoStar Alternative",
    "description": "LoopNet + Crexi commercial real estate scraper. Aggregates listings, normalizes cap rates (NOI/price + asset-class median fallback), tracks days-on-market, dedups cross-platform, exposes broker contacts. The CoStar alternative for SMB CRE brokers — pay-per-result, $5/1K listings.",
    "version": "0.2",
    "x-build-id": "57FTxENeEUlaOgKCW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kazkn~commercial-real-estate-brokerage-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kazkn-commercial-real-estate-brokerage-intel",
        "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/kazkn~commercial-real-estate-brokerage-intel/runs": {
      "post": {
        "operationId": "runs-sync-kazkn-commercial-real-estate-brokerage-intel",
        "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/kazkn~commercial-real-estate-brokerage-intel/run-sync": {
      "post": {
        "operationId": "run-sync-kazkn-commercial-real-estate-brokerage-intel",
        "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": {
          "city": {
            "title": "🏙️ City",
            "type": "string",
            "description": "Target city. Combined with State below, used to build a search bounding box. Leave empty if you provide URLs in the field below."
          },
          "state": {
            "title": "🇺🇸 State (US 2-letter)",
            "type": "string",
            "description": "US state code (CA, NY, TX, FL, NV, …). Required when City is set."
          },
          "assetClasses": {
            "title": "🎯 Asset class",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to specific commercial property types. Empty = all types.",
            "items": {
              "type": "string",
              "enum": [
                "office",
                "retail",
                "industrial",
                "multifamily",
                "land",
                "hotel",
                "mixed-use",
                "specialty"
              ],
              "enumTitles": [
                "🏢 Office",
                "🛍️ Retail",
                "🏭 Industrial",
                "🏠 Multifamily",
                "🌾 Land",
                "🏨 Hotel",
                "🏗️ Mixed-use",
                "🎯 Specialty"
              ]
            }
          },
          "sourcesEnabled": {
            "title": "📡 Sources",
            "uniqueItems": true,
            "type": "array",
            "description": "Which platforms to query. Both enabled by default (cross-platform dedup needs both).",
            "items": {
              "type": "string",
              "enum": [
                "loopnet",
                "crexi"
              ],
              "enumTitles": [
                "LoopNet",
                "Crexi"
              ]
            },
            "default": [
              "loopnet",
              "crexi"
            ]
          },
          "transactionTypes": {
            "title": "💼 Transaction type",
            "uniqueItems": true,
            "type": "array",
            "description": "Whether to fetch <b>for-sale</b> properties (purchase prices, cap rates), <b>for-lease</b> spaces (rent quotes, suite breakdown), or <b>both</b>. When both are enabled, an asset listed for both sale AND lease emits 2 separate dataset rows.<br/><br/><b>⚠️ v0.2 scope:</b> Lease scraping is supported on <b>Crexi</b>. LoopNet for-lease is queued for v0.3 (pending iPhone API reverse-engineering). For lease-only runs prefer <code>sourcesEnabled: [\"crexi\"]</code>.",
            "items": {
              "type": "string",
              "enum": [
                "sale",
                "lease"
              ],
              "enumTitles": [
                "🛒 For sale (purchase)",
                "🏷️ For lease (rent)"
              ]
            },
            "default": [
              "sale"
            ]
          },
          "maxResultsPerSource": {
            "title": "🔢 Maximum results PER SOURCE",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap PER SOURCE per run. With both sources enabled and value=10, you get up to 10 LoopNet + 10 Crexi = 20 total.",
            "default": 100
          },
          "startUrls": {
            "title": "🔗 Search URLs (optional)",
            "type": "array",
            "description": "Optional. Paste search URLs from <a href=\"https://www.loopnet.com\" target=\"_blank\">LoopNet</a> or <a href=\"https://www.crexi.com\" target=\"_blank\">Crexi</a>. URL filters are auto-extracted when possible:<br/><br/><b>✅ Crexi URL params auto-extracted:</b> types[] (asset class), priceMin / priceMax, capRateMin / capRateMax, squareFootageMin / squareFootageMax.<br/><b>⚠️ Crexi NOT auto-extracted:</b> placeIds (location — set City + State manually), subtypes, tenancy, occupancy, yearBuilt, lotSize, keywords, /lease/ paths.<br/><br/><b>✅ LoopNet URL parts auto-extracted:</b> spaceType (asset class) + city + state + for-sale/lease detection.<br/><b>⚠️ LoopNet NOT auto-extracted:</b> the encoded \"sk=\" filter blob (cap rate, tenancy, year built, etc.) — set those in the form below.<br/><br/>Form fields ALWAYS take priority over URL filters when both are set.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "priceMin": {
            "title": "Min asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound on asking price."
          },
          "priceMax": {
            "title": "Max asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on asking price."
          },
          "capRateMin": {
            "title": "Min cap rate (%)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Lower bound on the normalized cap rate (e.g. 5 = 5%)."
          },
          "capRateMax": {
            "title": "Max cap rate (%)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Upper bound on the normalized cap rate."
          },
          "buildingSizeMin": {
            "title": "Min building size (sqft)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound on building square footage."
          },
          "buildingSizeMax": {
            "title": "Max building size (sqft)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on building square footage."
          },
          "deduplicate": {
            "title": "Cross-platform deduplication",
            "type": "boolean",
            "description": "Merge listings appearing on both LoopNet and Crexi into a single record (with also_listed_on field).",
            "default": true
          },
          "normalizeCapRate": {
            "title": "Normalize cap rates",
            "type": "boolean",
            "description": "Recalculate cap_rate_normalized from NOI / asking_price. Falls back to asset-class median when NOI absent.",
            "default": true
          },
          "monitoringMode": {
            "title": "Monitoring mode (only NEW listings)",
            "type": "boolean",
            "description": "Emit only listings not seen in previous runs. Uses an internal snapshot keyed by your search criteria. Best run on a daily schedule.",
            "default": false
          },
          "transactionTrackingMode": {
            "title": "Transaction tracking (CLOSED deals only)",
            "type": "boolean",
            "description": "Emit only listings that closed since the last run (sold / leased / under_contract / removed). Useful for comp data and market velocity tracking.",
            "default": false
          },
          "includeListingDetails": {
            "title": "Include full listing details",
            "type": "boolean",
            "description": "Fetch each listing's detail page for richer data (NOI, year_built, building class, full description, photos). Slower and adds $0.003 per listing.",
            "default": false
          },
          "includePortfolioProperties": {
            "title": "Expand portfolio listings",
            "type": "boolean",
            "description": "When a listing groups multiple properties under one URL, emit each as a separate dataset item.",
            "default": false
          },
          "downloadImages": {
            "title": "Download images to key-value store",
            "type": "boolean",
            "description": "Save listing photos to the Apify Key-Value Store (collection: photos). Off by default to save bandwidth.",
            "default": false
          },
          "maxImages": {
            "title": "Max images per listing",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on photos saved per listing (only used when downloadImages = true). NOT a result-count limit — for that, use \"Maximum results PER SOURCE\" above.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum parallel page fetches.",
            "default": 20
          },
          "minConcurrency": {
            "title": "Min concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Minimum parallel page fetches.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many times to retry a failed request before giving up.",
            "default": 5
          },
          "addresses": {
            "title": "Addresses (alternative to URLs)",
            "type": "array",
            "description": "Format: \"123 Main St, City, State\". Each address queried on every enabled source. Use City + State above instead for new searches.",
            "items": {
              "type": "string"
            }
          },
          "crexiCookies": {
            "title": "Crexi session cookies (advanced)",
            "type": "array",
            "description": "Optional Crexi session cookies (export with EditThisCookie Chrome extension after login). Not required for the default scrape — only useful if you hit Crexi rate limits."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify residential proxies recommended (default).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxResults": {
            "title": "Legacy: max results (alias for maxResultsPerSource)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Backward-compat alias. Use \"Maximum results PER SOURCE\" above instead. Leave empty — only kept for older saved tasks."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}