{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Email Extractor",
    "description": "Scrapes Google Maps places and optionally enriches each business with website contact emails and social links.",
    "version": "0.1",
    "x-build-id": "V8ly6eepXg39zVDAW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kmiloaguilar~google-maps-email-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kmiloaguilar-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/kmiloaguilar~google-maps-email-extractor/runs": {
      "post": {
        "operationId": "runs-sync-kmiloaguilar-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/kmiloaguilar~google-maps-email-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-kmiloaguilar-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Google Maps search terms, for example dentists, restaurants, or HVAC contractors.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, region, postal code, or country appended to each search term.",
            "default": "Orleans, ON"
          },
          "startUrls": {
            "title": "Google Maps URLs",
            "type": "array",
            "description": "Google Maps search or place URLs to scrape instead of, or in addition to, search terms.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Maximum places",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum unique place records to save.",
            "default": 100
          },
          "maxResultsPerSearch": {
            "title": "Maximum places per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum place URLs to process from each Google Maps search page.",
            "default": 100
          },
          "contactExtraction": {
            "title": "Contact extraction",
            "enum": [
              "none",
              "basic",
              "emails"
            ],
            "type": "string",
            "description": "Choose Maps-only output, basic website/social enrichment, or email extraction.",
            "default": "emails"
          },
          "emailVerification": {
            "title": "Email verification",
            "enum": [
              "none",
              "syntax",
              "mx",
              "dns"
            ],
            "type": "string",
            "description": "Verification mode for the primary email. \"mx\" (recommended) does a real MX lookup - it confirms the domain has a mail server configured, which is stronger evidence than syntax alone, though still not proof a specific mailbox is monitored. \"dns\" is kept for backward compatibility with older saved tasks and now runs the same MX lookup as \"mx\".",
            "default": "syntax"
          },
          "minReviewCount": {
            "title": "Minimum reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Skip businesses with fewer Google reviews than this. Applied only when Google exposes the review count; businesses with an unknown review count are kept."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Skip businesses with a lower Google rating than this. Applied only when Google exposes the rating; businesses with an unknown rating are kept."
          },
          "categories": {
            "title": "Include categories",
            "type": "array",
            "description": "Optional category allow-list applied after extraction.",
            "items": {
              "type": "string"
            }
          },
          "excludeCategories": {
            "title": "Exclude categories",
            "type": "array",
            "description": "Optional category deny-list applied after extraction.",
            "items": {
              "type": "string"
            }
          },
          "inferCategories": {
            "title": "Infer category filter",
            "type": "boolean",
            "description": "Automatically applies a conservative category allow-list for common query types such as law firms, dentists, and coffee shops.",
            "default": true
          },
          "staffExtraction": {
            "title": "Extract staff contacts",
            "type": "boolean",
            "description": "Also fetch team/staff pages (such as /team, /our-team, /staff, /meet-the-team) and collect the names, job titles and work emails of publicly listed staff into staff_contacts. Only emails on the business's own domain are kept. This collects personal data about named individuals, so enable it only where your use is lawful. Only applies when Contact extraction is \"emails\".",
            "default": false
          },
          "requireEmail": {
            "title": "Require email",
            "type": "boolean",
            "description": "Save only records where at least one email was found.",
            "default": false
          },
          "requireWebsite": {
            "title": "Require website",
            "type": "boolean",
            "description": "Save only records where a website was found.",
            "default": false
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Sample up to a handful of recent review snippets and pain-signal phrases per business, at no extra request cost (parsed from data already fetched). Turn off to skip review parsing.",
            "default": true
          },
          "scrapeDetailPages": {
            "title": "Scrape detail pages",
            "type": "boolean",
            "description": "Fetch Google Maps place pages for additional business fields before contact enrichment.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum HTTP connections used by the actor.",
            "default": 5
          },
          "requestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for failed page requests.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each HTTP request.",
            "default": 30
          },
          "requestDelayMillis": {
            "title": "Request delay milliseconds",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional delay between Google Maps search pages.",
            "default": 0
          },
          "proxyUrl": {
            "title": "Proxy URL",
            "type": "string",
            "description": "Optional explicit proxy URL."
          },
          "useDefaultProxy": {
            "title": "Use default proxy",
            "type": "boolean",
            "description": "When no proxy URL or Apify proxy is configured above, route requests through the proxy set in the DEFAULT_PROXY_URL environment variable, if any. Turn off to connect directly.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy configuration. This MVP reads proxyUrl when provided."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}