{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Change Monitor",
    "description": "Track configured prices and terms on public HTML pages. Get structured JSON changes with before/after values and source evidence for AI agents.",
    "version": "0.2",
    "x-build-id": "inj9wwK7gzZu539j9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/telvio~ai-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-telvio-ai-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/telvio~ai-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-telvio-ai-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/telvio~ai-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-telvio-ai-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",
        "required": [
          "monitorId",
          "targets"
        ],
        "properties": {
          "monitorId": {
            "title": "Monitor ID",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$",
            "type": "string",
            "description": "Stable namespace for the baseline."
          },
          "targets": {
            "title": "Targets and fields",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Public HTTP(S) targets with unique selectors. See examples/input.json.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "url",
                "fields"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$",
                  "title": "Target ID",
                  "description": "Stable unique identifier within this monitor."
                },
                "url": {
                  "type": "string",
                  "maxLength": 2048,
                  "pattern": "^https?://",
                  "title": "Public page URL",
                  "description": "Public HTTP(S) URL, without credentials, fragments or nonstandard ports."
                },
                "fields": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 20,
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "name",
                      "selector",
                      "type"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$",
                        "title": "Field name",
                        "description": "Stable unique identifier of the field within this target."
                      },
                      "selector": {
                        "type": "string",
                        "pattern": "^(?:[a-zA-Z][\\w-]*|\\.[\\w-]+|#[\\w-]+|\\[[\\w-]+=\"[^\"\\]\\r\\n]+\"\\])$",
                        "title": "Unique element selector",
                        "description": "Simple tag, .class, #id or [attribute=\"value\"]. Must match exactly one element."
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "price",
                          "text"
                        ],
                        "title": "Value type",
                        "description": "price normalizes one monetary amount; text compares whitespace-normalized text."
                      },
                      "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "title": "Currency code",
                        "description": "Required for price: three uppercase letters such as BRL, USD or GBP."
                      },
                      "decimalSeparator": {
                        "type": "string",
                        "enum": [
                          ".",
                          ","
                        ],
                        "title": "Decimal separator",
                        "description": "Required for price. Use comma or period explicitly."
                      },
                      "textBetween": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "prefix",
                          "suffix"
                        ],
                        "properties": {
                          "prefix": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200,
                            "title": "Literal prefix",
                            "description": "Literal text before the selected value. Must occur exactly once after whitespace normalization."
                          },
                          "suffix": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200,
                            "title": "Literal suffix",
                            "description": "Literal text after the selected value. Must occur after the prefix."
                          }
                        },
                        "title": "Optional literal extraction",
                        "description": "Optional bounded extraction with a unique prefix and the first following suffix."
                      }
                    }
                  },
                  "title": "Fields to monitor",
                  "description": "One to twenty required fields. Ambiguous or missing fields preserve the previous baseline."
                }
              }
            }
          },
          "baselineStoreName": {
            "title": "Baseline store",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{0,62}$",
            "type": "string",
            "description": "Named KVS used to keep snapshots between runs.",
            "default": "ai-change-monitor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}