{
  "openapi": "3.0.1",
  "info": {
    "title": "Branch Opening & Relocation Signal Monitor",
    "description": "Watch official store-locator sitemaps and location pages for chains you sell to. Keep a branch registry across runs and emit newly listed, coming-soon, likely-relocation, and confirmed-removal events with evidence and confidence.",
    "version": "0.1",
    "x-build-id": "yLJkTQs8cdL6YT1fL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plusonets~branch-opening-signal-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plusonets-branch-opening-signal-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/plusonets~branch-opening-signal-monitor/runs": {
      "post": {
        "operationId": "runs-sync-plusonets-branch-opening-signal-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/plusonets~branch-opening-signal-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-plusonets-branch-opening-signal-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": {
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Chains to watch. Each item needs a name and at least one official source: a location sitemap, a location JSON endpoint, or a single locator page. The demo brands are public store-locator sitemaps. This Actor is unofficial and not affiliated with those brands.",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "title": "Brand name",
                  "type": "string",
                  "description": "Public brand or chain name."
                },
                "sitemapUrl": {
                  "title": "Location sitemap URL",
                  "type": "string",
                  "description": "Official location sitemap or sitemap index. This is the inventory used to detect additions and removals."
                },
                "jsonUrl": {
                  "title": "Location JSON URL",
                  "type": "string",
                  "description": "Optional official JSON endpoint of locations. Used when no sitemap is set."
                },
                "locatorPageUrl": {
                  "title": "Locator page URL",
                  "type": "string",
                  "description": "Optional single official page that publishes one branch as JSON-LD or microdata. Used when no sitemap or JSON URL is set."
                },
                "urlIncludeRegex": {
                  "title": "URL include regex",
                  "type": "string",
                  "description": "Optional. When set, only sitemap URLs matching this regular expression are treated as branches. When empty, the last path segment must contain a digit so state and city index pages are skipped."
                },
                "urlExcludeRegex": {
                  "title": "URL exclude regex",
                  "type": "string",
                  "description": "Optional. Sitemap URLs matching this regular expression are ignored."
                },
                "country": {
                  "title": "Country hint",
                  "type": "string",
                  "description": "Used only when a page does not publish a country. It does not drop locations in other countries."
                }
              }
            },
            "default": [
              {
                "name": "Chipotle",
                "sitemapUrl": "https://locations.chipotle.com/sitemap.xml",
                "country": "US"
              },
              {
                "name": "Trader Joe's",
                "sitemapUrl": "https://locations.traderjoes.com/sitemap.xml",
                "country": "US"
              },
              {
                "name": "Wendy's",
                "sitemapUrl": "https://locations.wendys.com/sitemap.xml",
                "country": "US"
              }
            ]
          },
          "maxLocationPagesPerBrand": {
            "title": "Max location pages per brand",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many individual location pages to open per brand on this run. New sitemap URLs are fetched first, then pages that have never been opened, then the least recently opened. The full sitemap is still stored for add/remove detection.",
            "default": 3
          },
          "maxLocationChecks": {
            "title": "Max location checks",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many successful sitemap or location-page checks.",
            "default": 40
          },
          "maxBranchEvents": {
            "title": "Max branch events",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop billing new branch events after this many. Unbilled events stay queued in the registry for the next run.",
            "default": 50
          },
          "relocationRadiusMeters": {
            "title": "Relocation radius (meters)",
            "minimum": 50,
            "maximum": 50000,
            "type": "integer",
            "description": "A new branch and a disappeared branch within this distance are a likely relocation. Suite-only moves inside 75 meters are not events.",
            "default": 1200
          },
          "alertOnlyOnChange": {
            "title": "Alert only on change",
            "type": "boolean",
            "description": "Omit baseline rows and keep branch events, unresolved identities, and the run summary.",
            "default": false
          },
          "includeBaselineRecords": {
            "title": "Include baseline records",
            "type": "boolean",
            "description": "Write the current registry rows for branches whose details were read. The first complete inventory is always a baseline, not a set of opening events.",
            "default": true
          },
          "stateStoreName": {
            "title": "Registry store name",
            "type": "string",
            "description": "Named key-value store that keeps each brand's branch registry across runs. Do not delete it between scheduled runs.",
            "default": "branch-opening-registry"
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Separates registries when you watch different brand lists in the same store.",
            "default": "default"
          },
          "politeDelayMs": {
            "title": "Delay between requests to one host (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Pause between requests to the same host.",
            "default": 400
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}