{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Business Leads Extractor",
    "description": "Extract Google Maps businesses, enrich public contact data, remove duplicates, audit websites, and rank actionable leads for agencies and sales teams.",
    "version": "1.0",
    "x-build-id": "x6QPBeaK8GlYcrU7k"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kayhermes~google-maps-business-leads-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kayhermes-google-maps-business-leads-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/kayhermes~google-maps-business-leads-extractor/runs": {
      "post": {
        "operationId": "runs-sync-kayhermes-google-maps-business-leads-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/kayhermes~google-maps-business-leads-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-kayhermes-google-maps-business-leads-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",
        "required": [
          "runMode"
        ],
        "properties": {
          "runMode": {
            "title": "Run mode",
            "enum": [
              "demo",
              "live",
              "import"
            ],
            "type": "string",
            "description": "Demo uses offline fixtures and the complete production pipeline. Live searches Google Maps. Import processes supplied records and can enrich their websites.",
            "default": "demo"
          },
          "searchQueries": {
            "title": "Business types or search queries",
            "maxItems": 100,
            "type": "array",
            "description": "Each query is combined with every location. Examples: dentists, roofing contractors, bubble tea shops.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "locations": {
            "title": "Locations",
            "maxItems": 100,
            "type": "array",
            "description": "Cities, ZIP codes, counties, states, or countries. Leave empty when each query already includes a location.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Direct Google Maps place URLs",
            "maxItems": 5000,
            "type": "array",
            "description": "Optional place URLs. These can be used alone or together with live searches.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "importedBusinesses": {
            "title": "Imported business records",
            "maxItems": 50000,
            "type": "array",
            "description": "Used in Import mode. Accepts common fields such as name, category, address, phone, website, rating, reviewCount, latitude, longitude, placeId, and googleMapsUrl.",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "default": []
          },
          "maxResultsPerSearch": {
            "title": "Maximum results per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum place URLs collected for each query/location combination.",
            "default": 25
          },
          "maxTotalResults": {
            "title": "Maximum unique businesses",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap after normalization, filtering, and deduplication.",
            "default": 500
          },
          "languageCode": {
            "title": "Google Maps language",
            "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z]{2})?$",
            "type": "string",
            "description": "Language code such as en, es, de, or en-US. English is the best-tested locale.",
            "default": "en"
          },
          "countryCode": {
            "title": "Country code",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code used for Maps localization and phone normalization.",
            "default": "US"
          },
          "includeClosedBusinesses": {
            "title": "Include closed businesses",
            "type": "boolean",
            "description": "Include temporarily or permanently closed listings.",
            "default": false
          },
          "minimumRating": {
            "title": "Minimum Google rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Records with no rating are treated as zero for this filter.",
            "default": 0
          },
          "minimumReviewCount": {
            "title": "Minimum review count",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Records with no review count are treated as zero.",
            "default": 0
          },
          "requirePhone": {
            "title": "Require a phone number",
            "type": "boolean",
            "description": "Remove businesses without a normalized phone number.",
            "default": false
          },
          "requireWebsite": {
            "title": "Require a website",
            "type": "boolean",
            "description": "Keep this off when finding web-design prospects with no website.",
            "default": false
          },
          "requireEmail": {
            "title": "Require a public email",
            "type": "boolean",
            "description": "Requires website enrichment and removes businesses where no public email is found.",
            "default": false
          },
          "includeWebsiteEnrichment": {
            "title": "Enrich business websites",
            "type": "boolean",
            "description": "Visits each unique domain to extract public emails, phone links, social profiles, SEO signals, technologies, booking, ordering, and conversion signals.",
            "default": true
          },
          "maxWebsitePages": {
            "title": "Maximum pages per website",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Includes the homepage and highest-priority contact, booking, or about pages.",
            "default": 3
          },
          "extractEmails": {
            "title": "Extract public email addresses",
            "type": "boolean",
            "description": "Extracts emails displayed on the scanned website pages.",
            "default": true
          },
          "extractSocialProfiles": {
            "title": "Extract social profiles",
            "type": "boolean",
            "description": "Extracts public Facebook, Instagram, LinkedIn, X, YouTube, TikTok, and Pinterest links.",
            "default": true
          },
          "scoringProfile": {
            "title": "Lead scoring profile",
            "enum": [
              "general",
              "localSeo",
              "webDesign",
              "reputation"
            ],
            "type": "string",
            "description": "Changes how opportunity signals are weighted without hiding the underlying evidence.",
            "default": "general"
          },
          "minimumLeadScore": {
            "title": "Minimum final lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only output leads at or above this 0–100 score.",
            "default": 0
          },
          "onlyNewResults": {
            "title": "Output only unseen businesses",
            "type": "boolean",
            "description": "Uses a named key-value store so scheduled runs can deliver fresh leads only.",
            "default": false
          },
          "historyStoreName": {
            "title": "Persistent history store",
            "pattern": "^[A-Za-z0-9._-]{1,63}$",
            "type": "string",
            "description": "Reuse the same name across scheduled runs.",
            "default": "google-maps-business-leads-history"
          },
          "emitErrorItems": {
            "title": "Write transparent error records",
            "type": "boolean",
            "description": "Writes structured non-secret error records for failed sources while valid sources continue.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Maximum browser concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Higher values are faster but consume more memory and can increase blocking.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Crawlee retries failed browser requests with session rotation and backoff.",
            "default": 3
          },
          "maxRequestsPerMinute": {
            "title": "Maximum requests per minute",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Global upper bound for browser requests in each crawl stage. Use a lower value for conservative traffic.",
            "default": 120
          },
          "sameDomainDelaySecs": {
            "title": "Delay between requests to the same domain",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Minimum delay Crawlee applies between requests to one domain.",
            "default": 0.5
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time for a page navigation.",
            "default": 45
          },
          "requestHandlerTimeoutSecs": {
            "title": "Request handler timeout",
            "minimum": 30,
            "maximum": 600,
            "type": "integer",
            "description": "Maximum total processing time for one request.",
            "default": 120
          },
          "maxSearchScrolls": {
            "title": "Maximum result-feed scrolls",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Stops earlier after five scroll rounds with no new places.",
            "default": 40
          },
          "searchScrollWaitMs": {
            "title": "Wait between result scrolls",
            "minimum": 100,
            "maximum": 10000,
            "type": "integer",
            "description": "Allows dynamically loaded place cards to appear.",
            "default": 900
          },
          "blockHeavyResources": {
            "title": "Block images, fonts, and media",
            "type": "boolean",
            "description": "Reduces browser bandwidth and memory. Disable only when diagnosing a site that depends on those resources.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is strongly recommended for live Google Maps discovery.",
            "default": {
              "useApifyProxy": true
            }
          },
          "useProxyForWebsites": {
            "title": "Use the same proxy for business websites",
            "type": "boolean",
            "description": "Usually unnecessary and increases cost. Enable for websites that block datacenter traffic.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}