{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Lead Generator",
    "description": "Find local business leads from Google Maps, filter for real SMEs with websites, and output NetPulse-ready records for outreach, audits, and AI workflows.",
    "version": "0.1",
    "x-build-id": "egGKxGfCPVTTF6wY3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/netdesignr~google-maps-lead-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-netdesignr-google-maps-lead-generator",
        "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/netdesignr~google-maps-lead-generator/runs": {
      "post": {
        "operationId": "runs-sync-netdesignr-google-maps-lead-generator",
        "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/netdesignr~google-maps-lead-generator/run-sync": {
      "post": {
        "operationId": "run-sync-netdesignr-google-maps-lead-generator",
        "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": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search Queries",
            "minItems": 1,
            "type": "array",
            "description": "List of Google Maps search queries. Each query should combine a business type with a location. Examples: 'dentists in Surrey', 'removals companies London', 'accountants Kingston upon Thames'.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max Results Per Query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of businesses to scrape per search query. Google Maps typically returns up to 120 results per search. Lower values run faster.",
            "default": 50
          },
          "countryFilter": {
            "title": "Country Filter",
            "enum": [
              "GB",
              "US",
              "AE",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "AU",
              "CA"
            ],
            "type": "string",
            "description": "Only return businesses in this country. Use ISO 3166-1 alpha-2 codes.",
            "default": "GB"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for Google Maps interface. Affects result ordering and localisation.",
            "default": "en"
          },
          "strictLocation": {
            "title": "Strict Location",
            "type": "string",
            "description": "Optional locality filter applied after scraping. Use this when you want results to stay anchored to a specific place like 'Chessington' or 'Kingston upon Thames' even if Google Maps drifts to nearby areas.",
            "default": ""
          },
          "locationRadiusKm": {
            "title": "Location Radius (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Optional radius around Strict Location. If provided, only businesses within this radius are kept when coordinates are available."
          },
          "minReviews": {
            "title": "Minimum Google Reviews",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Skip businesses with fewer reviews than this. Filters out inactive or very new businesses. Set to 0 to include all.",
            "default": 5
          },
          "minRating": {
            "title": "Minimum Google Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Skip businesses rated below this threshold. Set to 0 to include all.",
            "default": 0
          },
          "requireWebsite": {
            "title": "Require Website URL",
            "type": "boolean",
            "description": "Skip businesses that have no website listed on Google Maps. Essential for NetPulse pipeline. Only disable if you want phone-only leads.",
            "default": true
          },
          "skipChains": {
            "title": "Skip Known Chains/Franchises",
            "type": "boolean",
            "description": "Attempt to filter out large chain businesses (e.g. Specsavers, Costa, McDonald's). Uses a built-in chain detection list. Not 100% accurate but removes obvious non-SME results.",
            "default": true
          },
          "excludePlaceIds": {
            "title": "Exclude Place IDs",
            "type": "array",
            "description": "List of Google Place IDs to skip. Use this to avoid re-scraping businesses already in your lead database. Pass from your CRM or Airtable export.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "websitePreCheck": {
            "title": "Run Website Pre-Check",
            "type": "boolean",
            "description": "Perform a quick HTTP HEAD request on each business website before outputting. Captures: HTTP status, SSL present, response time, redirect target. Filters out dead sites, parked domains, and Facebook-only pages. Adds ~1 second per result but saves NetPulse scan capacity.",
            "default": true
          },
          "skipFacebookOnly": {
            "title": "Skip Facebook-Only Websites",
            "type": "boolean",
            "description": "If the listed website redirects to facebook.com, skip this business. These leads have no real website to diagnose.",
            "default": true
          },
          "skipParkedDomains": {
            "title": "Skip Parked/Placeholder Domains",
            "type": "boolean",
            "description": "If the website returns a known parking page or site builder placeholder, skip this business.",
            "default": true
          },
          "requestDelayMs": {
            "title": "Delay Between Requests (ms)",
            "minimum": 1000,
            "maximum": 10000,
            "type": "integer",
            "description": "Milliseconds to wait between Google Maps page loads. Higher values are safer but slower. Recommended: 2000-4000.",
            "default": 3000
          },
          "maxRetries": {
            "title": "Max Retries Per Query",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Number of times to retry a failed search query before skipping it.",
            "default": 2
          },
          "webhookUrl": {
            "title": "Webhook URL (on completion)",
            "type": "string",
            "description": "Optional webhook URL to call when the run completes. Use this to trigger your NetPulse batch scan automatically. The webhook receives the dataset ID and run metadata."
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "netpulse-ready",
              "raw",
              "csv-friendly"
            ],
            "type": "string",
            "description": "Choose how results are structured in the dataset.",
            "default": "netpulse-ready"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}