{
  "openapi": "3.0.1",
  "info": {
    "title": "Airbnb Guest Origin Scraper – Guest Demographics by Country",
    "description": "Discover WHERE Airbnb guests come from. Extracts reviewer locations from listing reviews (public data, no login) and aggregates guest demographics by country and region — per listing and per market. Search by location, bounding box, URL, or listing IDs.",
    "version": "1.0",
    "x-build-id": "WX5depI3mcBdMs2mV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/integrative_tangent~airbnb-guest-origin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-integrative_tangent-airbnb-guest-origin-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/integrative_tangent~airbnb-guest-origin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-integrative_tangent-airbnb-guest-origin-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/integrative_tangent~airbnb-guest-origin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-integrative_tangent-airbnb-guest-origin-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": {
          "listingIds": {
            "title": "Listing IDs",
            "type": "array",
            "description": "Specific Airbnb listing IDs. These are the numeric codes in Airbnb URLs — e.g. airbnb.com/rooms/48711480 → ID is \"48711480\".\n\nYou can also paste full listing URLs here; the ID is extracted automatically.\n\n⚠️ Copy the WHOLE number. Airbnb's newer IDs are 18 digits (e.g. 496506725996433560) — dropping a digit silently returns a different (or empty) listing.\n\nExample: [\"48711480\", \"1506456228556318996\"]",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Listing URLs",
            "type": "array",
            "description": "Full Airbnb listing URLs. The actor extracts the listing ID automatically.\n\nExample: [\"https://www.airbnb.com/rooms/48711480\"]",
            "items": {
              "type": "string"
            }
          },
          "searchUrl": {
            "title": "Search URL",
            "type": "string",
            "description": "An Airbnb SEARCH RESULTS URL (airbnb.com/s/...) containing map coordinates (ne_lat, ne_lng, sw_lat, sw_lng). The actor discovers all listings in that map area.\n\nHow to get it: search on airbnb.com, move or zoom the map once so the URL gains \"ne_lat=...\", then copy the URL from your browser.\n\n⚠️ This is NOT for a single property. A /rooms/<id> link belongs in Mode A or B — if you paste one here the actor will detect it and treat it as a listing ID.\n\nNo map coordinates? The actor falls back to the place name in the URL path."
          },
          "boundingBox": {
            "title": "Bounding Box Coordinates",
            "type": "object",
            "description": "Define a custom geographic area using GPS coordinates: northeast (top-right) and southwest (bottom-left) corners.\n\nExample for Miami Beach:\n{\"ne_lat\": 25.85, \"ne_lng\": -80.11, \"sw_lat\": 25.75, \"sw_lng\": -80.15}"
          },
          "location": {
            "title": "Location Name",
            "type": "string",
            "description": "City, neighborhood, or region name. The actor geocodes it via OpenStreetMap and discovers every listing in the area.\n\nExamples: \"Miami Beach, Florida\" · \"Lisbon, Portugal\" · \"Tulum, Mexico\" · \"Bali, Indonesia\""
          },
          "maxListings": {
            "title": "Maximum Listings",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on how many listings to process. Set to 0 for unlimited.\n\nTip: Start with 5–10 to test before running a full market analysis.",
            "default": 0
          },
          "maxReviewsPerListing": {
            "title": "Maximum Reviews per Listing",
            "minimum": 0,
            "type": "integer",
            "description": "How many reviews to fetch per listing (most recent first). Set to 0 to fetch ALL reviews — best demographic accuracy, but slower and more results billed.\n\nAbout half of Airbnb reviewers show no location, so 100 reviews yields roughly 50 usable data points (±14pp margin of error). Below 30 usable points the country split is noise, and the output will flag it as low confidence.",
            "default": 100
          },
          "emitReviewRows": {
            "title": "Emit One Row per Review",
            "type": "boolean",
            "description": "When enabled (default), each review becomes a dataset row with the reviewer's origin. When disabled, only the per-listing and global demographic summaries are emitted — much cheaper for pure market studies.",
            "default": true
          },
          "includeReviewText": {
            "title": "Include Review Text",
            "type": "boolean",
            "description": "Include the full review comment text in review rows. Off by default to keep the dataset light.",
            "default": false
          },
          "stayLagDays": {
            "title": "Stay Lag (days)",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "Days subtracted from each review date before bucketing it into a month, to approximate when the stay actually happened. Guests review after checkout, so raw review months run slightly late. Set to 0 to bucket by the literal review date.",
            "default": 7
          },
          "fetchListingDetails": {
            "title": "Fetch Listing Details",
            "type": "boolean",
            "description": "Look up each listing's title, room type and rating so rows are readable and joinable against your own inventory. Costs one extra request per listing, and only applies to the listing-ID and URL modes — the search modes already return this. Turn off for maximum speed on large runs.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Residential proxy is used by default and strongly recommended — Airbnb blocks datacenter IPs, which causes empty or failed runs. Only disable it if you provide your own proxy.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}