{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Leads Scraper — Emails, Phones & Socials",
    "description": "Find businesses on Google Maps and get their emails, phone numbers and social profiles (Facebook, Instagram, LinkedIn, X, TikTok, YouTube) in one run, with ratings, reviews, address and hours.",
    "version": "0.1",
    "x-build-id": "DvC8M44C4hfnJXdTb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maged120~google-maps-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maged120-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/maged120~google-maps-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maged120-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/maged120~google-maps-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maged120-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "leads",
              "places",
              "details"
            ],
            "type": "string",
            "description": "Leave empty to pick automatically: \"Place identifiers\" means details, a single \"Location\" means places, otherwise leads."
          },
          "searchTerms": {
            "title": "What to search",
            "type": "array",
            "description": "Business types or keywords, exactly as you would type them into Google Maps (e.g. 'dentist', 'plumber', 'coffee shop').",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Where to search",
            "type": "array",
            "description": "Cities, neighborhoods, ZIP codes or regions (e.g. 'Austin, TX', 'Brooklyn, NY', '10001'). Every search term is run in every location. Each search returns up to about 200 places, so add more locations (neighborhoods, ZIP codes) to cover a big city fully.",
            "items": {
              "type": "string"
            }
          },
          "maxPlacesPerSearch": {
            "title": "Max places per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Places to collect for each search term in each location (up to 200).",
            "default": 100
          },
          "extractContacts": {
            "title": "Find emails & social profiles",
            "type": "boolean",
            "description": "Visit each business website and collect emails, extra phone numbers and social profiles. Turn off for Maps data only (faster).",
            "default": true
          },
          "requireEmail": {
            "title": "Only businesses with an email",
            "type": "boolean",
            "description": "Only return businesses where an email address was found.",
            "default": false
          },
          "requireWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Skip businesses that do not list a website.",
            "default": false
          },
          "requirePhone": {
            "title": "Only businesses with a phone",
            "type": "boolean",
            "description": "Skip businesses that do not list a phone number.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only businesses rated at least this (e.g. 4.0). 0 = any.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only businesses with at least this many Google reviews. 0 = any.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for results (e.g. en, es, de, fr).",
            "default": "en"
          },
          "countryCode": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code to localize results (e.g. us, gb, de).",
            "default": "us"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "One location for places mode, e.g. \"Austin, TX\". Setting this (without \"Locations\") switches to places mode."
          },
          "maxResults": {
            "title": "Max results per search term",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper bound on places returned for each search term. Google Maps typically caps a single query around 100-120 results."
          },
          "skipPlacesWithoutPhone": {
            "title": "Only places with a phone number",
            "type": "boolean",
            "description": "Skip places that don't list a phone number."
          },
          "skipPlacesWithoutWebsite": {
            "title": "Only places with a website",
            "type": "boolean",
            "description": "Skip places that don't list a website."
          },
          "openNowOnly": {
            "title": "Only places open now",
            "type": "boolean",
            "description": "Skip places that are currently closed."
          },
          "placeIdentifiers": {
            "title": "Places to look up",
            "type": "array",
            "description": "One entry per place. Each can be a Google Maps URL, a Google Place ID (ChIJ...), a CID, or a plain 'business name, city' string. The Actor returns one enriched record per entry.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy for places and details modes (leads mode manages its own connection).",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}