{
  "openapi": "3.0.1",
  "info": {
    "title": "Airbnb Occupancy, Availability & Dynamic-Pricing Scraper",
    "description": "Derive per-listing occupancy %, available/booked nights, min-nights and booking-pace from Airbnb's forward availability calendar — short-term-rental revenue intelligence (the AirDNA / AllTheRooms signal). By listing ID or search area.",
    "version": "0.1",
    "x-build-id": "mBaa1VAk6hc8JREKe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xtracto~airbnb-occupancy/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xtracto-airbnb-occupancy",
        "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/xtracto~airbnb-occupancy/runs": {
      "post": {
        "operationId": "runs-sync-xtracto-airbnb-occupancy",
        "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/xtracto~airbnb-occupancy/run-sync": {
      "post": {
        "operationId": "run-sync-xtracto-airbnb-occupancy",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "listing",
              "searchArea"
            ],
            "type": "string",
            "description": "'listing' scrapes the calendars of specific listing IDs. 'searchArea' first resolves listing IDs from an area's search results, then scrapes their calendars.",
            "default": "listing"
          },
          "listingIds": {
            "title": "Listing IDs (listing mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Airbnb listing IDs (the number in /rooms/<id>), e.g. '983207483398233150'. Full room URLs are also accepted. Required when mode = listing.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location / area (searchArea mode)",
            "type": "string",
            "description": "Airbnb search area slug as in the URL /s/<location>/homes, e.g. 'Bali--Indonesia' or 'Austin--TX'. Required when mode = searchArea."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code for any returned prices (e.g. USD, EUR, GBP). Note: Airbnb returns null per-night calendar prices for anonymous requests, so ADR/revenue are usually unavailable — occupancy does not depend on price.",
            "default": "USD"
          },
          "calendarMonths": {
            "title": "Forward calendar months",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many forward months of availability to request (1-12). Airbnb caps the horizon at ~12 months.",
            "default": 12
          },
          "computeOccupancy": {
            "title": "Compute occupancy metrics",
            "type": "boolean",
            "description": "Derive occupancy_30/60/90/365d, booked-nights, min-nights mode, and booking-pace deltas from the raw calendar. Turn off to emit only the raw days[].",
            "default": true
          },
          "includeProfile": {
            "title": "Include listing profile record",
            "type": "boolean",
            "description": "Also emit a LISTING_PROFILE record (title, room type, lat/lng, rating, review count, capacity) harvested from the listing page. Adds no extra requests (uses the warm-up page).",
            "default": true
          },
          "maxListings": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on listings processed in one run (applies to both modes).",
            "default": 500
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many listings to process in parallel. Keep low (1-4) to stay under Airbnb's rate limits.",
            "default": 3
          },
          "logLevel": {
            "title": "Log level",
            "enum": [
              "INFO",
              "DEBUG"
            ],
            "type": "string",
            "description": "Set DEBUG for verbose troubleshooting output.",
            "default": "INFO"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is strongly recommended — Airbnb fingerprints datacenter ASNs upstream of the TLS/header layer. Light runs may work without one.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}