{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Leads + Contact Enrichment",
    "description": "Turns any Google Maps search into a local lead list: name, phone, website, full address, coordinates, rating, review count, categories, opening hours and place/CID ids. Optionally visits each business's own website to pull the email addresses and social profiles Google never exposes.",
    "version": "0.1",
    "x-build-id": "4fPiwLG6to5etIND5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~google-maps-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-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/scrapyx~google-maps-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-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/scrapyx~google-maps-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-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",
        "required": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "One Google Maps search per entry, exactly as you would type it into Maps — e.g. 'dentist Austin TX' or 'plumber in Manchester UK'. Google resolves the place name to coordinates for you, so a query carrying its own location needs no latitude/longitude. Each query is capped at ~200 results by Google, so several narrow queries beat one wide one.",
            "default": [
              "dentist Austin TX"
            ],
            "items": {
              "type": "string"
            }
          },
          "enrichContacts": {
            "title": "Enrich with website contacts",
            "type": "boolean",
            "description": "After collecting places, visit each business's own website and pull email addresses and social profiles out of it. Google Maps itself never exposes an email address, so this is the only way to get one. Adds up to 3 requests per place. Every site's robots.txt is checked and honoured before fetching.",
            "default": false
          },
          "enrichmentPagesPerSite": {
            "title": "Enrichment pages per site",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many pages to try on each business website when enriching: the homepage first, then /contact, /contact-us, /about, /about-us, /impressum. Stops early as soon as both an email and a social profile are found. Only used when 'Enrich with website contacts' is on.",
            "default": 3
          },
          "maxPlacesPerQuery": {
            "title": "Max places per query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Stop after this many businesses per search query. Google's own hard ceiling is about 200 results for one query and viewport, so values above that cannot be reached — split the area into narrower queries instead.",
            "default": 100
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Google interface language code, used for category names, opening-hours day names and address formatting. For example 'en', 'de', 'id', 'es'.",
            "default": "en"
          },
          "countryCode": {
            "title": "Country (gl)",
            "type": "string",
            "description": "Two-letter country code that biases which Google results locale answers, e.g. 'us', 'gb', 'de', 'id'. This is Google's regional bias, not a filter — it does not restrict results to that country.",
            "default": "us"
          },
          "latitude": {
            "title": "Centre latitude (optional)",
            "type": "string",
            "description": "Pin the map centre instead of letting Google resolve it from the query text. Must be given together with longitude. Useful for sweeping a city district by district to get past the per-query result ceiling."
          },
          "longitude": {
            "title": "Centre longitude (optional)",
            "type": "string",
            "description": "Pin the map centre instead of letting Google resolve it from the query text. Must be given together with latitude."
          },
          "zoom": {
            "title": "Zoom level",
            "minimum": 3,
            "maximum": 21,
            "type": "integer",
            "description": "Map zoom the search runs at, which sets how wide an area is covered: 11 is metro-wide, 13 is city-wide (default), 16 is a few blocks. Lower zoom covers more ground but returns coarser, more famous results.",
            "default": 13
          },
          "pageSize": {
            "title": "Results per request",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many places to ask for in one request. Google honours values up to 100 exactly, so the default collapses a full harvest into two requests. Lower it only if you are being rate limited.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Upper bound on Google requests in flight across all queries. Pagination inside one query is always sequential regardless of this value, because each page depends on the previous one.",
            "default": 3
          },
          "minRequestInterval": {
            "title": "Min seconds between requests",
            "type": "string",
            "description": "Minimum delay between the START of consecutive Google requests. This, not concurrency, is the honest speed control: once the rate cap binds, extra concurrency buys nothing. Raise it if you see the /sorry/ rate-limit warning in the log.",
            "default": "0.4"
          },
          "enrichmentConcurrency": {
            "title": "Enrichment concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many business websites to fetch at once during contact enrichment. Kept separate from the Google budget so third-party sites and Google never compete for the same workers.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used for every request. Residential is the default on the platform: Google rate limits by exit IP and answers a hot datacenter address with a /sorry/ reCAPTCHA interstitial rather than an HTTP error.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}