{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps New Business Monitor — Fresh Local Leads",
    "description": "Be the first to reach every business that opens in a Google Maps search. Watch a search and each run returns only the businesses that newly appeared, with phone, website and email pulled from the site. Pay per new lead, not per rescan.",
    "version": "0.1",
    "x-build-id": "TJ6MMhFCyLmiW8HWJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/paulovitor18~google-maps-new-business-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-paulovitor18-google-maps-new-business-monitor",
        "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/paulovitor18~google-maps-new-business-monitor/runs": {
      "post": {
        "operationId": "runs-sync-paulovitor18-google-maps-new-business-monitor",
        "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/paulovitor18~google-maps-new-business-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-paulovitor18-google-maps-new-business-monitor",
        "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": {
          "search_term": {
            "title": "Search term",
            "type": "string",
            "description": "What to watch on Google Maps, exactly as you would type it (e.g. \"coffee shops\", \"dental clinics\", \"gyms\"). The monitor stores the set of businesses for this search and, on each run, reports only the ones that newly appeared.",
            "default": "restaurants"
          },
          "location": {
            "title": "City / area",
            "type": "string",
            "description": "City and area to watch (e.g. \"Austin, TX\", \"London\", \"São Paulo, SP\"). Search term + location together define the watch: changing either one creates a separate monitor with isolated state.",
            "default": "Austin, TX"
          },
          "max_results": {
            "title": "Cap of businesses watched",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "The monitor scrolls the search to the END of the list; this is a safety cap (Google Maps usually lists up to ~120 per search). The delta is 100% reliable when the cap covers the whole list (the normal case). If the search is so broad that it overflows the cap, 'possible closures' are not computed on that run (flagged in the summary) so no false alarm is raised — in that case, narrow the search term + location. Changing the cap re-baselines the watch (the watched window changed).",
            "default": 120
          },
          "enrich_from_website": {
            "title": "Enrich new businesses from their website (email/phone, + CNPJ for Brazilian businesses)",
            "type": "boolean",
            "description": "For each NEW business detected, visits the website (once) looking for email, social links and — when the site publishes a Brazilian CNPJ in text — validates it and queries the public registry (legal name, status, size, capital, activity, partners). It is best-effort: if a contact or CNPJ is not found the field comes back empty and you are NOT charged for the enrichment.",
            "default": true
          },
          "max_new_hydrated": {
            "title": "Cap of new businesses hydrated per run",
            "minimum": 0,
            "maximum": 40,
            "type": "integer",
            "description": "Limits how many NEW businesses get their detail page opened and enriched on each run (cost control). The monitor's cost is proportional to the DELTA — in steady state only a few new businesses show up per day. The cap protects the first delta run after a large search. Anything above the cap is NOT lost and NOT charged: it is picked up on the next run. Opening and enriching one business takes ~30s, so raising this raises the run time proportionally.",
            "default": 5
          },
          "stateStoreName": {
            "title": "State store name (advanced)",
            "type": "string",
            "description": "Leave empty to let the monitor derive a stable name from search term + location (each watch is isolated automatically). Fill in only if you want to explicitly control which state this run reads/writes (e.g. share one watch across schedules).",
            "default": ""
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "baseline"
            ],
            "type": "string",
            "description": "auto = the first run becomes the baseline and following runs report the delta. baseline = force a re-baseline (rebase the current state, without charging for new businesses) — use it to reset the watch history.",
            "default": "auto"
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Network routing. The default (Apify Proxy, rotating datacenter) was measured returning 200 on Google Maps without captcha. If you see blocking/consent at volume, select Residential and a country close to your target area.",
            "default": {
              "useApifyProxy": true
            }
          },
          "self_test": {
            "title": "Diagnostic mode (fixture-pack regression)",
            "type": "boolean",
            "description": "Do not use in production. Ignores the search and runs the engine's known-answers battery (frozen-feed parse, empty search, website enrichment, honest abstention) to prove the parser and egress are still correct.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}