{
  "openapi": "3.0.1",
  "info": {
    "title": "Hospitality Website Opportunity Scanner",
    "description": "Find hotels, B&Bs, guest houses and restaurants with public website, SEO, booking and contact opportunity signals across configurable locations.",
    "version": "0.2",
    "x-build-id": "i8M6HrHOcHfyaeqMW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/viable_guard~hospitality-website-opportunity-scanner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-viable_guard-hospitality-website-opportunity-scanner",
        "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/viable_guard~hospitality-website-opportunity-scanner/runs": {
      "post": {
        "operationId": "runs-sync-viable_guard-hospitality-website-opportunity-scanner",
        "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/viable_guard~hospitality-website-opportunity-scanner/run-sync": {
      "post": {
        "operationId": "run-sync-viable_guard-hospitality-website-opportunity-scanner",
        "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": {
          "inputBusinesses": {
            "title": "Input businesses",
            "type": "array",
            "description": "Optional list of known hospitality businesses to audit directly. Use this for CRM rows, Google Maps exports, spreadsheets, or manually selected websites. If provided together with locations, both sources are combined and deduplicated.",
            "items": {
              "type": "object",
              "required": [
                "businessName",
                "website"
              ],
              "properties": {
                "businessName": {
                  "type": "string",
                  "title": "Business name",
                  "description": "Name of the business to audit."
                },
                "name": {
                  "type": "string",
                  "title": "Alternative name",
                  "description": "Alias accepted when businessName is missing."
                },
                "category": {
                  "type": "string",
                  "title": "Category",
                  "description": "Business category/niche, e.g. hotel, restaurant, dentist, cafe."
                },
                "location": {
                  "type": "string",
                  "title": "Location",
                  "description": "City/area label used in output."
                },
                "website": {
                  "type": "string",
                  "title": "Website",
                  "description": "Public website URL to audit."
                },
                "phone": {
                  "type": "string",
                  "title": "Phone",
                  "description": "Known public phone number to preserve in output."
                },
                "address": {
                  "type": "string",
                  "title": "Address",
                  "description": "Known public address."
                },
                "lat": {
                  "type": "number",
                  "title": "Latitude",
                  "description": "Optional latitude."
                },
                "lon": {
                  "type": "number",
                  "title": "Longitude",
                  "description": "Optional longitude."
                }
              }
            }
          },
          "country": {
            "title": "Country filter",
            "type": "string",
            "description": "Optional country name used to disambiguate OpenStreetMap/Overpass discovery, e.g. Spain, France, Portugal, Italy. Leave empty for global location-name matching."
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "City or area names to search in OpenStreetMap/Overpass. Leave empty if using inputBusinesses only.",
            "items": {
              "type": "string"
            }
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "Hospitality categories: hotel, guest_house, bed_and_breakfast, apartment, hostel, motel, resort, camp_site, chalet, restaurant, cafe, bar, pub, attraction.",
            "items": {
              "type": "string"
            }
          },
          "maxPlacesPerLocation": {
            "title": "Max places per location",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum OSM records requested per location before website filtering.",
            "default": 100
          },
          "maxBusinessesToAudit": {
            "title": "Max businesses to audit",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum websites to crawl in one run.",
            "default": 50
          },
          "minOpportunityScore": {
            "title": "Minimum opportunity score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only leads with score greater than or equal to this value are pushed to the dataset.",
            "default": 35
          },
          "includeContactExtraction": {
            "title": "Extract public contacts",
            "type": "boolean",
            "description": "When enabled, extract public emails, phone numbers, WhatsApp links, and social links from audited websites.",
            "default": true
          },
          "includeWebsiteAudit": {
            "title": "Run website opportunity audit",
            "type": "boolean",
            "description": "When enabled, detect weak website and conversion signals such as broken sites, missing HTTPS, missing booking CTAs, and weak metadata.",
            "default": true
          },
          "language": {
            "title": "Output language",
            "enum": [
              "en",
              "it"
            ],
            "type": "string",
            "description": "Language for sales angle labels.",
            "default": "en"
          },
          "overpassEndpoints": {
            "title": "Overpass endpoints",
            "type": "array",
            "description": "Advanced: Overpass API endpoints used for public OpenStreetMap discovery. Leave default unless a public endpoint is slow or unavailable.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}