{
  "openapi": "3.0.1",
  "info": {
    "title": "STR vs LTR Market Lens — Airbnb, Vrbo & Apartments.com",
    "description": "STR vs LTR market lens for property investors. Pulls short-term (Airbnb, Vrbo) and long-term (Apartments.com) rates side-by-side, normalizes to monthly equivalents and break-even occupancy — the spreadsheet you'd build by hand, in one run.",
    "version": "1.0",
    "x-build-id": "8EnntXWpdXyMX2pg4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~str-investor-market-lens/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-str-investor-market-lens",
        "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~str-investor-market-lens/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-str-investor-market-lens",
        "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~str-investor-market-lens/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-str-investor-market-lens",
        "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": [
          "searchMode"
        ],
        "properties": {
          "searchMode": {
            "title": "🔍 Search mode",
            "enum": [
              "location",
              "coordinates",
              "zip"
            ],
            "type": "string",
            "description": "How to anchor the cross-channel pull. `location` accepts a city / state / neighbourhood string (e.g. `Miami, FL`). `coordinates` accepts a lat/lon + radius. `zip` accepts a US ZIP (Apartments.com primary; STR channels fall back to city via reverse-lookup).",
            "default": "location"
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "Required when `searchMode = location`. Free-text destination — city, neighbourhood, or `City, ST`. Example: `Miami, FL`, `Brooklyn, NY`, `Lake Tahoe`."
          },
          "latitude": {
            "title": "🌐 Latitude",
            "type": "string",
            "description": "Required when `searchMode = coordinates`. Decimal latitude (-90 to 90)."
          },
          "longitude": {
            "title": "🌐 Longitude",
            "type": "string",
            "description": "Required when `searchMode = coordinates`. Decimal longitude (-180 to 180)."
          },
          "radiusKm": {
            "title": "📏 Radius (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Used with `searchMode = coordinates`. Default 10 km. Larger radii return more rows but consume more credit.",
            "default": 10
          },
          "zip": {
            "title": "📮 US ZIP code",
            "type": "string",
            "description": "Required when `searchMode = zip`. 5-digit US ZIP. Apartments.com supports this natively; STR channels fall back to the city the ZIP resolves to."
          },
          "channels": {
            "title": "📡 Channels to query",
            "uniqueItems": true,
            "type": "array",
            "description": "Which platforms to pull from. Default: all three. The headline `marketComparisonRow` event only fires when the query produced rows on **two or more** channels — so single-channel runs are charged commodity rates only.",
            "items": {
              "type": "string",
              "enum": [
                "airbnb",
                "vrbo",
                "apartments"
              ]
            },
            "default": [
              "airbnb",
              "vrbo",
              "apartments"
            ]
          },
          "maxResultsPerChannel": {
            "title": "🔢 Max results per channel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on rows pulled per channel. Free tier is capped at 25 per channel regardless.",
            "default": 50
          },
          "occupancyBaseline": {
            "title": "📊 STR occupancy baseline (decimal)",
            "type": "string",
            "description": "Default STR occupancy assumption when calendar enrichment is OFF. Used in `monthly_equivalent_rate = nightly × 30.4 × occupancy`. Industry default is `0.70` (70% bookings). Drop to `0.55` for soft markets, raise to `0.80` for top performers. Pass as a decimal string.",
            "default": "0.70"
          },
          "enrichSTRCalendar": {
            "title": "📅 Pull live STR availability calendar",
            "type": "boolean",
            "description": "When ON, fetches the forward-12-month availability calendar from Airbnb and Vrbo per listing — overrides the static occupancy baseline with live occupancy. Adds one upstream call per STR listing → priced separately as `strCalendarEnriched`.",
            "default": false
          },
          "computeCrossListingCandidates": {
            "title": "🔗 Compute cross-listing candidates",
            "type": "boolean",
            "description": "When ON, every row carries a `crossListingCandidates[]` array listing peer-platform rows within 50 m + same bedrooms + same propertyType. Identifies likely 'same property on multiple channels' without an exact address join. Free — no extra charges.",
            "default": true
          },
          "checkIn": {
            "title": "📅 Check-in date (optional)",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. When provided with `checkOut`, drives STR per-night prices. Leave blank for the static price the listing currently advertises."
          },
          "checkOut": {
            "title": "📅 Check-out date (optional)",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Must be paired with `checkIn`."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}