{
  "openapi": "3.0.1",
  "info": {
    "title": "Italian Hospitality Lead Qualifier",
    "description": "Find Italian hotels, B&Bs and restaurants with public commercial opportunity signals: weak/broken website, missing booking CTA, missing WhatsApp/socials, public contacts, and outreach-ready sales angles.",
    "version": "0.2",
    "x-build-id": "u285xMk3U9wozHGhO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/viable_guard~italian-hospitality-lead-qualifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-viable_guard-italian-hospitality-lead-qualifier",
        "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~italian-hospitality-lead-qualifier/runs": {
      "post": {
        "operationId": "runs-sync-viable_guard-italian-hospitality-lead-qualifier",
        "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~italian-hospitality-lead-qualifier/run-sync": {
      "post": {
        "operationId": "run-sync-viable_guard-italian-hospitality-lead-qualifier",
        "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 businesses to audit directly. Use this to bring your own Google Maps export, CRM rows, 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": "Business name to show in the output dataset."
                },
                "name": {
                  "type": "string",
                  "title": "Alternative business name",
                  "description": "Alternative alias for businessName, useful when importing generic CSV/JSON rows."
                },
                "category": {
                  "type": "string",
                  "title": "Category",
                  "description": "Hospitality category such as hotel, guest_house, bed_and_breakfast, or restaurant."
                },
                "location": {
                  "type": "string",
                  "title": "Location",
                  "description": "City or area associated with the business."
                },
                "website": {
                  "type": "string",
                  "title": "Website",
                  "description": "Public website URL to audit. Bare domains are accepted and normalized to HTTPS."
                },
                "address": {
                  "type": "string",
                  "title": "Address",
                  "description": "Optional public address for context and CRM export."
                },
                "phone": {
                  "type": "string",
                  "title": "Phone",
                  "description": "Optional public phone from the source list; it is cleaned and merged into publicPhones."
                },
                "lat": {
                  "type": "number",
                  "title": "Latitude",
                  "description": "Optional latitude from the source list."
                },
                "lon": {
                  "type": "number",
                  "title": "Longitude",
                  "description": "Optional longitude from the source list."
                }
              }
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Italian city or area names to search in OpenStreetMap/Overpass. Leave empty if using inputBusinesses only.",
            "items": {
              "type": "string"
            },
            "default": [
              "Rimini"
            ]
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "Hospitality categories to include. Supported values are hotel, guest_house, and restaurant.",
            "items": {
              "type": "string"
            },
            "default": [
              "hotel",
              "guest_house",
              "restaurant"
            ]
          },
          "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 the 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": [
              "it",
              "en"
            ],
            "type": "string",
            "description": "Language for sales angle labels.",
            "default": "it"
          },
          "overpassEndpoints": {
            "title": "Overpass endpoints",
            "type": "array",
            "description": "Advanced: fallback Overpass API endpoints for public OpenStreetMap discovery. Leave default unless one endpoint is unreliable.",
            "items": {
              "type": "string"
            },
            "default": [
              "https://overpass-api.de/api/interpreter",
              "https://overpass.kumi.systems/api/interpreter"
            ]
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}