{
  "openapi": "3.0.1",
  "info": {
    "title": "BE-Lead-Hunter",
    "description": "US city/category business discovery, bounded public website contacts and CSV/JSON/dataset exports. Fresh research needs explicit opt-ins and run cost limits. No mailbox verification, AI or sending. Standalone per-run storage; optional database modes remain separate.",
    "version": "0.5",
    "x-build-id": "3gAytHdNr18tJIgqh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wooden_turbojet~be-lead-hunter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wooden_turbojet-be-lead-hunter",
        "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/wooden_turbojet~be-lead-hunter/runs": {
      "post": {
        "operationId": "runs-sync-wooden_turbojet-be-lead-hunter",
        "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/wooden_turbojet~be-lead-hunter/run-sync": {
      "post": {
        "operationId": "run-sync-wooden_turbojet-be-lead-hunter",
        "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": {
          "runMode": {
            "title": "Run mode",
            "enum": [
              "snapshots",
              "discovery_plan",
              "reuse_discovery",
              "crawl_simulation",
              "crawl_websites",
              "collect_discovery",
              "qualify_saved_collection",
              "save_reviews",
              "fresh_plan",
              "fresh_leads"
            ],
            "type": "string",
            "description": "fresh_leads: find businesses by US city/state/category, collect bounded public website contacts and export. fresh_plan: prepare input without live work. snapshots: supplied records only. Other modes are advanced legacy/review operations. No sending.",
            "default": "snapshots"
          },
          "qualificationProfile": {
            "title": "Reviewed saved-collection qualification profile",
            "enum": [
              "nashville-collection-v1"
            ],
            "type": "string",
            "description": "qualify_saved_collection only: pins the exact reviewed collection receipt and eight artifact checksums. No new source or website requests."
          },
          "qualificationBundle": {
            "title": "Pinned saved collection evidence",
            "type": "object",
            "description": "qualify_saved_collection only: receipt and eight original UTF-8 artifact texts, prepared by the local input builder. Never include credentials. Exact pinned hashes and 250 KB total bound are enforced in code.",
            "default": {}
          },
          "collectionProfile": {
            "title": "Reviewed website collection profile",
            "enum": [
              "nashville-reviewed-agents-v1"
            ],
            "type": "string",
            "description": "collect_discovery only: selects the three manually reviewed named-agent identities and confirmed HTTPS starting sites. Other records remain deferred; this is not automatic agent qualification."
          },
          "enableReviewPersistence": {
            "title": "Allow append-only review storage (also requires server authorization)",
            "type": "boolean",
            "description": "Explicitly opt into save_reviews mode. Trusted server authorization and deployment secrets are also required; disabled by default.",
            "default": false
          },
          "reviewJob": {
            "title": "Review job — no credentials",
            "type": "object",
            "description": "save_reviews only: campaign, leads (1–10), sourceDigest, processorRevision, recordKind. Configure credentials only in trusted deployment secrets.",
            "default": {}
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Target country for the supplied research records or discovery plan.",
            "default": "United States"
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "fresh_leads supports all 50 US states and DC; supply the state name or abbreviation. Legacy supplied-record modes retain their narrower supported markets.",
            "default": "Tennessee"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "One explicit US city in the chosen state. Strict locality matching retains out-of-city candidates as labelled rejects; it does not silently expand to a metropolitan area.",
            "default": "Nashville"
          },
          "category": {
            "title": "Business category",
            "type": "string",
            "description": "fresh_leads uses this as the business search term, for example roofing contractor. Results remain candidates for human category review.",
            "default": "real estate"
          },
          "marketScope": {
            "title": "Discovery scope",
            "enum": [
              "city",
              "state_sample"
            ],
            "type": "string",
            "description": "Choose a specific city or an explicitly labeled state sample; this setting does not launch discovery.",
            "default": "city"
          },
          "businessSegment": {
            "title": "Real estate segment",
            "enum": [
              "",
              "brokerages",
              "property_managers",
              "individual_agents"
            ],
            "type": "string",
            "description": "The selected pilot targets individual agents. Search results still require review to distinguish agents from brokerages and teams.",
            "default": "individual_agents"
          },
          "discoveryLimit": {
            "title": "Discovery sample limit",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum listings selected for the small discovery sample, up to ten.",
            "default": 10
          },
          "sourceRunId": {
            "title": "Completed Maps run ID (reuse mode only)",
            "type": "string",
            "description": "Existing completed Google Maps Actor run to inspect in reuse mode; this never starts a new source run."
          },
          "sourceDatasetId": {
            "title": "Reviewed source dataset (limited-permission handoff)",
            "type": "string",
            "description": "reuse_discovery or collect_discovery: read the dataset for a reviewed source manifest and verify its content hash. Grants READ only. Run status is Console-attested, not re-read through the API. collect_discovery requires this field."
          },
          "allowReadOnlyApify": {
            "title": "Allow read-only Apify API calls",
            "type": "boolean",
            "description": "Opt into reading an existing completed run with trusted SDK credentials; disabled by default.",
            "default": false
          },
          "enableLiveRequests": {
            "title": "Allow public website contact collection",
            "type": "boolean",
            "description": "fresh_leads requires this together with fresh-discovery opt-in. Fetches bounded public pages with robots, SSRF and TLS controls. Legacy live modes also require their separate runtime authorization. Default false.",
            "default": false
          },
          "maxWebsites": {
            "title": "Maximum supplied websites to attempt",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Upper bound on supplied websites attempted during authorized website collection.",
            "default": 10
          },
          "maxHttpRequests": {
            "title": "HTTP attempt limit including robots and redirects",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Total HTTP attempt limit, including robots.txt checks and redirects.",
            "default": 40
          },
          "maxResponseBytes": {
            "title": "Maximum bytes per page response",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum response-body bytes accepted for one page.",
            "default": 500000
          },
          "maxTotalResponseBytes": {
            "title": "Combined response-body byte limit",
            "minimum": 1,
            "maximum": 5000000,
            "type": "integer",
            "description": "Combined response-body byte budget across collected pages.",
            "default": 3000000
          },
          "minRequestIntervalSecs": {
            "title": "Minimum interval between requests to one origin",
            "minimum": 1,
            "maximum": 10,
            "type": "number",
            "description": "Minimum delay in seconds between requests to the same origin.",
            "default": 1
          },
          "maxCollectionElapsedSecs": {
            "title": "Elapsed check threshold (not a hard DNS/platform timeout)",
            "minimum": 1,
            "maximum": 180,
            "type": "number",
            "description": "Elapsed-time check threshold for collection, not a hard deadline for DNS or platform execution.",
            "default": 120
          },
          "simulationObservedAt": {
            "title": "Synthetic simulation timestamp",
            "type": "string",
            "description": "Explicit observation timestamp for fixture-only simulated responses."
          },
          "httpFixtures": {
            "title": "Simulated HTTP responses only",
            "maxItems": 100,
            "type": "array",
            "description": "Fictional response fixtures for offline crawl simulation; not evidence of live HTTP collection.",
            "items": {
              "type": "object"
            },
            "default": []
          },
          "dnsRecords": {
            "title": "Simulated DNS answers only",
            "type": "object",
            "description": "Fictional DNS answers for offline simulation; never trusted as live DNS evidence.",
            "default": {}
          },
          "maxRunCostUsd": {
            "title": "Maximum budget for one complete job",
            "minimum": 0,
            "maximum": 54.99,
            "type": "number",
            "description": "Per-job budget policy including child Actors and related costs. Default 54.99 USD stays below 55 USD. This input does not enforce provider billing or enable paid execution.",
            "default": 54.99
          },
          "pilotBudgetUsd": {
            "title": "Legacy pilot budget declaration",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Retained for the original five-dollar pilot. New per-job policy uses Maximum budget for one complete job. Neither declaration enforces provider billing.",
            "default": 5
          },
          "pilotSpentUsd": {
            "title": "Declared pilot spend so far (not verified)",
            "minimum": 0,
            "type": "number",
            "description": "User-declared prior pilot costs in USD, not verified against provider billing.",
            "default": 0
          },
          "pendingCommitmentsUsd": {
            "title": "Declared pending run commitments",
            "minimum": 0,
            "type": "number",
            "description": "Declared outstanding pilot commitments in USD for budget planning.",
            "default": 0
          },
          "parentReserveUsd": {
            "title": "Estimated reserve for parent/platform costs",
            "minimum": 0,
            "type": "number",
            "description": "Estimated USD reserve for this Actor and platform costs, not a provider-enforced spending limit.",
            "default": 1
          },
          "discoveryBudgetUsd": {
            "title": "Proposed discovery allocation (not a billing cap)",
            "minimum": 0,
            "type": "number",
            "description": "fresh_leads: maximum charge for the single Maps source run. Minimum $0.50. Other paid add-ons are disabled. Together with parent/collection/export reserves this must fit maxRunCostUsd. Legacy offline plans use this as a declaration.",
            "default": 1
          },
          "maxLeads": {
            "title": "Maximum selected records",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Fresh mode: request 1–25 source records, with rejected/duplicate/missing-contact records retained and labelled. Actual results and email yield may be lower. Legacy modes also respect their own bounds.",
            "default": 10
          },
          "maxPagesPerWebsite": {
            "title": "Maximum processed snapshots per business",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Maximum supplied HTML snapshots processed for one business.",
            "default": 4
          },
          "strictCityMatch": {
            "title": "Reject known addresses outside the selected city",
            "type": "boolean",
            "description": "Reject records with known addresses outside the explicitly selected city.",
            "default": true
          },
          "requireWebsite": {
            "title": "Require a reported website",
            "type": "boolean",
            "description": "Exclude records without a reported website when enabled; disabled to retain no-website opportunities.",
            "default": false
          },
          "discoveryItems": {
            "title": "Supplied discovery records",
            "maxItems": 500,
            "type": "array",
            "description": "Previously collected business records to normalize and review without starting discovery. The prefilled example is fictional, not a real lead.",
            "items": {
              "type": "object"
            },
            "default": []
          },
          "websitePages": {
            "title": "Saved HTML snapshots",
            "maxItems": 200,
            "type": "array",
            "description": "Supplied saved HTML pages with source and observation metadata; these are not proof of a live scrape by this Actor.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Snapshot URL",
                  "description": "Original public page URL associated with the saved HTML snapshot.",
                  "type": "string",
                  "editor": "textfield",
                  "maxLength": 2048
                },
                "html": {
                  "title": "Saved HTML",
                  "description": "Untrusted saved HTML content, processed as data and never executed.",
                  "type": "string",
                  "editor": "textarea",
                  "maxLength": 500000
                },
                "statusCode": {
                  "title": "HTTP status",
                  "description": "Reported HTTP response status for the supplied snapshot.",
                  "type": "integer",
                  "editor": "number",
                  "minimum": 100,
                  "maximum": 599
                },
                "observedAt": {
                  "title": "Observed at",
                  "description": "Reported observation timestamp in ISO 8601 date-time format.",
                  "type": "string",
                  "editor": "textfield"
                },
                "contentType": {
                  "title": "Content type",
                  "description": "Reported response content type for the saved page.",
                  "type": "string",
                  "editor": "textfield"
                },
                "evidenceOrigin": {
                  "title": "Evidence origin",
                  "description": "Label distinguishing supplied, simulated, and HTTP-collected evidence; a label alone does not prove collection provenance.",
                  "type": "string",
                  "editor": "select",
                  "enum": [
                    "SUPPLIED_SNAPSHOT",
                    "SIMULATED_RESPONSE",
                    "HTTP_FETCHED"
                  ]
                },
                "sourceWebsite": {
                  "title": "Source website",
                  "description": "Business website associated with this snapshot for conservative attribution.",
                  "type": "string",
                  "editor": "textfield"
                },
                "leadKey": {
                  "title": "Lead key",
                  "description": "Optional supplied business identity used to attribute the snapshot to a review record.",
                  "type": "string",
                  "editor": "textfield"
                }
              },
              "required": [
                "url"
              ]
            },
            "default": []
          },
          "requestKey": {
            "title": "Fresh job request identity",
            "type": "string",
            "description": "Optional fresh job label (8–100 characters). Standalone mode defaults to this Apify run ID. Recovery applies to the same parent run/storage only; starting a new run creates a new budgeted job even if this label is reused."
          },
          "enableFreshDiscovery": {
            "title": "Allow one fresh Maps discovery run",
            "type": "boolean",
            "description": "fresh_leads only: explicitly allow one paid discovery source run. Also enable website collection and set the Console/API parent spending limit. A new parent run is a new purchase. Default false.",
            "default": false
          },
          "collectionReserveUsd": {
            "title": "Website collection cost reserve",
            "minimum": 0,
            "maximum": 54.99,
            "type": "number",
            "description": "Fresh mode: reserved allowance for website collection within the shared job cap, not actual cost or billing enforcement.",
            "default": 2
          },
          "exportReserveUsd": {
            "title": "Export and storage cost reserve",
            "minimum": 0,
            "maximum": 54.99,
            "type": "number",
            "description": "Fresh mode: reserved export/storage allowance within the shared job cap. Actual continuing platform/storage costs require reconciliation.",
            "default": 0.5
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}