{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Email Extractor — AI Lead Qualifier & Enrichment",
    "description": "Turn Google Maps places or any website list into qualified B2B leads: verified emails (SMTP), decision makers, WhatsApp, French company registry (SIREN/NAF/BODACC), deterministic lead intelligence (grade, lifecycle, outreach verdict) + optional AI outreach drafts. HTTP-only — no residential proxy.",
    "version": "2.0",
    "x-build-id": "bKX7lWF8ZzpBNxNal"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dltik~google-maps-email-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dltik-google-maps-email-extractor",
        "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/dltik~google-maps-email-extractor/runs": {
      "post": {
        "operationId": "runs-sync-dltik-google-maps-email-extractor",
        "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/dltik~google-maps-email-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-dltik-google-maps-email-extractor",
        "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": {
          "mode": {
            "title": "Input mode",
            "enum": [
              "search",
              "websites",
              "datasetId"
            ],
            "type": "string",
            "description": "How to gather businesses: 'search' = HTTP Google Maps search from your queries (no browser); 'websites' = enrich a list of websites/domains you already have; 'datasetId' = enrich the output of a Google Maps scraper run (e.g. compass/crawler-google-places) — the most reliable at scale.",
            "default": "search"
          },
          "queries": {
            "title": "Search queries (mode = search)",
            "type": "array",
            "description": "Google Maps searches, keyword + location (e.g. 'dentist Lyon', 'plumber Paris 11'). Used only when mode = search.",
            "items": {
              "type": "string"
            }
          },
          "websites": {
            "title": "Websites / domains (mode = websites)",
            "type": "array",
            "description": "List of business websites or bare domains to enrich (e.g. 'acme.fr', 'https://example.com'). Used only when mode = websites.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Source dataset id (mode = datasetId)",
            "type": "string",
            "description": "The dataset id of a finished Google Maps scraper run (e.g. compass/crawler-google-places). We read its rows (title, address, phone, website, rating, coordinates) and add the full email + intelligence + registry layer on top. Best way to enrich thousands of places reliably."
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Max businesses per search query (mode = search) or max rows read from the source dataset (mode = datasetId).",
            "default": 20
          },
          "emailDepth": {
            "title": "Website crawl depth",
            "enum": [
              "shallow",
              "deep"
            ],
            "type": "string",
            "description": "shallow = homepage only (faster). deep = homepage + /contact, /about, /team, /impressum, /mentions-legales (finds ~30-50% more emails and the decision makers).",
            "default": "deep"
          },
          "findDecisionMakers": {
            "title": "Find decision makers",
            "type": "boolean",
            "description": "Discover named people (owner / director / manager) with their title, LinkedIn, and personal email from team/about pages. Deterministic, no LLM.",
            "default": true
          },
          "includeGuessedEmails": {
            "title": "Include guessed role emails",
            "type": "boolean",
            "description": "When no email is published, generate likely role addresses (info@, contact@) as a fallback. Marked email_quality = low.",
            "default": true
          },
          "verifyEmails": {
            "title": "Verify email deliverability (SMTP)",
            "type": "boolean",
            "description": "Check each primary email: MX record + SMTP mailbox probe + catch-all + disposable. Adds a 'verification' block with status valid/risky/invalid/catch_all/disposable. (SMTP may degrade to 'risky' if the network blocks port 25 — MX + disposable checks always run.)",
            "default": false
          },
          "checkWhatsApp": {
            "title": "Check WhatsApp availability",
            "type": "boolean",
            "description": "Check whether each phone number is registered on WhatsApp (adds has_whatsapp). Useful for WhatsApp Business outreach.",
            "default": false
          },
          "watchMode": {
            "title": "Watch mode (monitor changes across runs)",
            "type": "boolean",
            "description": "Track each lead across recurring runs and report what CHANGED since last time: new/lost email, decision maker joined/left, website redesign, new tech (Shopify/booking/ads), reviews momentum, and — for FR leads — a NEW BODACC insolvency event or a ceased status. Adds a 'watch' block per lead. State is kept in a named store (see watchlistName) that persists between runs. Schedule the actor to get a change feed.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist store name",
            "type": "string",
            "description": "Name of the persistent key-value store that remembers the previous run's snapshot (only used when watchMode is on). Use one distinct name per campaign so their histories don't mix.",
            "default": "lead-watchlist"
          },
          "onlyChanges": {
            "title": "Output only new/changed leads",
            "type": "boolean",
            "description": "When watchMode is on, push only the leads that are new or that changed since the last run (skip unchanged ones in the output). Billing still counts every lead enriched.",
            "default": false
          },
          "renderJs": {
            "title": "Render JavaScript for SPA sites (premium)",
            "type": "boolean",
            "description": "PREMIUM (paying Apify plans). For sites where the fast HTTP crawl finds no email (typically React/Next/Vue single-page apps), spin up a headless browser to render the page and re-extract emails + decision makers. Billed per site actually rendered (lead-rendered), only for no-email sites. Leave off for HTTP-only speed.",
            "default": false
          },
          "checkRegistry": {
            "title": "Cross-link to French company registry (moat)",
            "type": "boolean",
            "description": "For French businesses, match each lead to its official legal entity via the free gov API: SIREN/SIRET, legal name, NAF activity, employee bracket, incorporation date + age, active/ceased status. Matched by name + postcode + GPS proximity. Turns a lead list into a KYC-grade list. (Other countries: chain the dltik/*-companies-scraper actors.)",
            "default": false
          },
          "checkBodacc": {
            "title": "Add BODACC insolvency risk (FR)",
            "type": "boolean",
            "description": "For registry-matched French companies, look up the BODACC official gazette (free) and flag has_procedure_collective (bankruptcy/receivership/liquidation) + event count. Best for de-risking outreach. Requires checkRegistry.",
            "default": false
          },
          "analyzeLeads": {
            "title": "AI qualification & outreach draft (premium)",
            "type": "boolean",
            "description": "PREMIUM (paying Apify plans). Adds an 'ai' block per lead: a ready-to-send personalised outreach opener referencing concrete facts we found, plus — if you give a businessProfile — an ICP fit_score (0-100), fit_reason and recommended_action (contact/watch/skip). Billed per analyzed lead on top of the base event.",
            "default": false
          },
          "businessProfile": {
            "title": "Your ideal customer profile (ICP)",
            "type": "string",
            "description": "Describe who you sell to (product, target sector/size/geo). Used only when analyzeLeads is on, to score each lead's fit and tailor the outreach draft. Example: 'We sell online-booking software to independent French beauty salons.'"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for Google Maps search results and AI outreach drafts (ISO 639-1, e.g. 'en', 'fr').",
            "default": "en"
          },
          "proxyConfig": {
            "title": "Proxy (optional — datacenter is enough)",
            "type": "object",
            "description": "Optional. Unlike the old browser version, this actor is HTTP-only and does NOT require residential proxies. Datacenter proxy (included on all plans) is enough; only enable if your IP gets rate-limited.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}