{
  "openapi": "3.0.1",
  "info": {
    "title": "Home Services Lead Scraper (Google Maps)",
    "description": "Find home-services contractors (plumbers, roofers, electricians, HVAC, landscapers) on Google Maps (google.com/maps) — name, category, address, phone, website, emails, tech stack, and a 0–100 lead score. Built for contractor & SMMA outreach. Geo-accurate, pay per result.",
    "version": "0.1",
    "x-build-id": "CZS3Yoqrf1wzUH4tR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~home-services-lead-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-home-services-lead-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/blackfalcondata~home-services-lead-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-home-services-lead-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/blackfalcondata~home-services-lead-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-home-services-lead-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": {
          "searchTerms": {
            "title": "🔍 Search terms",
            "type": "array",
            "description": "What to search for, e.g. \"plumber\", \"roofer\", \"dentist\". Add several to scan multiple categories in one run.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "City, area, or region to search within, e.g. \"Austin, TX\" or \"Manchester, UK\"."
          },
          "searchRadiusKm": {
            "title": "📏 Search radius (km)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How far from the location centre to include results. Results outside the radius are dropped.",
            "default": 25
          },
          "searchRadiusMiles": {
            "title": "📏 Search radius (miles)",
            "minimum": 1,
            "maximum": 125,
            "type": "integer",
            "description": "Optional alternative to km. Used only when the km radius is left empty."
          },
          "maxResults": {
            "title": "💯 Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of businesses to return.",
            "default": 100
          },
          "gl": {
            "title": "🌍 Country",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "ie",
              "nz",
              "de",
              "fr",
              "es",
              "nl"
            ],
            "type": "string",
            "description": "Country to bias the search and geocoding toward.",
            "default": "us"
          },
          "hl": {
            "title": "🗣️ Language",
            "type": "string",
            "description": "Result language (2-letter code, e.g. \"en\").",
            "default": "en"
          },
          "minRating": {
            "title": "⭐ Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only keep businesses with at least this star rating (0–5). Leave empty for no minimum."
          },
          "minReviews": {
            "title": "🗳️ Minimum reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep businesses with at least this many reviews."
          },
          "category": {
            "title": "🏷️ Category contains",
            "type": "string",
            "description": "Keep only businesses whose Google category contains this text (case-insensitive)."
          },
          "requirePhone": {
            "title": "📞 Require a phone number",
            "type": "boolean",
            "description": "Keep only businesses that list a phone number (recommended for outreach).",
            "default": false
          },
          "telegramToken": {
            "title": "🔑 Telegram bot token",
            "type": "string",
            "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
          },
          "telegramChatId": {
            "title": "💬 Telegram chat ID",
            "type": "string",
            "description": "Telegram chat or channel ID. Required when a Telegram token is set."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL."
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp access token",
            "type": "string",
            "description": "WhatsApp Cloud API access token. The recipient must have messaged your business number within the last 24h."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp phone number ID",
            "type": "string",
            "description": "Your WhatsApp Business phone-number ID. Required when a WhatsApp token is set."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp recipient",
            "type": "string",
            "description": "Recipient phone in E.164 format without + (e.g. \"15125550100\")."
          },
          "webhookUrl": {
            "title": "🪝 Generic webhook URL",
            "type": "string",
            "description": "Receives a JSON POST with the run's leads after the run finishes (n8n / Make / Zapier / custom)."
          },
          "webhookHeaders": {
            "title": "📋 Webhook headers",
            "type": "object",
            "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify only new / updated",
            "type": "boolean",
            "description": "Only send notifications for businesses that are new or changed since the previous run.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}