{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Leads Scraper UK — Emails & Directors",
    "description": "Scrape UK business leads from Google Maps with emails, phone numbers and Companies House director names. Find new businesses, unclaimed listings and businesses without a website; each lead gets a HOT/WARM/COLD score and a ready-to-send outreach email. Input: UK city or postcode + business type.",
    "version": "1.0",
    "x-build-id": "ZCDTlJ9LhOHcqbNvn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automationnation~uk-business-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automationnation-uk-business-leads",
        "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/automationnation~uk-business-leads/runs": {
      "post": {
        "operationId": "runs-sync-automationnation-uk-business-leads",
        "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/automationnation~uk-business-leads/run-sync": {
      "post": {
        "operationId": "run-sync-automationnation-uk-business-leads",
        "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": [
          "cities",
          "category"
        ],
        "properties": {
          "cities": {
            "title": "UK cities or towns",
            "type": "array",
            "description": "UK cities, towns or regions to search, e.g. [\"Manchester\", \"Leeds\"]. Each city is searched separately. Ignored when Postcodes are set.",
            "default": [
              "London"
            ],
            "items": {
              "type": "string"
            }
          },
          "postcodes": {
            "title": "UK postcodes (precise targeting)",
            "type": "array",
            "description": "Optional. UK postcodes or postcode districts to search around, e.g. [\"M1 1AA\", \"SW1A\"]. When set, these replace Cities and use Search radius.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "radiusMiles": {
            "title": "Search radius around each postcode (miles)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Only used with Postcodes. 1–5 for a neighbourhood, 10–20 for a whole town.",
            "default": 5
          },
          "category": {
            "title": "Business type",
            "enum": [
              "all",
              "restaurant",
              "gym",
              "hair salon",
              "beauty salon",
              "retail shop",
              "cafe",
              "bar",
              "trades"
            ],
            "type": "string",
            "description": "Preset business type to search for. 'All Categories' searches every preset. Ignored when Custom search terms are set.",
            "default": "restaurant"
          },
          "customSearchTerms": {
            "title": "Custom search terms (any business type)",
            "type": "array",
            "description": "Optional. Search any business type instead of the presets, exactly as you would type it into Google Maps, e.g. [\"accountant\", \"dentist\", \"wedding venue\"]. Overrides Business type.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum leads",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of businesses (leads) to return across all cities and search terms. Each saved lead is one billable result. Start small (5–20) to test your filters.",
            "default": 50
          },
          "dateRangeDays": {
            "title": "Only recently opened: first review within (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Optional. Set 30, 60 or 90 to keep only businesses whose opening date (Google's \"Opened…\" label, or the newest review on listings with fewer than 15 reviews) is within that many days. Businesses with no detectable opening date are kept. 0 = no date filter.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum Google reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Skip businesses with fewer reviews than this. 0 includes brand-new listings.",
            "default": 0
          },
          "maxReviews": {
            "title": "Maximum Google reviews (new-business filter)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip businesses with more reviews than this, e.g. 30 to target new businesses still building their reputation. 0 = no limit.",
            "default": 0
          },
          "requireWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Keep only businesses that list a website on Google Maps.",
            "default": false
          },
          "noWebsiteOnly": {
            "title": "Only businesses without a website",
            "type": "boolean",
            "description": "Keep only businesses with no website on Google Maps (a social-media page doesn't count as a website). Leads for web-design and digital agencies; the outreach copy pitches a website. Ignored if \"Only businesses with a website\" is also on.",
            "default": false
          },
          "requireUnclaimed": {
            "title": "Only unclaimed Google listings",
            "type": "boolean",
            "description": "Keep only businesses that haven't claimed their Google Business Profile — often the easiest outreach targets.",
            "default": false
          },
          "scrapeEmails": {
            "title": "Find emails on business websites",
            "type": "boolean",
            "description": "Visit each business website (homepage plus /contact, /contact-us and /about) and extract the best email address. Adds a few seconds per lead.",
            "default": true
          },
          "companiesHouseApiKey": {
            "title": "Companies House API key (optional)",
            "type": "string",
            "description": "Optional — a built-in key is used when blank. Add your own free key from developer.companieshouse.gov.uk for very large runs."
          },
          "hunterApiKey": {
            "title": "Hunter.io API key (optional)",
            "type": "string",
            "description": "Optional. Used only when no email is found on the website, to look one up on Hunter.io. Free keys at hunter.io."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key (optional)",
            "type": "string",
            "description": "Optional — Claude is built in. Add your own key from console.anthropic.com only if you want dedicated capacity for very large runs."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key (optional)",
            "type": "string",
            "description": "Optional — used as the AI fallback. Add your own key from aistudio.google.com only for very large runs."
          },
          "yourName": {
            "title": "Your name",
            "type": "string",
            "description": "Signs the outreach email, LinkedIn and SMS drafts, e.g. \"Sam\".",
            "default": ""
          },
          "yourBusiness": {
            "title": "Your business name",
            "type": "string",
            "description": "Your company name, e.g. \"Northern Web Studio\".",
            "default": ""
          },
          "yourService": {
            "title": "What you offer",
            "type": "string",
            "description": "One line on what you sell, e.g. \"websites and local SEO for new restaurants\". The AI ties each message to this.",
            "default": ""
          },
          "yourEmail": {
            "title": "Your email",
            "type": "string",
            "description": "Contact email to include in the drafts.",
            "default": ""
          },
          "yourPhone": {
            "title": "Your phone",
            "type": "string",
            "description": "Phone number to include in the SMS draft.",
            "default": ""
          },
          "incrementalMode": {
            "title": "Only new businesses (incremental mode)",
            "type": "boolean",
            "description": "Skip businesses returned by your earlier runs, so a weekly schedule only delivers new leads. History is kept per History name and forgets places after 180 days.",
            "default": false
          },
          "incrementalStateKey": {
            "title": "History name (incremental mode)",
            "type": "string",
            "description": "Optional label for the run history used by incremental mode, e.g. \"manchester-gyms\". Use a different label for each schedule so they don't share history. Blank = \"default\".",
            "default": ""
          },
          "competitors": {
            "title": "Competitors to monitor",
            "type": "array",
            "description": "Optional. Google Maps listings to check for rating changes, new reviews and new negative reviews since the last run. Each entry: { \"name\": \"Joe's Bistro\", \"mapsUrl\": \"https://maps.google.com/...\" }. Up to 50.",
            "default": []
          },
          "deliverEmail": {
            "title": "Email the results as CSV",
            "type": "boolean",
            "description": "Send the leads as a CSV attachment after each run, using the SMTP settings below.",
            "default": false
          },
          "smtpHost": {
            "title": "SMTP host",
            "type": "string",
            "description": "SMTP server hostname, e.g. smtp.gmail.com.",
            "default": ""
          },
          "smtpPort": {
            "title": "SMTP port",
            "type": "integer",
            "description": "Usually 587 (STARTTLS) or 465 (SSL).",
            "default": 587
          },
          "smtpUser": {
            "title": "SMTP username",
            "type": "string",
            "description": "SMTP login username."
          },
          "smtpPass": {
            "title": "SMTP password",
            "type": "string",
            "description": "SMTP login password or app password."
          },
          "toEmail": {
            "title": "Send CSV to",
            "type": "string",
            "description": "Recipient email address for the CSV.",
            "default": ""
          },
          "fromEmail": {
            "title": "From email",
            "type": "string",
            "description": "Sender address (defaults to the SMTP username).",
            "default": ""
          },
          "deliverSheets": {
            "title": "Append to Google Sheets",
            "type": "boolean",
            "description": "Append the leads to a Google Sheet after each run, using a service account.",
            "default": false
          },
          "serviceAccountJson": {
            "title": "Google service account JSON",
            "type": "string",
            "description": "Full service account credentials JSON from Google Cloud Console. Share the sheet with the service account's email."
          },
          "spreadsheetId": {
            "title": "Google Spreadsheet ID",
            "type": "string",
            "description": "The ID from the sheet URL: /spreadsheets/d/{ID}/edit",
            "default": ""
          },
          "sheetName": {
            "title": "Sheet tab name",
            "type": "string",
            "description": "Tab to append to.",
            "default": "Leads"
          },
          "deliverWebhook": {
            "title": "Send to a webhook (Zapier, Make, n8n, CRM)",
            "type": "boolean",
            "description": "POST the leads to the webhook URL below. Setting a Webhook URL also turns this on.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Zapier catch hook, Make or n8n webhook, or any HTTPS endpoint.",
            "default": ""
          },
          "webhookFormat": {
            "title": "Webhook payload format",
            "enum": [
              "json",
              "csv"
            ],
            "type": "string",
            "description": "JSON objects or CSV rows.",
            "default": "json"
          },
          "webhookPerRecord": {
            "title": "One request per lead",
            "type": "boolean",
            "description": "Send one POST per lead instead of one combined payload. Needed for Zapier catch hooks and most CRMs.",
            "default": false
          },
          "deliverHubSpot": {
            "title": "Create HubSpot contacts",
            "type": "boolean",
            "description": "Create a HubSpot contact for each lead that has an email or phone. Needs a private app token with contacts write scope.",
            "default": false
          },
          "hubspotToken": {
            "title": "HubSpot private app token",
            "type": "string",
            "description": "HubSpot → Settings → Integrations → Private Apps."
          },
          "deliverSlack": {
            "title": "Post a summary to Slack",
            "type": "boolean",
            "description": "Post the top leads and any competitor alerts to a Slack channel.",
            "default": false
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook URL",
            "type": "string",
            "description": "Create one at api.slack.com/messaging/webhooks."
          },
          "slackChannel": {
            "title": "Slack channel (optional)",
            "type": "string",
            "description": "Override the channel, e.g. #leads. Blank = the webhook's default.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used to load Google Maps. Automatic (default) starts with Apify datacenter IPs and switches to UK residential IPs only if Google starts blocking — the most reliable and cheapest setup. Pick the Residential group to always use UK residential IPs.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}