{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Leads Scraper",
    "description": "Extract business leads from Google Maps: name, address, phone, email, website, rating, reviews, opening hours, social links and more. Fast HTTP engine, no browser. Search any city worldwide and export to JSON, CSV or Excel. No API key needed. Pay only per lead.",
    "version": "0.0",
    "x-build-id": "ViiVuO3OMTRc4IvUO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/upadhyay.labs~google-maps-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-upadhyay.labs-google-maps-leads-scraper",
        "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/upadhyay.labs~google-maps-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-upadhyay.labs-google-maps-leads-scraper",
        "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/upadhyay.labs~google-maps-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-upadhyay.labs-google-maps-leads-scraper",
        "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 instead.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Each URL returns exactly that one place. 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"
                }
              }
            }
          },
          "maxItems": {
            "title": "Maximum Items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of businesses to save per search term — a hard cap that also covers every tile of a wide-area grid search. A single Google Maps search returns up to roughly 200–250 places; use Wide-area search to go beyond that.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy configuration (required 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. Free to fetch (comes in the same request as everything else), so leave on unless you specifically want it stripped.",
            "default": true
          },
          "includePhone": {
            "title": "Include Phone Number",
            "type": "boolean",
            "description": "Include the business phone number in the output. Free to fetch (comes in the same request as everything else), so leave on unless you specifically want it stripped.",
            "default": true
          },
          "includeEmail": {
            "title": "Include Email",
            "type": "boolean",
            "description": "Scan each business's own website for an email address (home/contact/about pages). Not every business publishes one, so this field can be null.",
            "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
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google interface language code (hl) for localized results — e.g. 'en', 'de', 'fr', 'es'. Affects how names, categories and hours are returned. Defaults to English.",
            "default": "en"
          },
          "countryCode": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code (gl) that biases which regional results Google returns — e.g. 'us', 'gb', 'de', 'au'. Set it to the country you're searching in for the most accurate results. Defaults to US.",
            "default": "us"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}