{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Business Change Monitor",
    "description": "Monitor Google Maps businesses over time and get only meaningful listing changes: closures, reopenings, opening-hours changes, rating and review-count movement, phone, website, address and category updates. Works from Maps URLs, Place IDs, CIDs or business names, with state kept between runs.",
    "version": "1.0",
    "x-build-id": "xB3d9SIEduepFFgf0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~google-maps-business-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-google-maps-business-change-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/coregent~google-maps-business-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-coregent-google-maps-business-change-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/coregent~google-maps-business-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-google-maps-business-change-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": {
          "places": {
            "title": "Places to monitor",
            "type": "array",
            "description": "One business per line: a Google Maps URL or share link, a Place ID (ChIJ…), a CID (cid:123… or digits), a feature ID (0x…:0x…) or a business name with its location (\"Single O, Surry Hills NSW\"). The sample place is ignored automatically when you also give a dataset.",
            "default": [
              "ChIJ3S-JXmauEmsRUcIaWtf4MzE"
            ],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Existing Google Maps dataset (optional)",
            "type": "string",
            "description": "A dataset from a previous Google Maps scraper run. Each row's placeId, cid, featureId or Google Maps URL is monitored."
          },
          "maxPlaces": {
            "title": "Max places per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on places checked in one run (places + dataset rows, after deduplication).",
            "default": 1000
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name of this monitor, e.g. competitor-stores or franchise-locations. State and history are kept per monitor key, so the same business can be tracked in independent projects. Use the same key on every scheduled run.",
            "default": "default"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "MONITOR",
              "BASELINE",
              "COMPARE"
            ],
            "type": "string",
            "description": "MONITOR: compare each place with its last stored snapshot and return only new changes (first run creates the baseline). BASELINE: store the current state for every place without returning changes. COMPARE: compare the current state with the snapshot from each comparison period (e.g. 30 days ago).",
            "default": "MONITOR"
          },
          "comparisonPeriods": {
            "title": "Comparison periods",
            "type": "array",
            "description": "COMPARE mode: the periods to compare against (one set of change events each). MONITOR mode: added to each business summary as a period comparison. Needs stored history (Save history on).",
            "items": {
              "type": "string",
              "enum": [
                "PREVIOUS",
                "24_HOURS",
                "7_DAYS",
                "30_DAYS",
                "90_DAYS",
                "180_DAYS",
                "365_DAYS"
              ],
              "enumTitles": [
                "Previous check",
                "24 hours",
                "7 days",
                "30 days",
                "90 days",
                "180 days",
                "365 days"
              ]
            },
            "default": [
              "PREVIOUS",
              "7_DAYS",
              "30_DAYS"
            ]
          },
          "trackFields": {
            "title": "Fields to track",
            "type": "array",
            "description": "Which fields produce change events. Default: every core field except the main photo. Popular Times and visit duration also need \"Include Popular Times\".",
            "items": {
              "type": "string",
              "enum": [
                "STATUS",
                "NAME",
                "CATEGORIES",
                "ADDRESS",
                "COORDINATES",
                "PHONE",
                "WEBSITE",
                "OPENING_HOURS",
                "RATING",
                "REVIEW_COUNT",
                "PRICE_LEVEL",
                "CLAIM_STATUS",
                "ATTRIBUTES",
                "POPULAR_TIMES",
                "TYPICAL_VISIT_DURATION",
                "PHOTO"
              ],
              "enumTitles": [
                "Open / closed status",
                "Name",
                "Categories",
                "Address",
                "Map pin (coordinates)",
                "Phone",
                "Website",
                "Opening hours",
                "Rating",
                "Review count",
                "Price level",
                "Claimed status",
                "Attributes (accessibility, amenities)",
                "Popular Times",
                "Typical visit duration",
                "Main photo"
              ]
            },
            "default": [
              "STATUS",
              "NAME",
              "CATEGORIES",
              "ADDRESS",
              "COORDINATES",
              "PHONE",
              "WEBSITE",
              "OPENING_HOURS",
              "RATING",
              "REVIEW_COUNT",
              "PRICE_LEVEL",
              "CLAIM_STATUS",
              "ATTRIBUTES",
              "POPULAR_TIMES",
              "TYPICAL_VISIT_DURATION"
            ]
          },
          "includePopularTimes": {
            "title": "Include Popular Times",
            "type": "boolean",
            "description": "Also check the weekly Popular Times histogram and typical visit duration. Slower (one Google Search page per place in a browser) and charged as a separate add-on event.",
            "default": false
          },
          "includeAttributes": {
            "title": "Include attributes",
            "type": "boolean",
            "description": "Track listing attributes Google shows publicly, such as wheelchair access. Coverage varies by category and region.",
            "default": true
          },
          "includeProfileSummary": {
            "title": "Business summary rows",
            "type": "boolean",
            "description": "Add one free summary row per checked business (status, snapshot quality, changes, period comparisons, current values). Failed places always get a summary row.",
            "default": true
          },
          "emitBaseline": {
            "title": "Return a row for new baselines",
            "type": "boolean",
            "description": "On a place's first check, add one BASELINE_CREATED row with the stored snapshot. Off by default: a first run never produces \"field added\" change events.",
            "default": false
          },
          "minimumRatingChange": {
            "title": "Minimum rating change",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Smallest rating movement (stars) that counts as a change, e.g. 0.1. Avoids rounding noise.",
            "default": 0.1
          },
          "minimumReviewCountChange": {
            "title": "Minimum review-count change",
            "minimum": 1,
            "type": "integer",
            "description": "Smallest change in the number of reviews that produces an event.",
            "default": 1
          },
          "minimumPopularTimesChange": {
            "title": "Minimum Popular Times change",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Percentage points an hourly Popular Times value must move to count as a change.",
            "default": 10
          },
          "minimumLocationShiftMeters": {
            "title": "Minimum map-pin shift (meters)",
            "minimum": 1,
            "type": "integer",
            "description": "Smaller coordinate moves are treated as Google pin corrections and ignored.",
            "default": 50
          },
          "saveHistory": {
            "title": "Save history",
            "type": "boolean",
            "description": "Keep past snapshots for period comparisons and append every check to the history dataset (<state store>-history). Off: only the latest snapshot is kept.",
            "default": true
          },
          "maxHistoryDays": {
            "title": "History retention (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "How far back snapshots are kept for comparisons (thinned to one a day, then one a week, then one a month).",
            "default": 365
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that holds the monitor state between runs (letters, digits, hyphens). Change it only to keep a completely separate set of monitors.",
            "default": "google-maps-business-monitor-state"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google Maps interface language for names, categories and hours (e.g. en, de). Keep it the same across runs — changing it starts a new baseline.",
            "default": "en"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Used for the browser steps only (business-name lookups and Popular Times). Place checks by URL / ID go straight to Google Maps. Apify Residential is not supported — use Datacenter or your own proxy URLs.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}