{
  "openapi": "3.0.1",
  "info": {
    "title": "Chain Location Network Monitor (Overture Places)",
    "description": "Compare chain/brand locations in a small area between two Overture Places releases or a saved baseline: newly observed, no-longer-observed, changed and uncertain records as source observations.",
    "version": "0.1",
    "x-build-id": "Blw0bgAJ6jHPJoqCl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codeclouds~vestigingennetwerk-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codeclouds-vestigingennetwerk-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/codeclouds~vestigingennetwerk-monitor/runs": {
      "post": {
        "operationId": "runs-sync-codeclouds-vestigingennetwerk-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/codeclouds~vestigingennetwerk-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-codeclouds-vestigingennetwerk-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",
        "required": [
          "brands",
          "bbox",
          "releaseCurrent"
        ],
        "properties": {
          "brands": {
            "title": "Brands / chains",
            "type": "array",
            "description": "Brand names to track. Matching uses brand.names.primary and the record name (see matchMode). Add spelling variants per brand as separate alias entries — e.g. \"Albert Heijn\" plus \"AH to go\". Keep the list small; each brand adds matching work.",
            "items": {
              "type": "string"
            },
            "default": [
              "Albert Heijn",
              "AH to go"
            ]
          },
          "bbox": {
            "title": "Area (bounding box, WGS84)",
            "type": "object",
            "description": "Area to observe, in WGS84 degrees: { \"west\": 4.88, \"south\": 52.36, \"east\": 4.91, \"north\": 52.38 }. Keep it small (a city district): extraction cost grows quickly with area and the source has no country partition. Returns records whose coordinates fall inside (west..east, south..north).",
            "default": {
              "west": 4.88,
              "south": 52.36,
              "east": 4.91,
              "north": 52.38
            }
          },
          "releaseCurrent": {
            "title": "Overture release (current)",
            "type": "string",
            "description": "Overture Maps release ID of the observation to analyze, e.g. \"2026-08-19.0\". Only about two monthly releases are kept upstream; pin the release explicitly so repeated runs compare the same data. Must be newer than releasePrevious.",
            "default": "2026-08-19.0"
          },
          "releasePrevious": {
            "title": "Overture release (previous, optional)",
            "type": "string",
            "description": "Optional second Overture release ID (e.g. \"2026-07-22.0\") to compare against the current one. Leave empty to record a baseline run: locations are stored as first observation, no change events are produced, and the next run can compare against this baseline. Must be older than releaseCurrent and, like it, still hosted by Overture (about two releases are retained)."
          },
          "matchMode": {
            "title": "Brand match mode",
            "enum": [
              "brandField",
              "brandOrName"
            ],
            "type": "string",
            "description": "How a record is attributed to a brand. \"brandField\" uses only the Overture brand field (strict, misses records where brand is empty). \"brandOrName\" also matches the location name — more sensitive, but a name containing the brand text is not always a location of that chain, so check matchEvidence in the output.",
            "default": "brandOrName"
          },
          "minConfidence": {
            "title": "Minimum record confidence",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Exclude records whose Overture confidence is below this value (0–1). The source mixes low-confidence records from many providers; the default filters obvious noise but is not a guarantee.",
            "default": 0.3
          },
          "categoriesBlock": {
            "title": "Exclude records by category",
            "type": "array",
            "description": "Exclude records whose primary Overture category is in this list — used to drop obvious non-store matches (e.g. \"casino\", \"transportation\"). Applied to the primary category only.",
            "items": {
              "type": "string"
            },
            "default": [
              "casino",
              "transportation"
            ]
          },
          "trackChanges": {
            "title": "Compare against saved baseline",
            "type": "boolean",
            "description": "If true and no releasePrevious is given, compare against the baseline saved by an earlier run (named key-value store, per brand-area configuration). A scheduled run with this option keeps the network history alive. With releasePrevious set, that explicit pair of releases is compared and the baseline store is only refreshed, never used for events. With no baseline yet, this run records one (all records reported as first observation, no change events).",
            "default": false
          },
          "maxBytesPerRelease": {
            "title": "Max download per release (MB)",
            "minimum": 8,
            "type": "integer",
            "description": "Hard cap on total HTTP bytes fetched per release, including metadata. The probe for a small city-district area needed ~33 MB; a larger area needs more row groups. The run aborts (without writing a baseline or disappearance events) when the cap is exceeded.",
            "default": 160
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}