{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Ai Lead Generator",
    "description": "Extract verified emails from Google Maps businesses. 70% email success rate, AI lead scoring A+ to F, phone numbers & addresses. Export to CSV/Excel.",
    "version": "2.1",
    "x-build-id": "GnbqWbExRM9fIVNG3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/darkzogx~google-maps-ai-lead-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-darkzogx-google-maps-ai-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/darkzogx~google-maps-ai-lead-generator/runs": {
      "post": {
        "operationId": "runs-sync-darkzogx-google-maps-ai-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/darkzogx~google-maps-ai-lead-generator/run-sync": {
      "post": {
        "operationId": "run-sync-darkzogx-google-maps-ai-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": [
          "searchQuery",
          "location"
        ],
        "properties": {
          "scrapingMode": {
            "title": "Scraping Mode",
            "enum": [
              "basic",
              "enriched"
            ],
            "type": "string",
            "description": "Choose scraping speed vs data richness. Basic is 10x faster but only includes basic info (name, rating, reviews, Google Maps URL). Enriched includes website, phone, email, and AI scoring.",
            "default": "enriched"
          },
          "performancePreset": {
            "title": "Performance Preset",
            "enum": [
              "balanced",
              "fast",
              "turbo"
            ],
            "type": "string",
            "description": "Choose based on your Apify plan's available memory. Higher presets = faster scraping but require more RAM. Turbo mode requires 32GB+ RAM.",
            "default": "balanced"
          },
          "searchQuery": {
            "title": "Search term(s)",
            "type": "string",
            "description": "Business category or type to search (e.g., 'software companies', 'restaurants', 'marketing agencies')",
            "default": "software companies"
          },
          "location": {
            "title": "Location (use only one location per run)",
            "type": "string",
            "description": "City, state, or region to search in",
            "default": "San Francisco, CA"
          },
          "maxResults": {
            "title": "Number of places to extract (per each search term or URL)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of businesses to scrape. ⏱️ Set timeout below: 100 leads = 3600 | 500 leads = 14400 | 1000 leads = 28800",
            "default": 50
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "ja",
              "zh",
              "ru",
              "ar"
            ],
            "type": "string",
            "description": "Language for Google Maps results (e.g., 'en' for English, 'es' for Spanish)",
            "default": "en"
          },
          "minRating": {
            "title": "Minimum star rating (0-5)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only scrape businesses with rating >= this value. Set to 0 for no filter.",
            "default": 4
          },
          "minReviews": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out businesses with too few reviews (indicates low activity). Set to 0 for no filter.",
            "default": 10
          },
          "hasWebsite": {
            "title": "Scrape places with/without a website",
            "type": "boolean",
            "description": "Only include businesses with websites (required for email extraction)",
            "default": true
          },
          "skipClosedPlaces": {
            "title": "Skip closed places",
            "type": "boolean",
            "description": "Filter out permanently closed businesses",
            "default": true
          },
          "claimedListing": {
            "title": "Only claimed/verified listings",
            "type": "boolean",
            "description": "Only active businesses that claimed their Google listing",
            "default": false
          },
          "hasSocialMedia": {
            "title": "Must have social media profiles",
            "type": "boolean",
            "description": "Only include businesses with LinkedIn/Facebook/Twitter profiles",
            "default": false
          },
          "extractEmails": {
            "title": "Extract emails from websites",
            "type": "boolean",
            "description": "Visit websites and extract contact emails (adds ~$0.01 per lead). Requires 'Scrape places with website' enabled.",
            "default": true
          },
          "extractReviews": {
            "title": "Extract customer reviews",
            "type": "boolean",
            "description": "Extract customer reviews for sentiment analysis (adds ~$0.02 per lead and 30s processing time). Disable for faster runs.",
            "default": false
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per place",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Number of reviews to extract per business (0 = disabled, max 100)",
            "default": 10
          },
          "enableScoring": {
            "title": "Enable AI Lead Scoring (A+ to F)",
            "type": "boolean",
            "description": "Score leads based on data quality, engagement signals, and ICP fit. Scores: A+ (85+), A (75+), B (65+), C (55+), D (45+), F (<45)",
            "default": true
          },
          "targetIndustries": {
            "title": "Target industries for scoring (optional)",
            "type": "array",
            "description": "Industries to prioritize in lead scoring (e.g., 'technology', 'healthcare', 'professional_services'). Leave empty to score all equally.",
            "default": [
              "technology",
              "professional_services"
            ],
            "items": {
              "type": "string"
            }
          },
          "timeoutSeconds": {
            "title": "⏱️ Timeout (Seconds) | RECOMMENDATIONS: 100 leads = 3600 | 500 leads = 14400 | 1000 leads = 28800",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "Enter timeout in seconds based on number of leads above.",
            "default": 7200
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "pattern": "^https?://.*",
            "type": "string",
            "description": "POST results to this URL when actor finishes (for Zapier, Make.com, n8n, etc)"
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for scraping. Leave groups empty for automatic proxy selection (recommended).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          },
          "maxConcurrency": {
            "title": "Max Concurrency (Advanced)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum concurrent browser instances. Default is 3 for optimal performance. Higher values may cause CPU overload and timeouts.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}