{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Scraper: B2B Leads & Emails",
    "description": "The Ultimate G-Maps Lead Machine is designed for marketing agencies, sales teams, and wholesalers who need fresh, accurate business data without paying for expensive lists.\n\nStop searching manually. Start mining leads automatically today.",
    "version": "4.0",
    "x-build-id": "UhK4KrR9vTaBbSbyl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aluminum_jam~local-business-lead-miner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aluminum_jam-local-business-lead-miner",
        "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/aluminum_jam~local-business-lead-miner/runs": {
      "post": {
        "operationId": "runs-sync-aluminum_jam-local-business-lead-miner",
        "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/aluminum_jam~local-business-lead-miner/run-sync": {
      "post": {
        "operationId": "run-sync-aluminum_jam-local-business-lead-miner",
        "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": {
          "searchTerms": {
            "title": "Search Terms",
            "type": "array",
            "description": "Array of search queries (e.g., 'Plumbers in New York', 'Dentists in London'). Optional if you provide Start URLs or Place IDs instead.",
            "items": {
              "type": "string"
            },
            "default": [
              "Coffee shops in New York"
            ]
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct Google Maps place URLs to scrape instead of (or alongside) Search Terms — e.g. a URL copied from your browser like '.../maps/place/Some+Business/@40.7,-74.0,17z/...'. The business name in the URL's path is used to look it up; a bare '?q=place_id:...' URL with no name in the path cannot be resolved and will be skipped with a warning.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "placeIds": {
            "title": "Place IDs (not supported)",
            "type": "array",
            "description": "Not supported in this version — a bare Place ID cannot be resolved without a business name or browser session. Any value here is skipped with a warning. Use Start URLs (with the full place URL) or Search Terms instead.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItems": {
            "title": "Maximum Items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of business results to scrape per search term",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy configuration (mandatory for anti-blocking). Leave the group selection on \"Automatic\" unless your plan includes a premium group like RESIDENTIAL — the Actor falls back automatically if the selected group isn't available.",
            "default": {
              "useApifyProxy": true
            }
          },
          "includeWebsite": {
            "title": "Include Website URL",
            "type": "boolean",
            "description": "Include the business website URL in the output",
            "default": false
          },
          "includePhone": {
            "title": "Include Phone Number",
            "type": "boolean",
            "description": "Include the business phone number in the output",
            "default": false
          },
          "includeEmail": {
            "title": "Include Email",
            "type": "boolean",
            "description": "Extract email addresses from business detail pages when available",
            "default": true
          },
          "maxEmailPagesFromWebsite": {
            "title": "Max Website Pages For Email",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "When email is not found on Google Maps, scan up to this many pages on the business website (home/contact/about paths + relevant internal links). Higher values improve coverage but increase runtime.",
            "default": 10
          },
          "onlyBusinessesWithEmail": {
            "title": "Only Save Businesses With Email",
            "type": "boolean",
            "description": "If enabled, records without a valid email are skipped so every exported row has an email",
            "default": false
          },
          "includeOpeningHours": {
            "title": "Include Opening Hours",
            "type": "boolean",
            "description": "Include the weekly opening hours schedule in the output",
            "default": true
          },
          "includeSocialLinks": {
            "title": "Include Social Links",
            "type": "boolean",
            "description": "Scan the business website for social profile links (Facebook, Instagram, LinkedIn, X/Twitter, YouTube, TikTok) — reuses the same website scan as email extraction, so it adds no extra requests when email is also enabled.",
            "default": true
          },
          "skipClosedPlaces": {
            "title": "Skip Closed Places",
            "type": "boolean",
            "description": "If enabled, businesses marked as permanently or temporarily closed on Google Maps are not saved. Businesses whose status couldn't be determined are kept (fails open).",
            "default": false
          },
          "categoryFilterWords": {
            "title": "Category Filter Words",
            "type": "array",
            "description": "Only save businesses whose category contains at least one of these words (case-insensitive, e.g. 'restaurant' won't match 'nail salon'). Leave empty to keep every category.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "locationQuery": {
            "title": "Location (for wide-area search)",
            "type": "string",
            "description": "A city/region to search across (e.g. 'Austin, TX, USA'), used as the search center for every search term. Only needed if your search terms don't already include a location (e.g. plain 'dentists' rather than 'dentists in Austin, TX') — leave empty otherwise. Setting Grid Size above 1 splits this location into multiple tiles for exhaustive wide-area coverage."
          },
          "gridSize": {
            "title": "Grid Size (for wide-area search)",
            "minimum": 1,
            "maximum": 7,
            "type": "integer",
            "description": "Only used when Location is set. 1 (default) searches the whole location in one go — a single request already returns up to ~200 results per search term. Raise above 1 only for exhaustive wide-area coverage beyond that (e.g. 'all dentists in Texas'), splitting the location into an N×N grid of tiles. Higher values increase runtime and request volume.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}