{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Business Lead Finder",
    "description": "Discover, extract, and enrich local business leads from Google Maps. Find businesses by keyword and location, collect contact details, emails, and social profiles, and export clean, deduplicated data. Built for automation, CRMs, and recurring lead generation workflows.",
    "version": "2.0",
    "x-build-id": "Ui42yo0LoMnNCE9Au"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solutionssmart~local-business-lead-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solutionssmart-local-business-lead-finder",
        "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/solutionssmart~local-business-lead-finder/runs": {
      "post": {
        "operationId": "runs-sync-solutionssmart-local-business-lead-finder",
        "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/solutionssmart~local-business-lead-finder/run-sync": {
      "post": {
        "operationId": "run-sync-solutionssmart-local-business-lead-finder",
        "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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "🔎 Search Queries",
            "type": "array",
            "description": "List of business types to find (e.g. ['dentist', 'pizza']).",
            "default": [
              "dentist"
            ],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "📍 Locations (Text)",
            "type": "array",
            "description": "List of locations to search in (e.g. ['Berlin', 'Hamburg']).",
            "default": [
              "Berlin, Germany"
            ],
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "🗺️ Location (Lat/Lng)",
            "type": "object",
            "description": "Search by coordinates and radius instead of text location.",
            "properties": {
              "lat": {
                "title": "🧭 Latitude",
                "type": "number",
                "description": "Latitude coordinate",
                "editor": "number"
              },
              "lng": {
                "title": "🧭 Longitude",
                "type": "number",
                "description": "Longitude coordinate",
                "editor": "number"
              },
              "radiusKm": {
                "title": "📏 Radius (km)",
                "type": "number",
                "default": 5,
                "description": "Search radius in kilometers. Applied only together with latitude and longitude. Text city searches (e.g. Köln) use the city boundary, not this default.",
                "editor": "number"
              }
            }
          },
          "maxResultsTotal": {
            "title": "📦 Max Results Total",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of unique leads to output for the whole run.",
            "default": 10
          },
          "language": {
            "title": "🌐 Language",
            "enum": [
              "en",
              "en-gb",
              "en-au",
              "de",
              "fr",
              "es",
              "it",
              "pt",
              "pt-br",
              "nl",
              "pl",
              "ru",
              "ja",
              "zh-cn",
              "zh-tw",
              "ko",
              "ar",
              "hi",
              "tr",
              "sv",
              "da",
              "no",
              "fi",
              "el",
              "cs",
              "hu",
              "ro",
              "bg",
              "th",
              "vi",
              "id",
              "ms"
            ],
            "type": "string",
            "description": "Language for Google Maps interface.",
            "default": "en"
          },
          "includeClosed": {
            "title": "🏪 Include Closed Businesses",
            "type": "boolean",
            "description": "If true, includes businesses marked as permanently closed.",
            "default": false
          },
          "mode": {
            "title": "⚙️ Mode",
            "enum": [
              "fast",
              "deep"
            ],
            "type": "string",
            "description": "Fast mode extracts leads only. Deep mode enables website enrichment within the configured limits.",
            "default": "fast"
          },
          "enrichWebsite": {
            "title": "✨ Enrich With Website Data",
            "type": "boolean",
            "description": "Visit business websites to extract emails, extra phone numbers, a missing street address, contact forms, and social links. Used only in deep mode. Does not overwrite a non-empty Maps/list-card address.",
            "default": false
          },
          "emailScanDepth": {
            "title": "📬 Email Scan Depth",
            "type": "integer",
            "description": "Number of internal pages to scan for emails (e.g. /contact).",
            "default": 1
          },
          "maxWebsitesToEnrich": {
            "title": "🌐 Max Websites To Enrich",
            "type": "integer",
            "description": "Maximum number of unique websites to visit in deep mode.",
            "default": 25
          },
          "maxRunTimeSec": {
            "title": "⏱️ Max Run Time (sec)",
            "minimum": 30,
            "type": "integer",
            "description": "Gracefully stop the run when this runtime budget is reached.",
            "default": 120
          },
          "searchAreaCoverage": {
            "title": "🗺️ Search Area Coverage",
            "enum": [
              "singleView",
              "cityTiles"
            ],
            "type": "string",
            "description": "Single view keeps the usual one map search per query and location. City tiles split a city into several nearby map views so you can find more businesses than one list shows. City tiles takes longer and costs more — use it with a longer Max Run Time, for example the Max coverage recipe. Short searches stay on a single view even if you pick City tiles.",
            "default": "singleView"
          },
          "emailMxCheck": {
            "title": "🛡️ Verify Email Domains (MX)",
            "type": "boolean",
            "description": "If true, checks MX records for extracted email domains to improve email-quality confidence. Slower and adds DNS requests.",
            "default": false
          },
          "emailDomainPolicy": {
            "title": "📧 Email Domain Policy",
            "enum": [
              "ownDomainOnly",
              "preferOwn"
            ],
            "type": "string",
            "description": "Which website emails to keep. Own domain only is the current behavior. Prefer own domain also keeps a flagged parent-organization address found on the site when no matching-domain email exists. A role address such as info@ is not treated as invalid.",
            "default": "ownDomainOnly"
          },
          "dedupeBy": {
            "title": "🧹 Deduplication Strategy",
            "enum": [
              "placeId",
              "website",
              "phone"
            ],
            "type": "string",
            "description": "Field to use for deduplication.",
            "default": "placeId"
          },
          "newOnlyOutput": {
            "title": "🆕 Output Only New Items",
            "type": "boolean",
            "description": "If true, outputs only new items not seen in previous runs. If false, outputs unique items from this run and marks them with isNew.",
            "default": true
          },
          "webhookUrl": {
            "title": "🪝 Webhook URL",
            "type": "string",
            "description": "URL to POST results to. Stored encrypted when saved (may contain auth tokens)."
          },
          "googleSheetsSpreadsheetId": {
            "title": "📊 Google Sheets Spreadsheet ID",
            "type": "string",
            "description": "Optional: spreadsheet ID or URL to export leads to via solutionssmart/google-sheets-integration. Leave empty to skip. The sheet must be shared with your Sheets service account."
          },
          "googleSheetsSheetName": {
            "title": "📄 Sheet Name",
            "type": "string",
            "description": "Worksheet tab name for the Google Sheets export.",
            "default": "Leads"
          },
          "googleSheetsOperation": {
            "title": "📊 Sheets Operation",
            "enum": [
              "APPEND",
              "REPLACE",
              "UPSERT"
            ],
            "type": "string",
            "description": "How to write leads to the sheet: APPEND adds rows, REPLACE rewrites the tab, UPSERT updates matching rows by key.",
            "default": "APPEND"
          },
          "googleSheetsUpsertKey": {
            "title": "🔑 Sheets Upsert Key",
            "type": "string",
            "description": "Field used to match existing rows when operation is UPSERT.",
            "default": "placeId"
          },
          "batchSize": {
            "title": "📬 Batch Size",
            "type": "integer",
            "description": "Number of items to batch before calling webhook.",
            "default": 50
          },
          "resourceProfile": {
            "title": "⚙️ Resource Profile (memory)",
            "enum": [
              "auto",
              "low",
              "standard",
              "high"
            ],
            "type": "string",
            "description": "Preset for concurrency based on the memory you allocate when starting the run.",
            "default": "auto"
          },
          "detailConcurrency": {
            "title": "🚄 Detail Concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Place detail pages fetched in parallel. If not set, uses the value from Resource profile."
          },
          "enrichmentConcurrency": {
            "title": "⚡ Enrichment Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Website pages fetched in parallel during enrichment. If not set, uses the value from Resource profile."
          },
          "debug": {
            "title": "🐞 Debug Mode",
            "type": "boolean",
            "description": "Enable verbose logging (includes URLs and business details in logs; use only when needed).",
            "default": false
          },
          "proxyMode": {
            "title": "Proxy Mode",
            "enum": [
              "none",
              "unblocker"
            ],
            "type": "string",
            "description": "Recommended default for reliable runs. Direct turns proxying off. Using a proxy adds Apify platform costs.",
            "default": "unblocker"
          },
          "proxyCountryCode": {
            "title": "Proxy Country Code",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Optional two-letter country code, for example DE or US. Leave empty to let Apify choose."
          },
          "typesafeApiKey": {
            "title": "TypeSafe API Key",
            "type": "string",
            "description": "Optional. Enables smarter place and contact decisions. Leave empty to use the built-in rules. If this field is empty, the Actor also reads the TYPESAFE_API_KEY environment variable."
          },
          "judgeShardCount": {
            "title": "Work Split Count",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Number of parallel runs sharing the same search. Set Work Split Index on each run so each city tile and each listing is handled in only one run. Leave empty to fetch every tile and judge every listing in this run."
          },
          "judgeShardIndex": {
            "title": "Work Split Index",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. This run's slot from 0 up to Work Split Count minus one. Use together with Work Split Count. Leave empty to fetch every tile and judge every listing in this run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}