{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Leads Extractor",
    "description": "Turn any Google Maps search into B2B leads with emails, social profiles, review velocity, and website tech and ad-pixel detection. Run it weekly to flag new businesses and review growth. Brazil bonus: CNPJ, CNAE, and WhatsApp.",
    "version": "0.2",
    "x-build-id": "xBYTA0JWlLBhgDG0n"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gersinhobdc~google-maps-leads-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gersinhobdc-google-maps-leads-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/gersinhobdc~google-maps-leads-extractor/runs": {
      "post": {
        "operationId": "runs-sync-gersinhobdc-google-maps-leads-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/gersinhobdc~google-maps-leads-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-gersinhobdc-google-maps-leads-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",
        "required": [
          "searchTerm",
          "location"
        ],
        "properties": {
          "searchTerm": {
            "title": "Search Term",
            "type": "string",
            "description": "What to search on Google Maps, e.g. 'restaurants', 'dentists', 'law firms', 'gyms'. One term per run: for several terms, run the Actor once per term or save one Task per term."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Where to search: city, region or neighborhood, e.g. 'New York, NY', 'Berlin', 'São Paulo, Brasil'. One location per run. A neighborhood ('Vila Mariana, São Paulo') returns more relevant results than a whole metro area."
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of leads to save. Each lead opens its Google Maps detail page, so run time grows with this number. One Google Maps search usually stops around 120 results; to get more, split the area into neighborhoods and run once per neighborhood. Range: 1–500.",
            "default": 50
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "pt",
              "es",
              "fr",
              "de",
              "it"
            ],
            "type": "string",
            "description": "Language of the Google Maps interface. Affects category names, day names and other localized text. Match it to the location for best results (e.g. 'pt' for Brazilian cities).",
            "default": "en"
          },
          "includeHours": {
            "title": "Include Opening Hours",
            "type": "boolean",
            "description": "Extract opening hours for each business. Adds about 1–2 s per lead. Included in the base lead price.",
            "default": true
          },
          "includeEmails": {
            "title": "Extract emails and social profiles",
            "type": "boolean",
            "description": "Visit each business website (homepage plus up to 2 contact pages) and extract email addresses and social profile links (Facebook, Instagram, LinkedIn, X/Twitter, YouTube, WhatsApp). Works in any country. Adds up to ~8 s per lead that has a website; leads without a website are skipped. Billed as 'Enrichment delivered' only when at least one email or social link is found.",
            "default": false
          },
          "includeCnpj": {
            "title": "Extract CNPJ (Brazil only)",
            "type": "boolean",
            "description": "Look for a CNPJ (Brazilian company tax ID) on the business website. Uses the same website visit as email extraction, so it adds almost no time when that is on (otherwise up to ~8 s per lead with a website). Outside Brazil it returns null and is never billed.",
            "default": false
          },
          "enrichCnpj": {
            "title": "Enrich CNPJ with BrasilAPI (Brazil only)",
            "type": "boolean",
            "description": "For each CNPJ found, query the public BrasilAPI registry for legal name (razão social), CNAE activity code, company size and share capital. Requires 'Extract CNPJ'. Calls are spaced about 1 s apart, and BrasilAPI sometimes has no record for a valid CNPJ; in that case cnpjData is null and the rest of the lead is still saved.",
            "default": false
          },
          "checkWhatsapp": {
            "title": "Detect WhatsApp link on website",
            "type": "boolean",
            "description": "Sets whatsappBusiness to true when the business website publishes a WhatsApp link (wa.me or api.whatsapp.com), false when the site was visited and has none, and null when there is no website. It does not check whether the phone number itself is on WhatsApp. Uses the same website visit as email extraction.",
            "default": false
          },
          "includeWebsiteIntelligence": {
            "title": "Website intelligence",
            "type": "boolean",
            "description": "Detect the website platform (Shopify, WooCommerce, WordPress, Wix, VTEX and others), online store, contact form, chat widgets (Intercom, Crisp, Zendesk...) and advertising pixels (Meta, Google Ads/GA, TikTok, LinkedIn). 'Has a website but no ad pixel' is a common filter for marketing agencies. Uses the same website visit as email extraction (up to ~8 s per lead with a website). Billed as 'Website analyzed' only when at least one signal is detected.",
            "default": false
          },
          "includeReviews": {
            "title": "Reviews intelligence",
            "type": "boolean",
            "description": "Open each business's recent Google reviews and compute review velocity (last 30 and 90 days), latest review date, owner-response rate and the keywords customers mention most. The slowest option: adds a few seconds per lead, more with a higher 'Max reviews per business'. Billed as 'Reviews' only when at least one review is extracted.",
            "default": false
          },
          "maxReviews": {
            "title": "Max reviews per business",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many recent reviews to read per business when 'Reviews intelligence' is on. Each extra review adds run time; 5 is usually enough to compute velocity. Range: 1–50.",
            "default": 5
          },
          "trackChanges": {
            "title": "Track changes between runs (new businesses and review growth)",
            "type": "boolean",
            "description": "Compare with previous runs of the SAME search term and location and add a leadChange object to every lead: isNew (first time this business appears, so nobody has prospected it yet), daysSinceFirstSeen, reviewsDelta and ratingDelta since the last run. Adds no run time and no extra charge. Schedule the Actor weekly to build the history; the first run marks everything as new. History lives in a named key-value store in your account, one per search; businesses unseen for 180 days are dropped.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Route Google Maps traffic through Apify Proxy. Off by default; small runs usually work without it. Turn it on for large or frequent runs, or if a run returns fewer results than expected, since Google may rate-limit repeated traffic from one IP.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}